mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* vread_tsc() compile error (post 2.6.26)
@ 2008-07-15 19:47 Dave Hansen
  2008-07-15 20:11 ` Thomas Gleixner
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Hansen @ 2008-07-15 19:47 UTC (permalink / raw)
  To: mingo
  Cc: Thomas Gleixner, linux-kernel, Alok N Kataria, Alok N Kataria, Dan Hecht

$ git describe
v2.6.26-2465-g1c0fea9

This looks like it was caused by:

	8fbbc4b45ce3e4c0eeb15004c79c72b6896a79c2

Did this get any testing on x86-32?  It looks like this symbol has no
32-bit equivalent.

...
  MODPOST vmlinux.o
WARNING: modpost: Found 11 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
arch/x86/kernel/built-in.o: In function `vread_tsc':
/home/dave/kernels/linux-2.6.git/arch/x86/kernel/tsc.c:365: undefined reference to `__vsyscall_gtod_data'
/home/dave/kernels/linux-2.6.git/arch/x86/kernel/tsc.c:365: undefined reference to `__vsyscall_gtod_data'
make: *** [.tmp_vmlinux1] Error 1

My config:

http://sr71.net/~dave/linux/config-2.6.26-rc8-00089-ge1441b9


-- Dave


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: vread_tsc() compile error (post 2.6.26)
  2008-07-15 19:47 vread_tsc() compile error (post 2.6.26) Dave Hansen
@ 2008-07-15 20:11 ` Thomas Gleixner
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2008-07-15 20:11 UTC (permalink / raw)
  To: Dave Hansen
  Cc: mingo, linux-kernel, Alok N Kataria, Alok N Kataria, Dan Hecht

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2087 bytes --]

On Tue, 15 Jul 2008, Dave Hansen wrote:
> $ git describe
> v2.6.26-2465-g1c0fea9
> 
> This looks like it was caused by:
> 
> 	8fbbc4b45ce3e4c0eeb15004c79c72b6896a79c2
> 
> Did this get any testing on x86-32?  It looks like this symbol has no
> 32-bit equivalent.

Doh, that's odd. It compiles, links and boots here. Looks like the my gcc just
optimizes it out without the usual "...., but not used warning"

Patch below.

Thanks,

	tglx

> ...
>   MODPOST vmlinux.o
> WARNING: modpost: Found 11 section mismatch(es).
> To see full details build your kernel with:
> 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
>   GEN     .version
>   CHK     include/linux/compile.h
>   UPD     include/linux/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      .tmp_vmlinux1
> arch/x86/kernel/built-in.o: In function `vread_tsc':
> /home/dave/kernels/linux-2.6.git/arch/x86/kernel/tsc.c:365: undefined reference to `__vsyscall_gtod_data'
> /home/dave/kernels/linux-2.6.git/arch/x86/kernel/tsc.c:365: undefined reference to `__vsyscall_gtod_data'
> make: *** [.tmp_vmlinux1] Error 1
> 
> My config:
> 
> http://sr71.net/~dave/linux/config-2.6.26-rc8-00089-ge1441b9

----------------->

Subject: x86: fix tsc unification fallout
From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue, 15 Jul 2008 22:08:04 +0200

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/kernel/tsc.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6/arch/x86/kernel/tsc.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/tsc.c
+++ linux-2.6/arch/x86/kernel/tsc.c
@@ -358,6 +358,7 @@ static cycle_t read_tsc(void)
 		ret : clocksource_tsc.cycle_last;
 }
 
+#ifdef CONFIG_X86_64
 static cycle_t __vsyscall_fn vread_tsc(void)
 {
 	cycle_t ret = (cycle_t)vget_cycles();
@@ -365,6 +366,7 @@ static cycle_t __vsyscall_fn vread_tsc(v
 	return ret >= __vsyscall_gtod_data.clock.cycle_last ?
 		ret : __vsyscall_gtod_data.clock.cycle_last;
 }
+#endif
 
 static struct clocksource clocksource_tsc = {
 	.name                   = "tsc",

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-15 20:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-15 19:47 vread_tsc() compile error (post 2.6.26) Dave Hansen
2008-07-15 20:11 ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®