2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single)
In-Reply-To: <[email protected]>
Quoted 5 lines · Andrew Morton
I meant, in
smp.h:#else /*
CONFIG_SMP*/
#definesmp_call_function_single(cpu, fn, arg, x, y)fn(arg)
#endif /*CONFIG_SMP*/
But smp_call_function_single() generates an error if you try to call it on your own CPU, so that doesn't make sense.
I fixed it like this, because that register defaults to zero anyway and doesn't need initialization on CPU 0.
What I can't figure out is how this ever gets called on CPU 0 during init, whether it's SMP or not.
arch/x86_64/kernel/vsyscall.c +2 -1
@@ -253,13 +253,14 @@ void __cpuinit vsyscall_set_cpu(int cpu)#ifdef CONFIG_NUMA node = cpu_to_node[cpu];#endif +#ifdef CONFIG_SMP if (cpu_has (&cpu_data[cpu],X86_FEATURE_RDTSCP )) {/* the notifier is unfortunately not executed on the target CPU */ void *info = (void *)((node <<12 ) | cpu);smp_call_function_single (cpu, write_rdtscp_cb, info,0 ,1 ); } - +#endif /* Store cpu number in limit so that it can be loaded quickly in user space in vgetcpu. 12 bits for the CPU and 8 bits for the node. */
Signature · 2 lines
Chuck "You can't read a newspaper if you can't read." --George W. Bush
Quoted 4 lines · Chuck Ebbert
In-Reply-To: <[email protected]>
On Sun, 9 Jul 2006 15:44:45 -0700, Andrew Morton wrote:
Quoted 8 lines
Quoted 5 lines
I meant, in
smp.h:#else /*
CONFIG_SMP*/
#definesmp_call_function_single(cpu, fn, arg, x, y)fn(arg)
#endif /*CONFIG_SMP*/But
smp_call_function_single()generates an error if you try to call it on your own CPU, so that doesn't make sense.
I have a full patch to be mirrored out soon.
Your patch is still wrong because now it won't be initialized on the BP
Quoted 6 lines
I fixed it like this, because that register defaults to zero anyway and doesn't need initialization on CPU 0.
What I can't figure out is how this ever gets called on CPU 0 during init, whether it's SMP or not.
The notifier is called from time.c
-Andi