mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Ebbert <76306.1226@compuserve.com>
To: Andrew Morton <akpm@osdl.org>
Cc: "gregoire.favre" <gregoire.favre@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Andi Kleen <ak@suse.de>, Vojtech Pavlik <vojtech@suse.cz>,
	"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single)
Date: Sun, 9 Jul 2006 21:49:02 -0400	[thread overview]
Message-ID: <200607092152_MC3-1-C488-18A8@compuserve.com> (raw)

In-Reply-To: <20060709154445.60d6619c.akpm@osdl.org>

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 <76306.1226@compuserve.com>

--- 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

             reply	other threads:[~2006-07-10  1:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-10  1:49 Chuck Ebbert [this message]
2006-07-10  2:25 ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2006-07-09  9:11 2.6.18-rc1-mm1 Andrew Morton
2006-07-09 11:49 ` 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single) Gregoire Favre
2006-07-09 13:00   ` Adrian Bunk
2006-07-09 14:11     ` Gregoire Favre
2006-07-09 20:39   ` Rafael J. Wysocki
2006-07-09 21:03     ` Andrew Morton
2006-07-09 22:37       ` Rafael J. Wysocki
2006-07-09 22:44         ` Andrew Morton
2006-07-10  0:08           ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200607092152_MC3-1-C488-18A8@compuserve.com \
    --to=76306.1226@compuserve.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=gregoire.favre@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome