From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <andi@firstfloor.org>,
Satyam Sharma <satyam.sharma@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [patch] x86_64: fix sched_clock()
Date: Fri, 25 May 2007 10:15:06 +0200 [thread overview]
Message-ID: <1180080906.7348.35.camel@twins> (raw)
In-Reply-To: <20070525075446.GA20140@elte.hu>
On Fri, 2007-05-25 at 09:54 +0200, Ingo Molnar wrote:
> Subject: [patch] x86_64: fix sched_clock()
> From: Ingo Molnar <mingo@elte.hu>
>
> sched_clock() is totally broken on x86_64, because it is not defined by
> the architecture at all! It fell the victim to the opaqueness of
> __attribute__((weak)) and to non-testing.
>
> the i386 version was supposed to be used. This patch fixes that. Booted
> and tested on x86_64 and i386.
>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
This does indeed solve my issue.
> ---
> arch/x86_64/kernel/Makefile | 3 ++-
> include/asm-x86_64/tsc.h | 5 +++++
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> Index: linux-cfs-2.6.22-rc2-mm1.q/arch/x86_64/kernel/Makefile
> ===================================================================
> --- linux-cfs-2.6.22-rc2-mm1.q.orig/arch/x86_64/kernel/Makefile
> +++ linux-cfs-2.6.22-rc2-mm1.q/arch/x86_64/kernel/Makefile
> @@ -9,7 +9,7 @@ obj-y := process.o signal.o entry.o trap
> x8664_ksyms.o i387.o syscall.o vsyscall.o \
> setup64.o bootflag.o e820.o reboot.o quirks.o i8237.o \
> pci-dma.o pci-nommu.o alternative.o hpet.o tsc.o bugs.o \
> - perfctr-watchdog.o
> + perfctr-watchdog.o sched-clock.o
>
> obj-$(CONFIG_STACKTRACE) += stacktrace.o
> obj-$(CONFIG_X86_MCE) += mce.o therm_throt.o
> @@ -49,6 +49,7 @@ obj-y += pcspeaker.o
>
> CFLAGS_vsyscall.o := $(PROFILING) -g0
>
> +sched-clock-y += ../../i386/kernel/sched-clock.o
> therm_throt-y += ../../i386/kernel/cpu/mcheck/therm_throt.o
> bootflag-y += ../../i386/kernel/bootflag.o
> legacy_serial-y += ../../i386/kernel/legacy_serial.o
> Index: linux-cfs-2.6.22-rc2-mm1.q/include/asm-x86_64/tsc.h
> ===================================================================
> --- linux-cfs-2.6.22-rc2-mm1.q.orig/include/asm-x86_64/tsc.h
> +++ linux-cfs-2.6.22-rc2-mm1.q/include/asm-x86_64/tsc.h
> @@ -1 +1,6 @@
> #include <asm-i386/tsc.h>
> +
> +/*
> + * To be able to share sched-clock.c between i386 and x86_64:
> + */
> +#define tsc_disable 0
>
next prev parent reply other threads:[~2007-05-25 8:15 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-25 7:10 [patch] sched_clock(): cleanups Ingo Molnar
2007-05-25 7:22 ` Satyam Sharma
2007-05-25 7:25 ` Ingo Molnar
2007-05-25 7:26 ` Ingo Molnar
2007-05-25 7:35 ` Satyam Sharma
2007-05-25 7:39 ` Peter Zijlstra
2007-05-25 7:58 ` Andi Kleen
2007-05-25 8:02 ` Ingo Molnar
2007-05-25 8:16 ` Peter Zijlstra
2007-05-25 8:21 ` Andi Kleen
2007-05-25 7:38 ` Andi Kleen
2007-05-25 7:31 ` Andi Kleen
2007-05-25 7:39 ` Ingo Molnar
2007-05-25 7:43 ` Ingo Molnar
2007-05-25 7:49 ` Ingo Molnar
2007-05-25 7:54 ` [patch] x86_64: fix sched_clock() Ingo Molnar
2007-05-25 8:02 ` Andi Kleen
2007-05-25 8:04 ` Ingo Molnar
2007-05-25 8:20 ` Andi Kleen
2007-05-25 8:34 ` Ingo Molnar
2007-05-25 8:41 ` Andi Kleen
2007-05-25 8:44 ` Ingo Molnar
2007-05-25 8:45 ` Andi Kleen
2007-05-25 8:55 ` Ingo Molnar
2007-05-25 8:55 ` Andrew Morton
2007-05-25 9:03 ` Andi Kleen
2007-05-25 9:19 ` Ingo Molnar
2007-05-25 9:46 ` Andi Kleen
2007-05-25 10:12 ` Ingo Molnar
2007-05-25 11:20 ` Andi Kleen
2007-05-25 11:26 ` Ingo Molnar
2007-05-25 11:31 ` Ingo Molnar
2007-05-25 11:46 ` [patch] sched_clock: fix preempt count imbalance Ingo Molnar
2007-05-25 11:50 ` [patch] sched_clock(): cleanups, #2 Ingo Molnar
2007-05-25 11:55 ` Andi Kleen
2007-05-25 12:02 ` Ingo Molnar
2007-05-25 12:15 ` Andi Kleen
2007-05-25 16:17 ` Andrew Morton
2007-05-25 16:26 ` Daniel Walker
2007-05-25 16:33 ` Andi Kleen
2007-05-25 16:49 ` Linus Torvalds
2007-05-25 18:08 ` Andi Kleen
2007-05-25 19:14 ` Ingo Molnar
2007-05-25 19:45 ` Linus Torvalds
2007-05-25 10:27 ` [patch] x86_64: fix sched_clock() Ingo Molnar
2007-05-25 11:05 ` Andi Kleen
2007-05-28 3:12 ` Rusty Russell
2007-05-25 8:08 ` [patch] i386, numaq: enable TSCs again Ingo Molnar
2007-05-25 8:19 ` William Lee Irwin III
2007-05-25 8:22 ` Andi Kleen
2007-05-25 8:25 ` William Lee Irwin III
2007-05-25 8:31 ` Ingo Molnar
2007-05-25 8:38 ` William Lee Irwin III
2007-05-25 8:41 ` Ingo Molnar
2007-05-25 18:16 ` Dave Hansen
2007-05-25 18:23 ` john stultz
2007-05-25 8:15 ` Peter Zijlstra [this message]
2007-05-25 8:16 ` [patch] x86_64: fix sched_clock() Ingo Molnar
2007-05-25 8:22 ` [patch] sched_clock(): cleanups Peter Zijlstra
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=1180080906.7348.35.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=satyam.sharma@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.