]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/uv_zalias_support
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / uv_zalias_support
CommitLineData
2cb7cef9
BS
1From: Jack Steiner <steiner@sgi.com>
2Subject: uv: Support for non-nasid 0 systems
3References: bnc#458869
4
5This fixes a UV bug related to generating global memory addresses
6on partitioned systems. Partition systems do not have physical memory
7at address 0. Instead, a chunk of high memory is remapped by the chipset
8so that it appears to be at address 0. This remapping is INVISIBLE to most
9of the OS. The only OS functions that need to be aware of the remaping are
10functions that directly interface to the chipset. The GRU is one example.
11
12Also, delete a couple of unused macros related to global memory addresses.
13
14Signed-off-by: Jack Steiner <steiner@sgi.com>
15Acked-by: Jeff Mahoney <jeffm@suse.com>
16---
17 arch/x86/kernel/genx2apic_uv_x.c | 3 +--
18 include/asm-x86/uv/uv_hub.h | 16 ++--------------
19 2 files changed, 3 insertions(+), 16 deletions(-)
20
21--- a/arch/x86/kernel/genx2apic_uv_x.c
22+++ b/arch/x86/kernel/genx2apic_uv_x.c
23@@ -535,8 +535,7 @@ void __init uv_system_init(void)
24 uv_blade_info[blade].nr_possible_cpus++;
25
26 uv_cpu_hub_info(cpu)->lowmem_remap_base = lowmem_redir_base;
27- uv_cpu_hub_info(cpu)->lowmem_remap_top =
28- lowmem_redir_base + lowmem_redir_size;
29+ uv_cpu_hub_info(cpu)->lowmem_remap_top = lowmem_redir_size;
30 uv_cpu_hub_info(cpu)->m_val = m_val;
31 uv_cpu_hub_info(cpu)->n_val = m_val;
32 uv_cpu_hub_info(cpu)->numa_blade_id = blade;
33--- a/include/asm-x86/uv/uv_hub.h
34+++ b/include/asm-x86/uv/uv_hub.h
35@@ -210,7 +210,7 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __
36 static inline unsigned long uv_soc_phys_ram_to_gpa(unsigned long paddr)
37 {
38 if (paddr < uv_hub_info->lowmem_remap_top)
39- paddr += uv_hub_info->lowmem_remap_base;
40+ paddr |= uv_hub_info->lowmem_remap_base;
41 return paddr | uv_hub_info->gnode_upper;
42 }
43
44@@ -218,19 +218,7 @@ static inline unsigned long uv_soc_phys_
45 /* socket virtual --> UV global physical address */
46 static inline unsigned long uv_gpa(void *v)
47 {
48- return __pa(v) | uv_hub_info->gnode_upper;
49-}
50-
51-/* socket virtual --> UV global physical address */
52-static inline void *uv_vgpa(void *v)
53-{
54- return (void *)uv_gpa(v);
55-}
56-
57-/* UV global physical address --> socket virtual */
58-static inline void *uv_va(unsigned long gpa)
59-{
60- return __va(gpa & uv_hub_info->gpa_mask);
61+ return uv_soc_phys_ram_to_gpa(__pa(v));
62 }
63
64 /* pnode, offset --> socket virtual */