diff options
author | David S. Miller <davem@davemloft.net> | 2009-11-19 01:19:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-19 01:19:03 -0500 |
commit | 3505d1a9fd65e2d3e00827857b6795d9d8983658 (patch) | |
tree | 941cfafdb57c427bb6b7ebf6354ee93b2a3693b5 /arch/powerpc/kernel/perf_event.c | |
parent | dfef948ed2ba69cf041840b5e860d6b4e16fa0b1 (diff) | |
parent | 66b00a7c93ec782d118d2c03bd599cfd041e80a1 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/sfc/sfe4001.c
drivers/net/wireless/libertas/cmd.c
drivers/staging/Kconfig
drivers/staging/Makefile
drivers/staging/rtl8187se/Kconfig
drivers/staging/rtl8192e/Kconfig
Diffstat (limited to 'arch/powerpc/kernel/perf_event.c')
-rw-r--r-- | arch/powerpc/kernel/perf_event.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c index bbcbae183e92..87f1663584b0 100644 --- a/arch/powerpc/kernel/perf_event.c +++ b/arch/powerpc/kernel/perf_event.c | |||
@@ -116,20 +116,23 @@ static inline void perf_get_data_addr(struct pt_regs *regs, u64 *addrp) | |||
116 | static inline u32 perf_get_misc_flags(struct pt_regs *regs) | 116 | static inline u32 perf_get_misc_flags(struct pt_regs *regs) |
117 | { | 117 | { |
118 | unsigned long mmcra = regs->dsisr; | 118 | unsigned long mmcra = regs->dsisr; |
119 | unsigned long sihv = MMCRA_SIHV; | ||
120 | unsigned long sipr = MMCRA_SIPR; | ||
119 | 121 | ||
120 | if (TRAP(regs) != 0xf00) | 122 | if (TRAP(regs) != 0xf00) |
121 | return 0; /* not a PMU interrupt */ | 123 | return 0; /* not a PMU interrupt */ |
122 | 124 | ||
123 | if (ppmu->flags & PPMU_ALT_SIPR) { | 125 | if (ppmu->flags & PPMU_ALT_SIPR) { |
124 | if (mmcra & POWER6_MMCRA_SIHV) | 126 | sihv = POWER6_MMCRA_SIHV; |
125 | return PERF_RECORD_MISC_HYPERVISOR; | 127 | sipr = POWER6_MMCRA_SIPR; |
126 | return (mmcra & POWER6_MMCRA_SIPR) ? | ||
127 | PERF_RECORD_MISC_USER : PERF_RECORD_MISC_KERNEL; | ||
128 | } | 128 | } |
129 | if (mmcra & MMCRA_SIHV) | 129 | |
130 | /* PR has priority over HV, so order below is important */ | ||
131 | if (mmcra & sipr) | ||
132 | return PERF_RECORD_MISC_USER; | ||
133 | if ((mmcra & sihv) && (freeze_events_kernel != MMCR0_FCHV)) | ||
130 | return PERF_RECORD_MISC_HYPERVISOR; | 134 | return PERF_RECORD_MISC_HYPERVISOR; |
131 | return (mmcra & MMCRA_SIPR) ? PERF_RECORD_MISC_USER : | 135 | return PERF_RECORD_MISC_KERNEL; |
132 | PERF_RECORD_MISC_KERNEL; | ||
133 | } | 136 | } |
134 | 137 | ||
135 | /* | 138 | /* |