From: Ingo Molnar <mingo@elte.hu>
To: Yong Wang <yong.y.wang@linux.intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH -tip] perf_counter/x86: Remove masking and unmasking of LVT error register.
Date: Thu, 28 May 2009 10:33:40 +0200 [thread overview]
Message-ID: <20090528083340.GA7530@elte.hu> (raw)
In-Reply-To: <20090528071655.GA21039@ywang-moblin2.bj.intel.com>
* Yong Wang <yong.y.wang@linux.intel.com> wrote:
> Masking and unmasking of LVT error register become unnecessary as
> NMI mode will be used all the time.
>
> Signed-off-by: Yong Wang <yong.y.wang@intel.com>
>
> ---
> perf_counter.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
> index 2eeaa99..444bcf2 100644
> --- a/arch/x86/kernel/cpu/perf_counter.c
> +++ b/arch/x86/kernel/cpu/perf_counter.c
> @@ -865,22 +865,16 @@ void set_perf_counter_pending(void)
>
> void perf_counters_lapic_init(int nmi)
> {
> - u32 apic_val;
> -
> if (!x86_pmu_initialized())
> return;
>
> /*
> * Enable the performance counter vector in the APIC LVT:
> */
> - apic_val = apic_read(APIC_LVTERR);
> -
> - apic_write(APIC_LVTERR, apic_val | APIC_LVT_MASKED);
> if (nmi)
> apic_write(APIC_LVTPC, APIC_DM_NMI);
> else
> apic_write(APIC_LVTPC, LOCAL_PERF_VECTOR);
> - apic_write(APIC_LVTERR, apic_val);
> }
i'd suggest to remove the 'nmi' parameter as well to this function.
(and any other dynamic flags that deal with nmi/irq distinctions)
Ingo
next prev parent reply other threads:[~2009-05-28 8:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 7:16 [PATCH -tip] perf_counter/x86: Remove masking and unmasking of LVT error register Yong Wang
2009-05-28 8:33 ` Ingo Molnar [this message]
2009-05-29 5:37 ` Yong Wang
2009-05-29 7:37 ` Ingo Molnar
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=20090528083340.GA7530@elte.hu \
--to=mingo@elte.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=yong.y.wang@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox