diff options
author | Jack Steiner <steiner@sgi.com> | 2009-07-27 10:35:07 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-04 10:18:01 -0400 |
commit | 6c7184b77464261b7d55583a48accbd1350923a3 (patch) | |
tree | 122e6b8d88cb4df1518ae2ea13841691de091bb2 /arch/x86/kernel | |
parent | f1f029c7bfbf4ee1918b90a431ab823bed812504 (diff) |
x86, UV: Handle missing blade-local memory correctly
UV blades may not have any blade-local memory. Add a field
(nid) to the UV blade structure to indicates whether the node
has local memory. This is needed by the GRU driver (pushed
separately).
Signed-off-by: Jack Steiner <steiner@sgi.com>
Cc: linux-mm@kvack.org
LKML-Reference: <20090727143507.GA7006@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/apic/x2apic_uv_x.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 096d19aea2f7..ad3f0a984cab 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
@@ -591,6 +591,8 @@ void __init uv_system_init(void) | |||
591 | bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades(); | 591 | bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades(); |
592 | uv_blade_info = kmalloc(bytes, GFP_KERNEL); | 592 | uv_blade_info = kmalloc(bytes, GFP_KERNEL); |
593 | BUG_ON(!uv_blade_info); | 593 | BUG_ON(!uv_blade_info); |
594 | for (blade = 0; blade < uv_num_possible_blades(); blade++) | ||
595 | uv_blade_info[blade].memory_nid = -1; | ||
594 | 596 | ||
595 | get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size); | 597 | get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size); |
596 | 598 | ||
@@ -629,6 +631,9 @@ void __init uv_system_init(void) | |||
629 | lcpu = uv_blade_info[blade].nr_possible_cpus; | 631 | lcpu = uv_blade_info[blade].nr_possible_cpus; |
630 | uv_blade_info[blade].nr_possible_cpus++; | 632 | uv_blade_info[blade].nr_possible_cpus++; |
631 | 633 | ||
634 | /* Any node on the blade, else will contain -1. */ | ||
635 | uv_blade_info[blade].memory_nid = nid; | ||
636 | |||
632 | uv_cpu_hub_info(cpu)->lowmem_remap_base = lowmem_redir_base; | 637 | uv_cpu_hub_info(cpu)->lowmem_remap_base = lowmem_redir_base; |
633 | uv_cpu_hub_info(cpu)->lowmem_remap_top = lowmem_redir_size; | 638 | uv_cpu_hub_info(cpu)->lowmem_remap_top = lowmem_redir_size; |
634 | uv_cpu_hub_info(cpu)->m_val = m_val; | 639 | uv_cpu_hub_info(cpu)->m_val = m_val; |