Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4631441ybi; Tue, 30 Jul 2019 05:31:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTkwIdugLRiMma0Msi9b6QVDOpJQ5PAagtCXstXij/RwQklBbfYHBSTWWyRjqpo93LcchI X-Received: by 2002:a17:902:bc83:: with SMTP id bb3mr117826616plb.56.1564489901848; Tue, 30 Jul 2019 05:31:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564489901; cv=none; d=google.com; s=arc-20160816; b=G6/M1wb8hpdikfncN8SlgmXvTVUS9W8t2qraitSOrDKbmoTJWunQ/MXXbfrfN/0vc4 9RoqpxchYrFapk8BukOk6ATit/LMWeIytU6dofHB3tDuNbKnz/6RjP6/L0i7Oe2xCF5+ UxThQXGfpDkRa0pUW31lzDKgBjgFxCs3TU4ZoaxyeEdB/mk9t0SRzPzdbnODML34Ln6u AiF+fCkubVGpydQrd/y4k0C1ga6zLTSVPz5MyIRnUzflV4LAXdJWqPu6Bdttn6WePSFz /r0nDsdMN+25KEnu1BOOq5X9Ktl8nL5qZLvbcQAO7LhSA+3Z8xdHvnRr3rxsP1vOpCHR RKLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=CSfAM+gQ83XDaCNQg7r2LymDSaYozQKa9yvOaipRrHw=; b=th+j0XzxRgouxWi7VSusR5hGdHroDeP4pME59kZcG7RYLOywuc4A+s0efVppaIMOvq RDbN/deXtbf7slCYhQT6PJB/jp+LGU0EPV1p9iK+0CwV2M4EIGPgwmcTGED0fOcmh3aS rJPOSRoFEWyfIAGxh5yKEIi3QQJh4DrcqF/Q4FCgQP005NYjTEhU/05VLfvZ0TZmb1UD Jg3fH12ggvfcn5EsCoEdIZgGhilNhwOBl6N5izqCOyVeKiKtvtEz0FQZJl0WlZs/HFcx 2jULI3r4Tf7Z22VMixn9ROJ00k8B0wgt5xXoCS1owTzRD3zJ68wmXmwgqT5R7r6G+f0I +ZJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YcHbAFaq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10si2124160pjq.46.2019.07.30.05.31.26; Tue, 30 Jul 2019 05:31:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YcHbAFaq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727324AbfG3Mal (ORCPT + 99 others); Tue, 30 Jul 2019 08:30:41 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:43781 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728361AbfG3Mak (ORCPT ); Tue, 30 Jul 2019 08:30:40 -0400 Received: by mail-lf1-f67.google.com with SMTP id c19so44580873lfm.10 for ; Tue, 30 Jul 2019 05:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=CSfAM+gQ83XDaCNQg7r2LymDSaYozQKa9yvOaipRrHw=; b=YcHbAFaq93T4Zd6Gr5USiR2fPHQ71TjN2iFO68zfokUsiUXHtSvTQhdwY4Fwwhw4p2 QAFwFQe3kSqg7/+Ad4vM4NoB5JGqpFcMIDw38BlA9kIe8YNk3A89nlp9hz5D9hNSAdxR 51sz9+kqtPSfhaH4zUX6M2DK9Gl46AeG3S/uvMj68hNHzdgx4Uas/1yi4sP0kkJuSIf+ DloKwpPnqTb+gN4kQEj3C/DOiShZrBI979u3ZLjl9we3uYL5sMQdidw5IN1h9v2C24k1 gP7wOmDYR4KBmq1AQTULDiNPw61vGuHnG4HiCjYNdSTEX/0J/yZX8K2kz1PR98Ic2abB zMCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=CSfAM+gQ83XDaCNQg7r2LymDSaYozQKa9yvOaipRrHw=; b=sBZAoRJKGhARvbNYxezb2sSN+1cgGFpq0u/zKcj9f9m/yx+gNGlUSzIckBdxcjaLip FUo2xSz8a+irLpwEQ87SORXWxvFlRAguIMXD9Tgtb8iuMGGqFw1PggzRt/kauqECuLE3 RYUc6Jl8ltK7bBSutiHoXMxVo8ktf/RB1znkusEOFiBH4QX/H1tw5nS4LHDzRGXXho3K Rh4y3II3aeBvB+6aprIg1ypX4Ar4PFYrXK5vIXLA/Mpysy3UjuwSYuB0P3p0lHqqgeYV HD8CF4G+MN86md+pd/Nza22io1HG7gkWqeHKD9gn+180NGbCnQImH7PqbwK4GQVeAgqG FWBg== X-Gm-Message-State: APjAAAWs0B1wrSloe7UJQUn1tSgCdGcd9VB6EHxAlR+BZep0k2zEvSrD Ua6m/uR+EEv6F+05VQ322P9y/NdffIM3EQGklyj8ow== X-Received: by 2002:ac2:4c82:: with SMTP id d2mr37163207lfl.89.1564489838284; Tue, 30 Jul 2019 05:30:38 -0700 (PDT) MIME-Version: 1.0 References: <20190726112737.19309-1-anders.roxell@linaro.org> <20190726122956.GC26088@lakrids.cambridge.arm.com> <20190726151825.GA12552@e121166-lin.cambridge.arm.com> <20190730112415.GB51922@lakrids.cambridge.arm.com> <20190730112758.ctgg6l5gldsefdgs@willie-the-truck> In-Reply-To: <20190730112758.ctgg6l5gldsefdgs@willie-the-truck> From: Anders Roxell Date: Tue, 30 Jul 2019 14:30:27 +0200 Message-ID: Subject: Re: [PATCH] arm_pmu: Mark expected switch fall-through To: Will Deacon Cc: Mark Rutland , Lorenzo Pieralisi , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 30 Jul 2019 at 13:28, Will Deacon wrote: > > On Tue, Jul 30, 2019 at 12:24:15PM +0100, Mark Rutland wrote: > > 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 w= arning > > > > > was starting to show up: > > > > > > > > > > ../drivers/perf/arm_pmu.c: In function =E2=80=98cpu_pm_pmu_notify= =E2=80=99: > > > > > ../drivers/perf/arm_pmu.c:726:3: warning: this statement may fall > > > > > through [-Wimplicit-fallthrough=3D] > > > > > 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 warn= ing") > > > > > Signed-off-by: Anders Roxell > > > > > --- > > > > > > > > > > I'm not convinced that this is the correct patch to fix this issu= e. > > > > > 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_setu= p() > > > > > 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 notifi= er") > > > > > > 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 > > > > > > 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 > > I gave up waiting I'm sorry for letting you wait. >, so it's already queued here: > > https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?h= =3Dfor-next/fixes&id=3D0d7fd70f26039bd4b33444ca47f0e69ce3ae0354 Thanks for fixing it. Cheers, Anders