Commit 7de09205 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] oprofile: add Pentium Mobile support

From: Philippe Elie <phil.el@wanadoo.fr>

From: Will Cohen <wcohen@redhat.com>

Add oprofile support for Pentium Mobile (P6 core).  Pentium Mobile needs to
unmask LVPTC vector, since it doesn't hurt other P6 core based cpus we do
it unconditionally for all these.

This patch require userspace tools >= 0.8 (only in sourceforge cvs currently)
parent 3a67d0c3
...@@ -333,7 +333,9 @@ static int __init ppro_init(void) ...@@ -333,7 +333,9 @@ static int __init ppro_init(void)
if (cpu_model > 0xd) if (cpu_model > 0xd)
return 0; return 0;
if (cpu_model > 5) { if (cpu_model == 9) {
nmi_ops.cpu_type = "i386/p6_mobile";
} else if (cpu_model > 5) {
nmi_ops.cpu_type = "i386/piii"; nmi_ops.cpu_type = "i386/piii";
} else if (cpu_model > 2) { } else if (cpu_model > 2) {
nmi_ops.cpu_type = "i386/pii"; nmi_ops.cpu_type = "i386/pii";
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/oprofile.h> #include <linux/oprofile.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/msr.h> #include <asm/msr.h>
#include <asm/apic.h>
#include "op_x86_model.h" #include "op_x86_model.h"
#include "op_counter.h" #include "op_counter.h"
...@@ -101,6 +102,10 @@ static int ppro_check_ctrs(unsigned int const cpu, ...@@ -101,6 +102,10 @@ static int ppro_check_ctrs(unsigned int const cpu,
} }
} }
/* Only P6 based Pentium M need to re-unmask the apic vector but it
* doesn't hurt other P6 variant */
apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED);
/* We can't work out if we really handled an interrupt. We /* We can't work out if we really handled an interrupt. We
* might have caught a *second* counter just after overflowing * might have caught a *second* counter just after overflowing
* the interrupt for this counter then arrives * the interrupt for this counter then arrives
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment