linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Anders Roxell <anders.roxell@linaro.org>,
	will@kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm_pmu: Mark expected switch fall-through
Date: Tue, 30 Jul 2019 12:24:15 +0100	[thread overview]
Message-ID: <20190730112415.GB51922@lakrids.cambridge.arm.com> (raw)
In-Reply-To: <20190726151825.GA12552@e121166-lin.cambridge.arm.com>

On Fri, Jul 26, 2019 at 04:18:25PM +0100, Lorenzo Pieralisi wrote:
> On Fri, Jul 26, 2019 at 01:29:56PM +0100, Mark Rutland wrote:
> > On Fri, Jul 26, 2019 at 01:27:37PM +0200, Anders Roxell wrote:
> > > 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.
> > > 
> > > Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning")
> > > Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> > > ---
> > > 
> > > 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.
> > 
> > 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")
> 
> Yes that's correct, apologies. Probably we did not hit it because CPU PM
> notifier entry failures are a pretty rare event; regardless:
> 
> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> 
> 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 <mark.rutland@arm.com>

Thanks,
Mark.

  reply	other threads:[~2019-07-30 11:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26 11:27 [PATCH] arm_pmu: Mark expected switch fall-through Anders Roxell
2019-07-26 12:29 ` Mark Rutland
2019-07-26 13:06   ` Will Deacon
2019-07-26 15:18   ` Lorenzo Pieralisi
2019-07-30 11:24     ` Mark Rutland [this message]
2019-07-30 11:27       ` Will Deacon
2019-07-30 11:42         ` Mark Rutland
2019-07-30 12:30         ` Anders Roxell
2019-07-30 12:43           ` Will Deacon
2019-07-30 15:21             ` Anders Roxell
2019-07-28 23:53 [PATCH] arm_pmu: mark " Matteo Croce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190730112415.GB51922@lakrids.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=anders.roxell@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).