* 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single)
2006-07-09 9:11 2.6.18-rc1-mm1 Andrew Morton
@ 2006-07-09 11:49 ` Gregoire Favre
2006-07-09 13:00 ` Adrian Bunk
2006-07-09 20:39 ` Rafael J. Wysocki
0 siblings, 2 replies; 10+ messages in thread
From: Gregoire Favre @ 2006-07-09 11:49 UTC (permalink / raw)
To: linux-kernel
Hello,
can't compil it :
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
arch/x86_64/kernel/built-in.o: In function `vsyscall_set_cpu':
(.init.text+0x1e87): undefined reference to `smp_call_function_single'
make: *** [.tmp_vmlinux1] Error 1
Please CC to me if some more infos are needed as I am not on the list.
--
Grégoire FAVRE http://gregoire.favre.googlepages.com http://www.gnupg.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single)
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
1 sibling, 1 reply; 10+ messages in thread
From: Adrian Bunk @ 2006-07-09 13:00 UTC (permalink / raw)
To: Gregoire Favre, Vojtech Pavlik, Andi Kleen; +Cc: linux-kernel, discuss
On Sun, Jul 09, 2006 at 01:49:25PM +0200, Gregoire Favre wrote:
> Hello,
>
> can't compil it :
>
> CHK include/linux/compile.h
> UPD include/linux/compile.h
> CC init/version.o
> LD init/built-in.o
> LD .tmp_vmlinux1
> arch/x86_64/kernel/built-in.o: In function `vsyscall_set_cpu':
> (.init.text+0x1e87): undefined reference to `smp_call_function_single'
> make: *** [.tmp_vmlinux1] Error 1
Thanks for your report, it seems x86_64-mm-getcpu-vsyscall.patch broke
COMFIG_SMP=n x86_64 compiles.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single)
2006-07-09 13:00 ` Adrian Bunk
@ 2006-07-09 14:11 ` Gregoire Favre
0 siblings, 0 replies; 10+ messages in thread
From: Gregoire Favre @ 2006-07-09 14:11 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Vojtech Pavlik, Andi Kleen, linux-kernel, discuss
On Sun, Jul 09, 2006 at 03:00:27PM +0200, Adrian Bunk wrote:
> Thanks for your report, it seems x86_64-mm-getcpu-vsyscall.patch broke
> COMFIG_SMP=n x86_64 compiles.
Thanks you very much : reverting x86_64-mm-getcpu-vsyscall.patch I can
compil it again :-)
--
Grégoire FAVRE http://gregoire.favre.googlepages.com http://www.gnupg.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single)
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 20:39 ` Rafael J. Wysocki
2006-07-09 21:03 ` Andrew Morton
1 sibling, 1 reply; 10+ messages in thread
From: Rafael J. Wysocki @ 2006-07-09 20:39 UTC (permalink / raw)
To: Gregoire Favre; +Cc: linux-kernel, Andrew Morton, Andi Kleen
On Sunday 09 July 2006 13:49, Gregoire Favre wrote:
> Hello,
>
> can't compil it :
>
> CHK include/linux/compile.h
> UPD include/linux/compile.h
> CC init/version.o
> LD init/built-in.o
> LD .tmp_vmlinux1
> arch/x86_64/kernel/built-in.o: In function `vsyscall_set_cpu':
> (.init.text+0x1e87): undefined reference to `smp_call_function_single'
> make: *** [.tmp_vmlinux1] Error 1
This is because of x86_64-mm-getcpu-vsyscall.patch which breaks
compilation without SMP and is not obviously fixable.
I think you can safely revert it.
Greetings,
Rafael
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single)
2006-07-09 20:39 ` Rafael J. Wysocki
@ 2006-07-09 21:03 ` Andrew Morton
2006-07-09 22:37 ` Rafael J. Wysocki
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2006-07-09 21:03 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: gregoire.favre, linux-kernel, ak, Vojtech Pavlik
On Sun, 9 Jul 2006 22:39:48 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> On Sunday 09 July 2006 13:49, Gregoire Favre wrote:
> > Hello,
> >
> > can't compil it :
> >
> > CHK include/linux/compile.h
> > UPD include/linux/compile.h
> > CC init/version.o
> > LD init/built-in.o
> > LD .tmp_vmlinux1
> > arch/x86_64/kernel/built-in.o: In function `vsyscall_set_cpu':
> > (.init.text+0x1e87): undefined reference to `smp_call_function_single'
> > make: *** [.tmp_vmlinux1] Error 1
>
> This is because of x86_64-mm-getcpu-vsyscall.patch which breaks
> compilation without SMP and is not obviously fixable.
Is it not as simple as adding a !SMP implementation of
smp_call_function_single(), which just calls the thing?
> I think you can safely revert it.
That works, too.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single)
2006-07-09 21:03 ` Andrew Morton
@ 2006-07-09 22:37 ` Rafael J. Wysocki
2006-07-09 22:44 ` Andrew Morton
0 siblings, 1 reply; 10+ messages in thread
From: Rafael J. Wysocki @ 2006-07-09 22:37 UTC (permalink / raw)
To: Andrew Morton; +Cc: gregoire.favre, linux-kernel, ak, Vojtech Pavlik
On Sunday 09 July 2006 23:03, Andrew Morton wrote:
> On Sun, 9 Jul 2006 22:39:48 +0200
> "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
>
> > On Sunday 09 July 2006 13:49, Gregoire Favre wrote:
> > > Hello,
> > >
> > > can't compil it :
> > >
> > > CHK include/linux/compile.h
> > > UPD include/linux/compile.h
> > > CC init/version.o
> > > LD init/built-in.o
> > > LD .tmp_vmlinux1
> > > arch/x86_64/kernel/built-in.o: In function `vsyscall_set_cpu':
> > > (.init.text+0x1e87): undefined reference to `smp_call_function_single'
> > > make: *** [.tmp_vmlinux1] Error 1
> >
> > This is because of x86_64-mm-getcpu-vsyscall.patch which breaks
> > compilation without SMP and is not obviously fixable.
>
> Is it not as simple as adding a !SMP implementation of
> smp_call_function_single(), which just calls the thing?
Like this:
arch/x86_64/kernel/vsyscall.c | 6 ++++++
1 files changed, 6 insertions(+)
Index: linux-2.6.18-rc1-mm1/arch/x86_64/kernel/vsyscall.c
===================================================================
--- linux-2.6.18-rc1-mm1.orig/arch/x86_64/kernel/vsyscall.c
+++ linux-2.6.18-rc1-mm1/arch/x86_64/kernel/vsyscall.c
@@ -241,10 +241,12 @@ static ctl_table kernel_root_table2[] =
#endif
+#ifdef CONFIG_SMP
static void __cpuinit write_rdtscp_cb(void *info)
{
write_rdtscp_aux((unsigned long)info);
}
+#endif
void __cpuinit vsyscall_set_cpu(int cpu)
{
@@ -254,10 +256,14 @@ void __cpuinit vsyscall_set_cpu(int cpu)
node = cpu_to_node[cpu];
#endif
if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) {
+#ifdef CONFIG_SMP
/* 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);
+#else
+ write_rdtscp_aux(0);
+#endif
}
/* Store cpu number in limit so that it can be loaded quickly
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single)
2006-07-09 22:37 ` Rafael J. Wysocki
@ 2006-07-09 22:44 ` Andrew Morton
2006-07-10 0:08 ` Andi Kleen
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2006-07-09 22:44 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: gregoire.favre, linux-kernel, ak, vojtech
On Mon, 10 Jul 2006 00:37:14 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> On Sunday 09 July 2006 23:03, Andrew Morton wrote:
> > On Sun, 9 Jul 2006 22:39:48 +0200
> > "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> >
> > > On Sunday 09 July 2006 13:49, Gregoire Favre wrote:
> > > > Hello,
> > > >
> > > > can't compil it :
> > > >
> > > > CHK include/linux/compile.h
> > > > UPD include/linux/compile.h
> > > > CC init/version.o
> > > > LD init/built-in.o
> > > > LD .tmp_vmlinux1
> > > > arch/x86_64/kernel/built-in.o: In function `vsyscall_set_cpu':
> > > > (.init.text+0x1e87): undefined reference to `smp_call_function_single'
> > > > make: *** [.tmp_vmlinux1] Error 1
> > >
> > > This is because of x86_64-mm-getcpu-vsyscall.patch which breaks
> > > compilation without SMP and is not obviously fixable.
> >
> > Is it not as simple as adding a !SMP implementation of
> > smp_call_function_single(), which just calls the thing?
>
> Like this:
>
> arch/x86_64/kernel/vsyscall.c | 6 ++++++
> 1 files changed, 6 insertions(+)
>
> Index: linux-2.6.18-rc1-mm1/arch/x86_64/kernel/vsyscall.c
> ===================================================================
> --- linux-2.6.18-rc1-mm1.orig/arch/x86_64/kernel/vsyscall.c
> +++ linux-2.6.18-rc1-mm1/arch/x86_64/kernel/vsyscall.c
> @@ -241,10 +241,12 @@ static ctl_table kernel_root_table2[] =
>
> #endif
>
> +#ifdef CONFIG_SMP
> static void __cpuinit write_rdtscp_cb(void *info)
> {
> write_rdtscp_aux((unsigned long)info);
> }
> +#endif
>
> void __cpuinit vsyscall_set_cpu(int cpu)
> {
> @@ -254,10 +256,14 @@ void __cpuinit vsyscall_set_cpu(int cpu)
> node = cpu_to_node[cpu];
> #endif
> if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) {
> +#ifdef CONFIG_SMP
> /* 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);
> +#else
> + write_rdtscp_aux(0);
> +#endif
> }
>
> /* Store cpu number in limit so that it can be loaded quickly
I meant, in smp.h:
#else /* CONFIG_SMP */
#define smp_call_function_single(cpu, fn, arg, x, y) fn(arg)
#endif /* CONFIG_SMP */
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single)
2006-07-09 22:44 ` Andrew Morton
@ 2006-07-10 0:08 ` Andi Kleen
0 siblings, 0 replies; 10+ messages in thread
From: Andi Kleen @ 2006-07-10 0:08 UTC (permalink / raw)
To: Andrew Morton; +Cc: Rafael J. Wysocki, gregoire.favre, linux-kernel, vojtech
> > Like this:
> >
> > arch/x86_64/kernel/vsyscall.c | 6 ++++++
> > 1 files changed, 6 insertions(+)
Sorry will do a proper patch.
-Andi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single)
@ 2006-07-10 1:49 Chuck Ebbert
2006-07-10 2:25 ` Andi Kleen
0 siblings, 1 reply; 10+ messages in thread
From: Chuck Ebbert @ 2006-07-10 1:49 UTC (permalink / raw)
To: Andrew Morton
Cc: gregoire.favre, linux-kernel, Andi Kleen, Vojtech Pavlik,
Rafael J. Wysocki
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single)
2006-07-10 1:49 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single) Chuck Ebbert
@ 2006-07-10 2:25 ` Andi Kleen
0 siblings, 0 replies; 10+ messages in thread
From: Andi Kleen @ 2006-07-10 2:25 UTC (permalink / raw)
To: Chuck Ebbert
Cc: Andrew Morton, gregoire.favre, linux-kernel, Vojtech Pavlik,
Rafael J. Wysocki
On Monday 10 July 2006 03:49, Chuck Ebbert wrote:
> 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 have a full patch to be mirrored out soon.
Your patch is still wrong because now it won't be initialized on the BP
>
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-07-10 2:25 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-10 1:49 2.6.18-rc1-mm1 fails on amd64 (smp_call_function_single) Chuck Ebbert
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox