* [PATCH -tip] perf_counter/x86: Remove masking and unmasking of LVT error register.
@ 2009-05-28 7:16 Yong Wang
2009-05-28 8:33 ` Ingo Molnar
0 siblings, 1 reply; 4+ messages in thread
From: Yong Wang @ 2009-05-28 7:16 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel
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);
}
static int __kprobes
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -tip] perf_counter/x86: Remove masking and unmasking of LVT error register.
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
2009-05-29 5:37 ` Yong Wang
0 siblings, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2009-05-28 8:33 UTC (permalink / raw)
To: Yong Wang; +Cc: linux-kernel
* 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -tip] perf_counter/x86: Remove masking and unmasking of LVT error register.
2009-05-28 8:33 ` Ingo Molnar
@ 2009-05-29 5:37 ` Yong Wang
2009-05-29 7:37 ` Ingo Molnar
0 siblings, 1 reply; 4+ messages in thread
From: Yong Wang @ 2009-05-29 5:37 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel
On Thu, May 28, 2009 at 10:33:40AM +0200, Ingo Molnar wrote:
> i'd suggest to remove the 'nmi' parameter as well to this function.
Thanks for the comment. Just resubmitted a new patch removing the 'nmi'
parameter.
> (and any other dynamic flags that deal with nmi/irq distinctions)
Just wanna make sure before moving on. You want to remove things like
the 'nmi' field in perf_counter_hw_event and hw_perf_counter structs and
the 'nmi' parameter of perf_counter_overflow and perf_swcounter_event
functions, etc. Right?
Thanks
-Yong
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -tip] perf_counter/x86: Remove masking and unmasking of LVT error register.
2009-05-29 5:37 ` Yong Wang
@ 2009-05-29 7:37 ` Ingo Molnar
0 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2009-05-29 7:37 UTC (permalink / raw)
To: Yong Wang, Peter Zijlstra, Paul Mackerras; +Cc: linux-kernel
* Yong Wang <yong.y.wang@linux.intel.com> wrote:
> On Thu, May 28, 2009 at 10:33:40AM +0200, Ingo Molnar wrote:
> > i'd suggest to remove the 'nmi' parameter as well to this function.
>
> Thanks for the comment. Just resubmitted a new patch removing the
> 'nmi' parameter.
applied, thanks!
> > (and any other dynamic flags that deal with nmi/irq
> > distinctions)
>
> Just wanna make sure before moving on. You want to remove things
> like the 'nmi' field in perf_counter_hw_event and hw_perf_counter
> structs and the 'nmi' parameter of perf_counter_overflow and
> perf_swcounter_event functions, etc. Right?
yes, that too.
Ingo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-29 7:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2009-05-29 5:37 ` Yong Wang
2009-05-29 7:37 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).