In-Reply-To: <[email protected]>
On Sun, 9 Jul 2006 15:44:45 -0700, Andrew Morton wrote:
> I meant, in smp.h:
>
> #else /* CONFIG_SMP */
> #define smp_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.
Signed-off-by: Chuck Ebbert <[email protected]>
--- 2.6.18-rc1-mm1-64.orig/arch/x86_64/kernel/vsyscall.c
+++ 2.6.18-rc1-mm1-64/arch/x86_64/kernel/vsyscall.c
@@ -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. */
--
Chuck
"You can't read a newspaper if you can't read." --George W. Bush
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]