[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090528083340.GA7530@elte.hu>
Date: Thu, 28 May 2009 10:33:40 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Yong Wang <yong.y.wang@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH -tip] perf_counter/x86: Remove masking and unmasking of
LVT error register.
* Yong Wang <yong.y.wang@...ux.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@...el.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists