git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
arm
/
oprofile
/
op_model_xscale.c
diff --git
a/arch/arm/oprofile/op_model_xscale.c
b/arch/arm/oprofile/op_model_xscale.c
index
447653d
..
7c3289c
100644
(file)
--- a/
arch/arm/oprofile/op_model_xscale.c
+++ b/
arch/arm/oprofile/op_model_xscale.c
@@
-20,7
+20,8
@@
#include <linux/sched.h>
#include <linux/oprofile.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/oprofile.h>
#include <linux/interrupt.h>
-#include <asm/irq.h>
+#include <linux/irq.h>
+
#include <asm/system.h>
#include "op_counter.h"
#include <asm/system.h>
#include "op_counter.h"
@@
-33,14
+34,14
@@
#define PMU_CNT64 0x008 /* Make CCNT count every 64th cycle */
/* TODO do runtime detection */
#define PMU_CNT64 0x008 /* Make CCNT count every 64th cycle */
/* TODO do runtime detection */
-#ifdef CONFIG_ARCH_IOP3
10
-#define XSCALE_PMU_IRQ IRQ_
XS80200
_PMU
+#ifdef CONFIG_ARCH_IOP3
2X
+#define XSCALE_PMU_IRQ IRQ_
IOP32X_CORE
_PMU
#endif
#endif
-#ifdef CONFIG_ARCH_IOP3
21
-#define XSCALE_PMU_IRQ IRQ_IOP3
21
_CORE_PMU
+#ifdef CONFIG_ARCH_IOP3
3X
+#define XSCALE_PMU_IRQ IRQ_IOP3
3X
_CORE_PMU
#endif
#endif
-#ifdef CONFIG_ARCH_
IOP331
-#define XSCALE_PMU_IRQ IRQ_
IOP331_CORE_
PMU
+#ifdef CONFIG_ARCH_
PXA
+#define XSCALE_PMU_IRQ IRQ_PMU
#endif
/*
#endif
/*
@@
-85,7
+86,7
@@
static struct pmu_counter results[MAX_COUNTERS];
/*
* There are two versions of the PMU in current XScale processors
* with differing register layouts and number of performance counters.
/*
* There are two versions of the PMU in current XScale processors
* with differing register layouts and number of performance counters.
- * e.g. IOP32
1 is xsc1 whilst IOP331
is xsc2.
+ * e.g. IOP32
x is xsc1 whilst IOP33x
is xsc2.
* We detect which register layout to use in xscale_detect_pmu()
*/
enum { PMU_XSC1, PMU_XSC2 };
* We detect which register layout to use in xscale_detect_pmu()
*/
enum { PMU_XSC1, PMU_XSC2 };
@@
-305,9
+306,9
@@
static void inline __xsc1_check_ctrs(void)
/* Overflow bit gets cleared. There's no workaround. */
/* Fixed in B stepping or later */
/* Overflow bit gets cleared. There's no workaround. */
/* Fixed in B stepping or later */
- pmnc &= ~(PMU_ENABLE | pmu->cnt_ovf[PMN0] | pmu->cnt_ovf[PMN1] |
- pmu->cnt_ovf[CCNT]);
- write_pmnc(pmnc);
+ /* Write the value back to clear the overflow flags. Overflow */
+ /* flags remain in pmnc for use below */
+ write_pmnc(pmnc
& ~PMU_ENABLE
);
for (i = CCNT; i <= PMN1; i++) {
if (!(pmu->int_mask[i] & pmu->int_enable))
for (i = CCNT; i <= PMN1; i++) {
if (!(pmu->int_mask[i] & pmu->int_enable))
@@
-341,10
+342,9
@@
static void inline __xsc2_check_ctrs(void)
__asm__ __volatile__ ("mcr p14, 0, %0, c5, c1, 0" : : "r" (flag));
}
__asm__ __volatile__ ("mcr p14, 0, %0, c5, c1, 0" : : "r" (flag));
}
-static irqreturn_t xscale_pmu_interrupt(int irq, void *arg
, struct pt_regs *regs
)
+static irqreturn_t xscale_pmu_interrupt(int irq, void *arg)
{
{
- unsigned long pc = profile_pc(regs);
- int i, is_kernel = !user_mode(regs);
+ int i;
u32 pmnc;
if (pmu->id == PMU_XSC1)
u32 pmnc;
if (pmu->id == PMU_XSC1)
@@
-357,7
+357,7
@@
static irqreturn_t xscale_pmu_interrupt(int irq, void *arg, struct pt_regs *regs
continue;
write_counter(i, -(u32)results[i].reset_counter);
continue;
write_counter(i, -(u32)results[i].reset_counter);
- oprofile_add_sample(
pc, is_kernel, i, smp_processor_id()
);
+ oprofile_add_sample(
get_irq_regs(), i
);
results[i].ovf--;
}
results[i].ovf--;
}
@@
-382,7
+382,7
@@
static int xscale_pmu_start(void)
int ret;
u32 pmnc = read_pmnc();
int ret;
u32 pmnc = read_pmnc();
- ret = request_irq(XSCALE_PMU_IRQ, xscale_pmu_interrupt,
SA_INTERRUPT
,
+ ret = request_irq(XSCALE_PMU_IRQ, xscale_pmu_interrupt,
IRQF_DISABLED
,
"XScale PMU", (void *)results);
if (ret < 0) {
"XScale PMU", (void *)results);
if (ret < 0) {