x86, perfctr: remove unused func avail_to_resrv_perfctr_nmi()
PATCH 1/1 x86, perfctr: remove unused func avail_to_resrv_perfctr_nmi()
avail_to_resrv_perfctr_nmi() is neither EXPORT'd, nor used in the file. So remove it.
--- arch/x86/include/asm/nmi.h | 1 - arch/x86/kernel/cpu/perfctr-watchdog.c | 11 ----------- 2 files changed, 0 insertions(+), 12 deletions(-)
arch/x86/include/asm/nmi.h +0 -1
@@ -19,7 +19,6 @@ extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);extern int check_nmi_watchdog (void );extern int nmi_watchdog_enabled;extern int avail_to_resrv_perfctr_nmi_bit (unsigned int ); -extern int avail_to_resrv_perfctr_nmi (unsigned int );extern int reserve_perfctr_nmi (unsigned int );extern void release_perfctr_nmi (unsigned int );extern int reserve_evntsel_nmi (unsigned int );
arch/x86/kernel/cpu/perfctr-watchdog.c +0 -11
@@ -115,17 +115,6 @@ int avail_to_resrv_perfctr_nmi_bit(unsigned int counter)return !test_bit (counter, perfctr_nmi_owner); } - -/* checks the an msr for availability */ -int avail_to_resrv_perfctr_nmi (unsigned int msr) -{ -unsigned int counter; - - counter =nmi_perfctr_msr_to_bit (msr); -BUG_ON (counter >NMI_MAX_COUNTER_BITS ); - -return !test_bit (counter, perfctr_nmi_owner); -}EXPORT_SYMBOL (avail_to_resrv_perfctr_nmi_bit);int reserve_perfctr_nmi (unsigned int msr)
Signature · 1 line
1.6.2.2
Quoted 9 lines · Naga Chumbalkar
avail_to_resrv_perfctr_nmi()is neither EXPORT'd, nor used in the file. So remove it.Signed-off-by Naga Chumbalkar <[email protected]>--- arch/x86/include/asm/nmi.h | 1 - arch/x86/kernel/cpu/perfctr-watchdog.c | 11 ----------- 2 files changed, 0 insertions(+), 12 deletions(-)
Hi Naga, this looks good to me! Thanks.
Is there any plans to use this routine in future
so we shouldn't touch this snippet?
-- Cyrill
Quoted 11 lines · Cyrill Gorcunov
Quoted 9 lines · Naga Chumbalkar
avail_to_resrv_perfctr_nmi()is neither EXPORT'd, nor used in the file. So remove it.Signed-off-by Naga Chumbalkar <[email protected]>--- arch/x86/include/asm/nmi.h | 1 - arch/x86/kernel/cpu/perfctr-watchdog.c | 11 ----------- 2 files changed, 0 insertions(+), 12 deletions(-)
Quoted 4 lines
Hi Naga, this looks good to me! Thanks.
Is there any plans to use this routine in future
so we shouldn't touch this snippet?
Not that i know of.
In fact we should transform/migrate the NMI watchdog driver by making it based on a kernel-internal created perf event. (which is what the NMI watchdog really is: a periodic NMI event occuring once per second and running a callback function.)
That would give us NMI watchdog support on all future x86 CPUs, automatically
- without having to extend the arch/x86/kernel/cpu/perfctr-watchdog.c code for it.
Ingo
Quoted 14 lines · Ingo Molnar
Quoted 11 lines · Cyrill Gorcunov
Quoted 9 lines · Naga Chumbalkar
avail_to_resrv_perfctr_nmi()is neither EXPORT'd, nor used in the file. So remove it.Signed-off-by Naga Chumbalkar <[email protected]>--- arch/x86/include/asm/nmi.h | 1 - arch/x86/kernel/cpu/perfctr-watchdog.c | 11 ----------- 2 files changed, 0 insertions(+), 12 deletions(-)
Quoted 6 lines
Quoted 4 lines
Hi Naga, this looks good to me! Thanks.
Is there any plans to use this routine in future
so we shouldn't touch this snippet?Not that i know of.
ok, then we could apply this patch I think, at least for a while.
Quoted 5 lines
In fact we should transform/migrate the NMI watchdog driver by making it based on a kernel-internal created perf event. (which is what the NMI watchdog really is: a periodic NMI event occuring once per second and running a callback function.)
Yes, this would be great. I'll try to find out some time for this task, though no promises :) If someone get it done earlier I would really appreciate.
Quoted 7 lines
That would give us NMI watchdog support on all future x86 CPUs, automatically
- without having to extend thearch/x86/kernel/cpu/perfctr-watchdog.ccode for it.Ingo
-- Cyrill
Quoted 3 lines · Cyrill Gorcunov
Quoted 1 line
Not that i know of.
ok, then we could apply this patch I think, at least for a while.
yeah, i have applied it.
Quoted 8 lines
Quoted 4 lines
In fact we should transform/migrate the NMI watchdog driver by making it based on a kernel-internal created perf event. (which is what the NMI watchdog really is: a periodic NMI event occuring once per second and running a callback function.)
Yes, this would be great. I'll try to find out some time for this task, though no promises :) If someone get it done earlier I would really appreciate.
Feel free to do it. We could do it gradual. Maybe we could also then gradually remove perfctr code for CPU variants that already have perf events support.
Plus later on we could carefully identify bits of APIC support code in perfctr.c and turn those into minimal perf events PMU drivers.
Ingo
[tip:perf/core] x86, perfctr: Remove unused func avail_to_resrv_perfctr_nmi()
In reply to Naga ChumbalkarCommit-ID: fd2a50a0240f5f5b59070474eabd83a85720a406 Gitweb: http://git.kernel.org/tip/fd2a50a0240f5f5b59070474eabd83a85720a406 Author: Naga Chumbalkar <[email protected]> AuthorDate: Thu, 24 Dec 2009 01:54:47 +0000 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 28 Dec 2009 09:36:46 +0100
x86, perfctr: Remove unused func avail_to_resrv_perfctr_nmi()
avail_to_resrv_perfctr_nmi() is neither EXPORT'd, nor used in the file. So remove it.
LKML-Reference: <[email protected]>
--- arch/x86/include/asm/nmi.h | 1 - arch/x86/kernel/cpu/perfctr-watchdog.c | 11 ----------- 2 files changed, 0 insertions(+), 12 deletions(-)
arch/x86/include/asm/nmi.h +0 -1
@@ -19,7 +19,6 @@ extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);extern int check_nmi_watchdog (void );extern int nmi_watchdog_enabled;extern int avail_to_resrv_perfctr_nmi_bit (unsigned int ); -extern int avail_to_resrv_perfctr_nmi (unsigned int );extern int reserve_perfctr_nmi (unsigned int );extern void release_perfctr_nmi (unsigned int );extern int reserve_evntsel_nmi (unsigned int );
arch/x86/kernel/cpu/perfctr-watchdog.c +0 -11
@@ -115,17 +115,6 @@ int avail_to_resrv_perfctr_nmi_bit(unsigned int counter)return !test_bit (counter, perfctr_nmi_owner); } - -/* checks the an msr for availability */ -int avail_to_resrv_perfctr_nmi (unsigned int msr) -{ -unsigned int counter; - - counter =nmi_perfctr_msr_to_bit (msr); -BUG_ON (counter >NMI_MAX_COUNTER_BITS ); - -return !test_bit (counter, perfctr_nmi_owner); -}EXPORT_SYMBOL (avail_to_resrv_perfctr_nmi_bit);int reserve_perfctr_nmi (unsigned int msr)