Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4614209ybi; Tue, 30 Jul 2019 05:13:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrRHAQeNmrfJ8/t2vR+OW7rN3KV8HlJCgaz0jQur4ONha+gYuIBJfqCs5DGCGa+MAiqrSt X-Received: by 2002:a17:90a:9bca:: with SMTP id b10mr116409727pjw.90.1564488780213; Tue, 30 Jul 2019 05:13:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564488780; cv=none; d=google.com; s=arc-20160816; b=brqC6EZcvR8B+1X9Q4ZamlukHHpQR4FgY2qAnNdYEBYcF+XoUwvp5oPYVkFuEjoqkW SBeY1urZWeMoYwGS/McpYzIfq3fQemx93r47iesxfoXXjTKIns2reKyQO+4PC1aHHRml sTpGZoki8VFBQoCTIyg5qmONlHqyIUzbkPFFyU3m7/hljTcdH5lLtJ50hr43/q2PeAiP 0vAuGFjuCErolyddzVGzt06WQ2uvc+S/ReqU999nnog1sq6g/ef/mT9YWSVH9dQUyHos uAfTvsp2pUIFyhM5kXQJuOslciuqX0OFzOZumkyWS8wp7cpnYKXkUxJfbqVwL0BkNTa3 H5WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=9OpNYpb0DcLzvTF77WaHew0Qvs+OCa7CnDhYWALgU7A=; b=aX30tFXnyxzxCjAFemcWMHq0UbgCB6rnXx5hu+EumuMK1XQtYO3/QMuKDcw3hLmVlN MAt9IPv26r3dj3gGROdB5lgvtPLmTLHFoA5jJNOx+XNhic8mgbB3wNGCaqq+Xhq7zW97 Cxf6z6W7TNttXPADRE/c56b3kTNl5OebTU9RVA8aYbVPGwy7TxPC+eewB9AxgkYfv9qN cNx8SEwhzoe1d11WxRfL/mUzBTPO5j9c/J61MgkvL620qtnUjprGumInM9sMAazuRASy sUS3fGKF0I10odM2mNulq+uJ8Q2qorZqdjaNPdz+BBQqY+l9lwiJ1cZnix4/3wcDjZrf 8mxg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c70si29814089pfc.270.2019.07.30.05.12.44; Tue, 30 Jul 2019 05:13:00 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729729AbfG3LYT (ORCPT + 99 others); Tue, 30 Jul 2019 07:24:19 -0400 Received: from foss.arm.com ([217.140.110.172]:59496 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725934AbfG3LYT (ORCPT ); Tue, 30 Jul 2019 07:24:19 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 423FB28; Tue, 30 Jul 2019 04:24:18 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 746E93F575; Tue, 30 Jul 2019 04:24:17 -0700 (PDT) Date: Tue, 30 Jul 2019 12:24:15 +0100 From: Mark Rutland To: Lorenzo Pieralisi Cc: Anders Roxell , will@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm_pmu: Mark expected switch fall-through Message-ID: <20190730112415.GB51922@lakrids.cambridge.arm.com> References: <20190726112737.19309-1-anders.roxell@linaro.org> <20190726122956.GC26088@lakrids.cambridge.arm.com> <20190726151825.GA12552@e121166-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190726151825.GA12552@e121166-lin.cambridge.arm.com> User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > > --- > > > > > > 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 > > 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 Thanks, Mark.