* [PATCH][2.6] Oprofile, fix nmi_timer_int detection
@ 2004-02-08 21:22 Zwane Mwaikambo
2004-02-11 16:48 ` Philippe Elie
0 siblings, 1 reply; 2+ messages in thread
From: Zwane Mwaikambo @ 2004-02-08 21:22 UTC (permalink / raw)
To: Linux Kernel; +Cc: Philippe Elie
The nmi_timer_int oprofile driver was enabling itself unconditionally if
an SMP kernel was being used on a UP system without an IOAPIC.
Tested on a P5 using NMI timer int driver and UP system using timer int
driver both running an SMP kernel.
Index: linux-2.6.2/arch/i386/kernel/nmi.c
===================================================================
RCS file: /home/cvsroot/linux-2.6.2/arch/i386/kernel/nmi.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 nmi.c
--- linux-2.6.2/arch/i386/kernel/nmi.c 4 Feb 2004 07:43:40 -0000 1.1.1.1
+++ linux-2.6.2/arch/i386/kernel/nmi.c 5 Feb 2004 21:49:58 -0000
@@ -42,7 +42,7 @@ extern void show_registers(struct pt_reg
* be enabled
* -1: the lapic NMI watchdog is disabled, but can be enabled
*/
-static int nmi_active;
+int nmi_active;
#define K7_EVNTSEL_ENABLE (1 << 22)
#define K7_EVNTSEL_INT (1 << 20)
@@ -462,6 +462,7 @@ void nmi_watchdog_tick (struct pt_regs *
}
}
+EXPORT_SYMBOL(nmi_active);
EXPORT_SYMBOL(nmi_watchdog);
EXPORT_SYMBOL(disable_lapic_nmi_watchdog);
EXPORT_SYMBOL(enable_lapic_nmi_watchdog);
Index: linux-2.6.2/arch/i386/oprofile/nmi_timer_int.c
===================================================================
RCS file: /home/cvsroot/linux-2.6.2/arch/i386/oprofile/nmi_timer_int.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 nmi_timer_int.c
--- linux-2.6.2/arch/i386/oprofile/nmi_timer_int.c 4 Feb 2004 07:43:41 -0000 1.1.1.1
+++ linux-2.6.2/arch/i386/oprofile/nmi_timer_int.c 5 Feb 2004 18:45:04 -0000
@@ -48,9 +48,13 @@ static struct oprofile_operations nmi_ti
.cpu_type = "timer"
};
-
int __init nmi_timer_init(struct oprofile_operations ** ops)
{
+ extern int nmi_active;
+
+ if (nmi_active <= 0)
+ return -ENODEV;
+
*ops = &nmi_timer_ops;
printk(KERN_INFO "oprofile: using NMI timer interrupt.\n");
return 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][2.6] Oprofile, fix nmi_timer_int detection
2004-02-08 21:22 [PATCH][2.6] Oprofile, fix nmi_timer_int detection Zwane Mwaikambo
@ 2004-02-11 16:48 ` Philippe Elie
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Elie @ 2004-02-11 16:48 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linux Kernel, Zwane Mwaikambo
On Sun, 08 Feb 2004 at 16:22 +0000, Zwane Mwaikambo wrote:
> The nmi_timer_int oprofile driver was enabling itself unconditionally if
> an SMP kernel was being used on a UP system without an IOAPIC.
>
> Tested on a P5 using NMI timer int driver and UP system using timer int
> driver both running an SMP kernel.
hi, Andrew these patch are fine for me:
bug fix form nmi_timer_int:
http://marc.theaimsgroup.com/?l=linux-kernel&m=107627563717267&q=raw
adding timer_int suport for ARM, people wanting to test it needs oprofile
from CVS:
http://marc.theaimsgroup.com/?l=linux-kernel&m=107627563718724&q=raw
regards,
Phil
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-11 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-08 21:22 [PATCH][2.6] Oprofile, fix nmi_timer_int detection Zwane Mwaikambo
2004-02-11 16:48 ` Philippe Elie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox