From: Ingo Molnar <mingo@elte.hu>
To: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] perfcounters: abstract wakeup flag setting in core to fix powerpc build
Date: Wed, 18 Mar 2009 13:12:46 +0100 [thread overview]
Message-ID: <20090318121246.GA4587@elte.hu> (raw)
In-Reply-To: <18878.10058.953388.356531@cargo.ozlabs.ibm.com>
* Paul Mackerras <paulus@samba.org> wrote:
> Impact: build fix for powerpc
>
> Commit bd753921015e7905 ("perf_counter: software counter event
> infrastructure") introduced a use of TIF_PERF_COUNTERS into the core
> perfcounter code. This breaks the build on powerpc because we use
> a flag in a per-cpu area to signal wakeups on powerpc rather than
> a thread_info flag, because the thread_info flags have to be
> manipulated with atomic operations and are thus slower than per-cpu
> flags.
>
> This fixes the by changing the core to use an abstracted
> set_perf_counter_pending() function, which is defined on x86 to set
> the TIF_PERF_COUNTERS flag and on powerpc to set the per-cpu flag
> (paca->perf_counter_pending). It changes the previous powerpc
> definition of set_perf_counter_pending to not take an argument and
> adds a clear_perf_counter_pending, so as to simplify the definition
> on x86.
>
> On x86, set_perf_counter_pending() is defined as a macro. Defining
> it as a static inline in arch/x86/include/asm/perf_counters.h causes
> compile failures because <asm/perf_counters.h> gets included early in
> <linux/sched.h>, and the definitions of set_tsk_thread_flag etc. are
> therefore not available in <asm/perf_counters.h>. (On powerpc this
> problem is avoided by defining set_perf_counter_pending etc. in
> <asm/hw_irq.h>.)
>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
> ---
> This is in the master branch of my perfcounters.git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/paulus/perfcounters.git master
>
> arch/powerpc/include/asm/hw_irq.h | 14 +++++++++++---
> arch/powerpc/kernel/irq.c | 11 +++--------
> arch/powerpc/kernel/perf_counter.c | 3 +--
> arch/x86/include/asm/perf_counter.h | 3 +++
> kernel/perf_counter.c | 2 +-
> 5 files changed, 19 insertions(+), 14 deletions(-)
Pulled, thanks Paul!
Ingo
prev parent reply other threads:[~2009-03-18 12:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-16 10:17 [PATCH] perfcounters: abstract wakeup flag setting in core to fix powerpc build Paul Mackerras
2009-03-18 12:12 ` Ingo Molnar [this message]
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=20090318121246.GA4587@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
/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.