Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 370813
b: refs/heads/master
c: 7a78683
h: refs/heads/master
i:
  370811: 1da5812
v: v3
  • Loading branch information
Michael Ellerman authored and Benjamin Herrenschmidt committed Apr 26, 2013
1 parent 0624878 commit 2ddbf3a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 240686c1368775b5dc80aae863301189b25f9bfa
refs/heads/master: 7a7868326d77416018e8f3b4c4697a3c57444549
1 change: 1 addition & 0 deletions trunk/arch/powerpc/include/asm/perf_event_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ struct power_pmu {
#define PPMU_NO_SIPR 0x00000004 /* no SIPR/HV in MMCRA at all */
#define PPMU_NO_CONT_SAMPLING 0x00000008 /* no continuous sampling */
#define PPMU_SIAR_VALID 0x00000010 /* Processor has SIAR Valid bit */
#define PPMU_HAS_SSLOT 0x00000020 /* Has sampled slot in MMCRA */

/*
* Values for flags to get_alternatives()
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/perf/core-book3s.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,12 @@ static inline unsigned long perf_ip_adjust(struct pt_regs *regs)
{
unsigned long mmcra = regs->dsisr;

if ((mmcra & MMCRA_SAMPLE_ENABLE) && !(ppmu->flags & PPMU_ALT_SIPR)) {
if ((ppmu->flags & PPMU_HAS_SSLOT) && (mmcra & MMCRA_SAMPLE_ENABLE)) {
unsigned long slot = (mmcra & MMCRA_SLOT) >> MMCRA_SLOT_SHIFT;
if (slot > 1)
return 4 * (slot - 1);
}

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/perf/power5+-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ static struct power_pmu power5p_pmu = {
.get_alternatives = power5p_get_alternatives,
.disable_pmc = power5p_disable_pmc,
.limited_pmc_event = power5p_limited_pmc_event,
.flags = PPMU_LIMITED_PMC5_6,
.flags = PPMU_LIMITED_PMC5_6 | PPMU_HAS_SSLOT,
.n_generic = ARRAY_SIZE(power5p_generic_events),
.generic_events = power5p_generic_events,
.cache_events = &power5p_cache_events,
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/perf/power5-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ static struct power_pmu power5_pmu = {
.n_generic = ARRAY_SIZE(power5_generic_events),
.generic_events = power5_generic_events,
.cache_events = &power5_cache_events,
.flags = PPMU_HAS_SSLOT,
};

static int __init init_power5_pmu(void)
Expand Down

0 comments on commit 2ddbf3a

Please sign in to comment.