powerpc/perf: Add an explict flag indicating presence of SLOT field
[deliverable/linux.git] / arch / powerpc / perf / core-book3s.c
index 65362e98eb263cdf84ad61bb7f154598c9c5e3a4..eb644806f00e3dc243b6b0a0cba3eca4fd6e6387 100644 (file)
@@ -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;
 }
 
This page took 0.024885 seconds and 5 git commands to generate.