public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: don't use mcount in pvclock.c
@ 2010-09-23  0:07 Jeremy Fitzhardinge
  2010-09-23  0:34 ` Steven Rostedt
  2010-09-23  7:22 ` [tip:perf/urgent] tracing/x86: Don't " tip-bot for Jeremy Fitzhardinge
  0 siblings, 2 replies; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2010-09-23  0:07 UTC (permalink / raw)
  To: the arch/x86 maintainers
  Cc: Steven Rostedt, Linux Kernel Mailing List,
	Xen-devel@lists.xensource.com



When using a paravirt clock, pvclock.c can be used by sched_clock(),
which in turn is used by the tracing mechanism for timestamps,
which leads to infinite recursion.

Disable mcount/tracing for pvclock.o.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index f3477bb..35b447c 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -11,6 +11,7 @@ ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_tsc.o = -pg
 CFLAGS_REMOVE_rtc.o = -pg
 CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
+CFLAGS_REMOVE_pvclock.o = -pg
 CFLAGS_REMOVE_ftrace.o = -pg
 CFLAGS_REMOVE_early_printk.o = -pg
 endif



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

* Re: [PATCH] x86: don't use mcount in pvclock.c
  2010-09-23  0:07 [PATCH] x86: don't use mcount in pvclock.c Jeremy Fitzhardinge
@ 2010-09-23  0:34 ` Steven Rostedt
  2010-09-23  7:22 ` [tip:perf/urgent] tracing/x86: Don't " tip-bot for Jeremy Fitzhardinge
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2010-09-23  0:34 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: the arch/x86 maintainers, Linux Kernel Mailing List,
	Xen-devel@lists.xensource.com

Crap!

I fixed this back on 7/1/2010 from a RHEL bugzilla report, and forgot to
push it mainline. This also requires kvmclock.o to have the -pg as well.

I'll add your patch and add the kvmclock.o too.

Thanks,

-- Steve


On Wed, 2010-09-22 at 17:07 -0700, Jeremy Fitzhardinge wrote:
> 
> When using a paravirt clock, pvclock.c can be used by sched_clock(),
> which in turn is used by the tracing mechanism for timestamps,
> which leads to infinite recursion.
> 
> Disable mcount/tracing for pvclock.o.
> 
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
> 
> diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
> index f3477bb..35b447c 100644
> --- a/arch/x86/kernel/Makefile
> +++ b/arch/x86/kernel/Makefile
> @@ -11,6 +11,7 @@ ifdef CONFIG_FUNCTION_TRACER
>  CFLAGS_REMOVE_tsc.o = -pg
>  CFLAGS_REMOVE_rtc.o = -pg
>  CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
> +CFLAGS_REMOVE_pvclock.o = -pg
>  CFLAGS_REMOVE_ftrace.o = -pg
>  CFLAGS_REMOVE_early_printk.o = -pg
>  endif
> 



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

* [tip:perf/urgent] tracing/x86: Don't use mcount in pvclock.c
  2010-09-23  0:07 [PATCH] x86: don't use mcount in pvclock.c Jeremy Fitzhardinge
  2010-09-23  0:34 ` Steven Rostedt
@ 2010-09-23  7:22 ` tip-bot for Jeremy Fitzhardinge
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jeremy Fitzhardinge @ 2010-09-23  7:22 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, jeremy, hpa, mingo, rostedt, tglx,
	jeremy.fitzhardinge

Commit-ID:  9ecd4e1689208afe9b059a5ce1333acb2f42c4d2
Gitweb:     http://git.kernel.org/tip/9ecd4e1689208afe9b059a5ce1333acb2f42c4d2
Author:     Jeremy Fitzhardinge <jeremy@goop.org>
AuthorDate: Wed, 22 Sep 2010 17:07:27 -0700
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Wed, 22 Sep 2010 23:00:50 -0400

tracing/x86: Don't use mcount in pvclock.c

When using a paravirt clock, pvclock.c can be used by sched_clock(),
which in turn is used by the tracing mechanism for timestamps,
which leads to infinite recursion.

Disable mcount/tracing for pvclock.o.

Cc: stable@kernel.org
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
LKML-Reference: <4C9A9A3F.4040201@goop.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/x86/kernel/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 0925676..882bbff 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -11,6 +11,7 @@ ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_tsc.o = -pg
 CFLAGS_REMOVE_rtc.o = -pg
 CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
+CFLAGS_REMOVE_pvclock.o = -pg
 CFLAGS_REMOVE_ftrace.o = -pg
 CFLAGS_REMOVE_early_printk.o = -pg
 endif

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

end of thread, other threads:[~2010-09-23  7:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-23  0:07 [PATCH] x86: don't use mcount in pvclock.c Jeremy Fitzhardinge
2010-09-23  0:34 ` Steven Rostedt
2010-09-23  7:22 ` [tip:perf/urgent] tracing/x86: Don't " tip-bot for Jeremy Fitzhardinge

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