arm_pmu: Mark expected switch fall-through
PATCH 1/1 arm_pmu: Mark expected switch fall-through
When fall-through warnings was enabled by default the following warning was starting to show up:
../drivers/perf/arm_pmu.c: In function ‘cpu_pm_pmu_notify’:../drivers/perf/arm_pmu.c:726:3: warning: this statement may fall
through [-Wimplicit-fallthrough=]
cpu_pm_pmu_setup(armpmu, cmd); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~../drivers/perf/arm_pmu.c:727:2: note: here
case CPU_PM_ENTER_FAILED:
^~~~
Rework so that the compiler doesn't warn about fall-through.
---
I'm not convinced that this is the correct patch to fix this issue. However, I can't see why we do 'armpmu->start(armpmu);' only in 'case CPU_PM_ENTER_FAILED' and why we not call function cpu_pm_pmu_setup() there also, since in cpu_pm_pmu_setup() has a case prepared for CPU_PM_ENTER_FAILED.
drivers/perf/arm_pmu.c | 1 + 1 file changed, 1 insertion(+)
drivers/perf/arm_pmu.c +1 -0
@@ -724,6 +724,7 @@ static int cpu_pm_pmu_notify(struct notifier_block *b, unsigned long cmd,break ;case CPU_PM_EXIT :cpu_pm_pmu_setup (armpmu, cmd); +/* Fall through */ case CPU_PM_ENTER_FAILED : armpmu->start (armpmu);break ;
Signature · 1 line
2.20.1
Mark Rutland
maintainerQuoted 16 lines · Anders Roxell
When fall-through warnings was enabled by default the following warning was starting to show up:
../drivers/perf/arm_pmu.c: In function ‘cpu_pm_pmu_notify’:../drivers/perf/arm_pmu.c:726:3: warning: this statement may fall
through [-Wimplicit-fallthrough=]cpu_pm_pmu_setup(armpmu, cmd); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/perf/arm_pmu.c:727:2: note: here
caseCPU_PM_ENTER_FAILED:
^~~~Rework so that the compiler doesn't warn about fall-through.
Fixes d93512ef0f0e ("Makefile: Globally enable fall-through warning")Signed-off-by Anders Roxell <[email protected]>
Quoted 7 lines
---
I'm not convinced that this is the correct patch to fix this issue. However, I can't see why we do '
armpmu->start(armpmu);' only in 'caseCPU_PM_ENTER_FAILED' and why we not call functioncpu_pm_pmu_setup()there also, since incpu_pm_pmu_setup()has a case prepared forCPU_PM_ENTER_FAILED.
I agree, think that should be:
case CPU_PM_EXIT: case CPU_PM_ENTER_FAILED: cpu_pm_pmu_setup(armpmu, cmd); armpmu->start(armpmu); break;
... so that we re-start the events before we start the PMU.
That would be a fix for commit:
da4e4f18afe0f372 ("drivers/perf: arm_pmu: implement CPU_PM notifier")
Thanks,
Mark.
Quoted 19 lines
drivers/perf/arm_pmu.c | 1 + 1 file changed, 1 insertion(+)drivers/perf/arm_pmu.c +1
-0@@ -724,6 +724,7 @@ static int cpu_pm_pmu_notify(struct notifier_block *b, unsigned long cmd,break ;case CPU_PM_EXIT :cpu_pm_pmu_setup (armpmu, cmd); +/* Fall through */ case CPU_PM_ENTER_FAILED : armpmu->start (armpmu);break ;Signature · 1 line
2.20.1
Will Deacon
maintainerQuoted 33 lines · Mark Rutland
Quoted 16 lines · Anders Roxell
When fall-through warnings was enabled by default the following warning was starting to show up:
../drivers/perf/arm_pmu.c: In function ‘cpu_pm_pmu_notify’:../drivers/perf/arm_pmu.c:726:3: warning: this statement may fall
through [-Wimplicit-fallthrough=]cpu_pm_pmu_setup(armpmu, cmd); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/perf/arm_pmu.c:727:2: note: here
caseCPU_PM_ENTER_FAILED:
^~~~Rework so that the compiler doesn't warn about fall-through.
Fixes d93512ef0f0e ("Makefile: Globally enable fall-through warning")Signed-off-by Anders Roxell <[email protected]>Quoted 7 lines
---
I'm not convinced that this is the correct patch to fix this issue. However, I can't see why we do '
armpmu->start(armpmu);' only in 'caseCPU_PM_ENTER_FAILED' and why we not call functioncpu_pm_pmu_setup()there also, since incpu_pm_pmu_setup()has a case prepared forCPU_PM_ENTER_FAILED.I agree, think that should be:
case CPU_PM_EXIT: case CPU_PM_ENTER_FAILED: cpu_pm_pmu_setup(armpmu, cmd); armpmu->start(armpmu); break;
Quoted 5 lines
... so that we re-start the events before we start the PMU.
That would be a fix for commit:
da4e4f18afe0f372("drivers/perf:arm_pmu: implementCPU_PMnotifier")
Does seem about right, but I'd like Lorenzo's ack on this.
Will
Lorenzo Pieralisi
Acked-byQuoted 33 lines · Mark Rutland
Quoted 16 lines · Anders Roxell
When fall-through warnings was enabled by default the following warning was starting to show up:
../drivers/perf/arm_pmu.c: In function ‘cpu_pm_pmu_notify’:../drivers/perf/arm_pmu.c:726:3: warning: this statement may fall
through [-Wimplicit-fallthrough=]cpu_pm_pmu_setup(armpmu, cmd); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/perf/arm_pmu.c:727:2: note: here
caseCPU_PM_ENTER_FAILED:
^~~~Rework so that the compiler doesn't warn about fall-through.
Fixes d93512ef0f0e ("Makefile: Globally enable fall-through warning")Signed-off-by Anders Roxell <[email protected]>Quoted 7 lines
---
I'm not convinced that this is the correct patch to fix this issue. However, I can't see why we do '
armpmu->start(armpmu);' only in 'caseCPU_PM_ENTER_FAILED' and why we not call functioncpu_pm_pmu_setup()there also, since incpu_pm_pmu_setup()has a case prepared forCPU_PM_ENTER_FAILED.I agree, think that should be:
case CPU_PM_EXIT: case CPU_PM_ENTER_FAILED: cpu_pm_pmu_setup(armpmu, cmd); armpmu->start(armpmu); break;
Quoted 5 lines
... so that we re-start the events before we start the PMU.
That would be a fix for commit:
da4e4f18afe0f372("drivers/perf:arm_pmu: implementCPU_PMnotifier")
Yes that's correct, apologies. Probably we did not hit it because CPU PM notifier entry failures are a pretty rare event; regardless:
I can send the updated fix, just let me know.
Thanks,
Lorenzo
Quoted 22 lines
Thanks,
Mark.Quoted 19 lines
drivers/perf/arm_pmu.c | 1 + 1 file changed, 1 insertion(+)drivers/perf/arm_pmu.c +1
-0@@ -724,6 +724,7 @@ static int cpu_pm_pmu_notify(struct notifier_block *b, unsigned long cmd,break ;case CPU_PM_EXIT :cpu_pm_pmu_setup (armpmu, cmd); +/* Fall through */ case CPU_PM_ENTER_FAILED : armpmu->start (armpmu);break ;Signature · 1 line
2.20.1
Quoted 38 lines · Lorenzo Pieralisi
Quoted 37 lines · Mark Rutland
Quoted 16 lines · Anders Roxell
When fall-through warnings was enabled by default the following warning was starting to show up:
../drivers/perf/arm_pmu.c: In function ‘cpu_pm_pmu_notify’:../drivers/perf/arm_pmu.c:726:3: warning: this statement may fall
through [-Wimplicit-fallthrough=]cpu_pm_pmu_setup(armpmu, cmd); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/perf/arm_pmu.c:727:2: note: here
caseCPU_PM_ENTER_FAILED:
^~~~Rework so that the compiler doesn't warn about fall-through.
Fixes d93512ef0f0e ("Makefile: Globally enable fall-through warning")Signed-off-by Anders Roxell <[email protected]>Quoted 7 lines
---
I'm not convinced that this is the correct patch to fix this issue. However, I can't see why we do '
armpmu->start(armpmu);' only in 'caseCPU_PM_ENTER_FAILED' and why we not call functioncpu_pm_pmu_setup()there also, since incpu_pm_pmu_setup()has a case prepared forCPU_PM_ENTER_FAILED.I agree, think that should be:
case CPU_PM_EXIT: case CPU_PM_ENTER_FAILED: cpu_pm_pmu_setup(armpmu, cmd); armpmu->start(armpmu); break;... so that we re-start the events before we start the PMU.
That would be a fix for commit:
Quoted 8 lines
Quoted 1 line
da4e4f18afe0f372("drivers/perf:arm_pmu: implementCPU_PMnotifier")Yes that's correct, apologies. Probably we did not hit it because CPU PM notifier entry failures are a pretty rare event; regardless:
I can send the updated fix, just let me know.
I'm not sure what Will wants, but assuming you do so:
Thanks,
Mark.
Will Deacon
maintainerQuoted 44 lines · Mark Rutland
Quoted 43 lines · Lorenzo Pieralisi
Quoted 33 lines · Mark Rutland
Quoted 16 lines · Anders Roxell
When fall-through warnings was enabled by default the following warning was starting to show up:
../drivers/perf/arm_pmu.c: In function ‘cpu_pm_pmu_notify’:../drivers/perf/arm_pmu.c:726:3: warning: this statement may fall
through [-Wimplicit-fallthrough=]cpu_pm_pmu_setup(armpmu, cmd); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/perf/arm_pmu.c:727:2: note: here
caseCPU_PM_ENTER_FAILED:
^~~~Rework so that the compiler doesn't warn about fall-through.
Fixes d93512ef0f0e ("Makefile: Globally enable fall-through warning")Signed-off-by Anders Roxell <[email protected]>Quoted 7 lines
---
I'm not convinced that this is the correct patch to fix this issue. However, I can't see why we do '
armpmu->start(armpmu);' only in 'caseCPU_PM_ENTER_FAILED' and why we not call functioncpu_pm_pmu_setup()there also, since incpu_pm_pmu_setup()has a case prepared forCPU_PM_ENTER_FAILED.I agree, think that should be:
case CPU_PM_EXIT: case CPU_PM_ENTER_FAILED: cpu_pm_pmu_setup(armpmu, cmd); armpmu->start(armpmu); break;Quoted 5 lines
... so that we re-start the events before we start the PMU.
That would be a fix for commit:
da4e4f18afe0f372("drivers/perf:arm_pmu: implementCPU_PMnotifier")Yes that's correct, apologies. Probably we did not hit it because CPU PM notifier entry failures are a pretty rare event; regardless:
Quoted 7 lines
Quoted 3 lines
I can send the updated fix, just let me know.
I'm not sure what Will wants, but assuming you do so:
Acked-by Mark Rutland <[email protected]>
I gave up waiting, so it's already queued here:
Will
Mark Rutland
maintainerQuoted 49 lines · Will Deacon
Quoted 48 lines · Mark Rutland
Quoted 46 lines · Lorenzo Pieralisi
Quoted 33 lines · Mark Rutland
Quoted 16 lines · Anders Roxell
When fall-through warnings was enabled by default the following warning was starting to show up:
../drivers/perf/arm_pmu.c: In function ‘cpu_pm_pmu_notify’:../drivers/perf/arm_pmu.c:726:3: warning: this statement may fall
through [-Wimplicit-fallthrough=]cpu_pm_pmu_setup(armpmu, cmd); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/perf/arm_pmu.c:727:2: note: here
caseCPU_PM_ENTER_FAILED:
^~~~Rework so that the compiler doesn't warn about fall-through.
Fixes d93512ef0f0e ("Makefile: Globally enable fall-through warning")Signed-off-by Anders Roxell <[email protected]>Quoted 7 lines
---
I'm not convinced that this is the correct patch to fix this issue. However, I can't see why we do '
armpmu->start(armpmu);' only in 'caseCPU_PM_ENTER_FAILED' and why we not call functioncpu_pm_pmu_setup()there also, since incpu_pm_pmu_setup()has a case prepared forCPU_PM_ENTER_FAILED.I agree, think that should be:
case CPU_PM_EXIT: case CPU_PM_ENTER_FAILED: cpu_pm_pmu_setup(armpmu, cmd); armpmu->start(armpmu); break;Quoted 5 lines
... so that we re-start the events before we start the PMU.
That would be a fix for commit:
da4e4f18afe0f372("drivers/perf:arm_pmu: implementCPU_PMnotifier")Yes that's correct, apologies. Probably we did not hit it because CPU PM notifier entry failures are a pretty rare event; regardless:
I can send the updated fix, just let me know.
Quoted 7 lines
Quoted 3 lines
I'm not sure what Will wants, but assuming you do so:
Acked-by Mark Rutland <[email protected]>I gave up waiting, so it's already queued here:
Great; I'll mark this thread as done, then. :)
Mark.
Quoted 48 lines · Will Deacon
Quoted 46 lines · Mark Rutland
Quoted 45 lines · Lorenzo Pieralisi
Quoted 33 lines · Mark Rutland
Quoted 16 lines · Anders Roxell
When fall-through warnings was enabled by default the following warning was starting to show up:
../drivers/perf/arm_pmu.c: In function ‘cpu_pm_pmu_notify’:../drivers/perf/arm_pmu.c:726:3: warning: this statement may fall
through [-Wimplicit-fallthrough=]cpu_pm_pmu_setup(armpmu, cmd); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/perf/arm_pmu.c:727:2: note: here
caseCPU_PM_ENTER_FAILED:
^~~~Rework so that the compiler doesn't warn about fall-through.
Fixes d93512ef0f0e ("Makefile: Globally enable fall-through warning")Signed-off-by Anders Roxell <[email protected]>Quoted 7 lines
---
I'm not convinced that this is the correct patch to fix this issue. However, I can't see why we do '
armpmu->start(armpmu);' only in 'caseCPU_PM_ENTER_FAILED' and why we not call functioncpu_pm_pmu_setup()there also, since incpu_pm_pmu_setup()has a case prepared forCPU_PM_ENTER_FAILED.I agree, think that should be:
case CPU_PM_EXIT: case CPU_PM_ENTER_FAILED: cpu_pm_pmu_setup(armpmu, cmd); armpmu->start(armpmu); break;Quoted 5 lines
... so that we re-start the events before we start the PMU.
That would be a fix for commit:
da4e4f18afe0f372("drivers/perf:arm_pmu: implementCPU_PMnotifier")Yes that's correct, apologies. Probably we did not hit it because CPU PM notifier entry failures are a pretty rare event; regardless:
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
I can send the updated fix, just let me know.
I'm not sure what Will wants, but assuming you do so:
Acked-by Mark Rutland <[email protected]>I gave up waiting
I'm sorry for letting you wait.
Quoted 3 lines
, so it's already queued here:
Thanks for fixing it.
Cheers,
Anders
Will Deacon
maintainerQuoted 51 lines · Anders Roxell
Quoted 50 lines · Will Deacon
Quoted 48 lines · Mark Rutland
Quoted 46 lines · Lorenzo Pieralisi
Quoted 33 lines · Mark Rutland
Quoted 16 lines · Anders Roxell
When fall-through warnings was enabled by default the following warning was starting to show up:
../drivers/perf/arm_pmu.c: In function ‘cpu_pm_pmu_notify’:../drivers/perf/arm_pmu.c:726:3: warning: this statement may fall
through [-Wimplicit-fallthrough=]cpu_pm_pmu_setup(armpmu, cmd); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/perf/arm_pmu.c:727:2: note: here
caseCPU_PM_ENTER_FAILED:
^~~~Rework so that the compiler doesn't warn about fall-through.
Fixes d93512ef0f0e ("Makefile: Globally enable fall-through warning")Signed-off-by Anders Roxell <[email protected]>Quoted 7 lines
---
I'm not convinced that this is the correct patch to fix this issue. However, I can't see why we do '
armpmu->start(armpmu);' only in 'caseCPU_PM_ENTER_FAILED' and why we not call functioncpu_pm_pmu_setup()there also, since incpu_pm_pmu_setup()has a case prepared forCPU_PM_ENTER_FAILED.I agree, think that should be:
case CPU_PM_EXIT: case CPU_PM_ENTER_FAILED: cpu_pm_pmu_setup(armpmu, cmd); armpmu->start(armpmu); break;Quoted 5 lines
... so that we re-start the events before we start the PMU.
That would be a fix for commit:
da4e4f18afe0f372("drivers/perf:arm_pmu: implementCPU_PMnotifier")Yes that's correct, apologies. Probably we did not hit it because CPU PM notifier entry failures are a pretty rare event; regardless:
I can send the updated fix, just let me know.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
I'm not sure what Will wants, but assuming you do so:
Acked-by Mark Rutland <[email protected]>I gave up waiting
I'm sorry for letting you wait.
No, not at all. It's just that everybody was piling in with patches for these issues and I suspected you were busy dealing with responses. Rather than wait, I figured the best bet was just to get this fixed.
Are you going to respin the SMMUv3 change per Robin's feedback?
Will
Quoted 57 lines · Will Deacon
Quoted 55 lines · Anders Roxell
Quoted 54 lines · Will Deacon
Quoted 51 lines · Mark Rutland
Quoted 38 lines · Lorenzo Pieralisi
Quoted 37 lines · Mark Rutland
Quoted 16 lines · Anders Roxell
When fall-through warnings was enabled by default the following warning was starting to show up:
../drivers/perf/arm_pmu.c: In function ‘cpu_pm_pmu_notify’:../drivers/perf/arm_pmu.c:726:3: warning: this statement may fall
through [-Wimplicit-fallthrough=]cpu_pm_pmu_setup(armpmu, cmd); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/perf/arm_pmu.c:727:2: note: here
caseCPU_PM_ENTER_FAILED:
^~~~Rework so that the compiler doesn't warn about fall-through.
Fixes d93512ef0f0e ("Makefile: Globally enable fall-through warning")Signed-off-by Anders Roxell <[email protected]>Quoted 7 lines
---
I'm not convinced that this is the correct patch to fix this issue. However, I can't see why we do '
armpmu->start(armpmu);' only in 'caseCPU_PM_ENTER_FAILED' and why we not call functioncpu_pm_pmu_setup()there also, since incpu_pm_pmu_setup()has a case prepared forCPU_PM_ENTER_FAILED.I agree, think that should be:
case CPU_PM_EXIT: case CPU_PM_ENTER_FAILED: cpu_pm_pmu_setup(armpmu, cmd); armpmu->start(armpmu); break;... so that we re-start the events before we start the PMU.
That would be a fix for commit:
Quoted 8 lines
Quoted 1 line
da4e4f18afe0f372("drivers/perf:arm_pmu: implementCPU_PMnotifier")Yes that's correct, apologies. Probably we did not hit it because CPU PM notifier entry failures are a pretty rare event; regardless:
I can send the updated fix, just let me know.
I'm not sure what Will wants, but assuming you do so:
Acked-by Mark Rutland <[email protected]>
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
I gave up waiting
I'm sorry for letting you wait.
No, not at all. It's just that everybody was piling in with patches for these issues and I suspected you were busy dealing with responses. Rather than wait, I figured the best bet was just to get this fixed.
Thanks.
Quoted 2 lines
Are you going to respin the SMMUv3 change per Robin's feedback?
Yes, just sent it.
Cheers,
Anders