fix generic non-SMP builds
PATCH 1/1 fix generic non-SMP builds
Here is a forward port of Jesse Barnes' fixes for generic, non-SMP builds to today's linux-ia64-test-2.6.12 tree. I built & booted both SMP & non-SMP versions on a zx1 box.
arch/ia64/kernel/Makefile +1 -0
@@ -17,6 +17,7 @@ obj-$(CONFIG_IOSAPIC) += iosapic.o obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_SMP) += smp.o smpboot.o domain.o +obj-$(CONFIG_NUMA) += numa.o obj-$(CONFIG_PERFMON) += perfmon_default_smpl.o obj-$(CONFIG_IA64_CYCLONE) += cyclone.o obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o
arch/ia64/kernel/acpi.c +3 -1
@@ -642,9 +642,11 @@if (smp_boot_data.cpu_phys_id[cpu] !=hard_smp_processor_id ()) node_cpuid[i++].phys_id = smp_boot_data.cpu_phys_id[cpu]; } -build_cpu_to_node_map ();# endif #endif +#ifdef CONFIG_ACPI_NUMA +build_cpu_to_node_map (); +#endif /* Make boot-up look pretty */ printk (KERN_INFO "%d CPUs available, %d CPUs total\n" , available_cpus, total_cpus);return 0 ;
arch/ia64/kernel/numa.c +57 -0
57 lines not on this page · raw message
arch/ia64/kernel/smpboot.c +0 -41
47 lines not on this page · raw message
arch/ia64/mm/discontig.c +48 -22
121 lines not on this page · raw message
include/asm-ia64/sn/sn_cpuid.h +0 -5
@@ -81,11 +81,6 @@* */ -#ifndef CONFIG_SMP -#define cpu_physical_id (cpuid) ((ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff) -#endif - -#define get_node_number (addr) NASID_GET(addr)/*
Signature · 1 line
dann frazier <[email protected]>
arch/ia64/kernel/numa.c line 31
Quoted 4 lines · dann frazier
arch/ia64/kernel/numa.c +4
-0+u8 cpu_to_node_map[NR_CPUS] __cacheline_aligned; +EXPORT_SYMBOL (cpu_to_node_map); + +cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
I'm trying to figure out why these are caheline aligned... they're ready-only for after boot (hotplug aside), right? Do we see that a lot of cpu/node local references to them occur? OTOH, the wastage isn't that big either way...
arch/ia64/kernel/numa.c line 50
Quoted 5 lines
arch/ia64/kernel/numa.c +5
-0+for (cpu =0 ; cpu <NR_CPUS ; ++cpu) { + node =-1 ; +for (i =0 ; i <NR_CPUS ; ++i) +if (cpu_physical_id (cpu) = node_cpuid[i].phys_id) { + node = node_cpuid[i].nid;
Is there a for_each_node(n) now?
arch/ia64/mm/discontig.c line 561
Quoted 2 lines
arch/ia64/mm/discontig.c +2
-0+for (cpu =0 ; cpu <NR_CPUS ; cpu++) +per_cpu (local_per_cpu_offset, cpu) = __per_cpu_offset[cpu];
for_each_cpu here I think.
Not sure when Tony had this queued up, so we may have to rediff in a week or two, otherwise it looks good.
Jess
On Sun, Mar 13, 2005 at 06:57:47PM -0700, dann frazier wrote:
| Here is a forward port of Jesse Barnes' fixes for generic, non-SMP | builds to today's linux-ia64-test-2.6.12 tree. I built & booted both | SMP & non-SMP versions on a zx1 box. | | Signed-off-by: dann frazier <[email protected]>
Dann, care to resend this? I see nonsmp, generic builds are still busted.
Greg