Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4643706ybi; Tue, 30 Jul 2019 05:45:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVS9upBmhHVTyUBipo8iME8y0W06SiFk5mGq1TiZFVN/wV5P2t4rtj15LoR2vk5K1wZ1ha X-Received: by 2002:a62:1444:: with SMTP id 65mr41098452pfu.145.1564490721086; Tue, 30 Jul 2019 05:45:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564490721; cv=none; d=google.com; s=arc-20160816; b=hMGq6obeB7yWOUHq53lUbb5E37jaQsaYIFNhMLhO+jBu5lNVG98MO5gMINOW6VVjia anD2amMp6qKpcEZ2JxYGkc14OaLULls3a4R9OrnYLPKIDNIuuzJIH90zeai52ojXWPyi /v1qMUJNKv2Dx2ArQW/IqY1qf/eulsbNYMNAAYf1r3DOMmrLTpctzxMtwWo+pYZle024 l4US0dYjpZnOQqrvEzgsiJ9m96y8+Maz5b6pkMjxqEI8fOVwKSe8UYduxxRjKSrgR97W itI9BZbPMrAy2fKRCCvEIt0h4aXgsAx4kVplUqr8ILPsCNNHVgNztbqlc+6PsUAXDWod 85lw== 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:dkim-signature; bh=1x+k7kqn/QDNEluXYq72x6oRLUjc/R92IZMMz+Bi1ww=; b=zwFAUqzUZ+8hXblVfP7HrniJoF2hHXz717hHi+tDPuM/Ss3WlR+Jpi/6bhu9RMtrVj bvnRCkoI7n0TZDXwBeejKUFRgJktz70JZQw5z9uHfo1lwBpAbxeDdlRFYvFzcqFAsj14 Y9X8cgMF0Ob8CvU01DARy1CkrB32OnPxWboqJQcc2x6ug8GvDnrkj1/yw6wrU8868bJx C+Xhp+TCj1DE16wwsH1EbQKS5puZjJpLoKuTaZuNnHKjaz0A+ttEUXqu2HJstLNd3e3R vklXKTYMQEvVoSZhRtlKo7zJMfrUuqvd+/c2Q90UbxU5AIWquKF7Uzha8qU1ZTX0bh4U oFGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UUGaksyn; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11si30876564pgd.261.2019.07.30.05.45.05; Tue, 30 Jul 2019 05:45:21 -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=@kernel.org header.s=default header.b=UUGaksyn; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728980AbfG3Mn7 (ORCPT + 99 others); Tue, 30 Jul 2019 08:43:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:34198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729175AbfG3Mn6 (ORCPT ); Tue, 30 Jul 2019 08:43:58 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 68FD52089E; Tue, 30 Jul 2019 12:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564490637; bh=mGJfgDis7lFxQTibrlwo/CHqOx+DsqVJYO1TNNcS7h4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UUGaksynRCgKQ1s5ZcA8SMI7/VZWYXnjDuAtpM6+rm16sUM2BkCoBMWPbfeGeyYtX s8MRiUsTw9AxP68uLNUH8O0WtIzeXmiXw5vDr9RXFzHoA8YOtVvmeFuvXdvU3Lp3cs ZoreLJUCXvi6555PA2gikhhk9NKnME9zHHvewmWc= Date: Tue, 30 Jul 2019 13:43:53 +0100 From: Will Deacon To: Anders Roxell Cc: Mark Rutland , Lorenzo Pieralisi , Linux ARM , Linux Kernel Mailing List Subject: Re: [PATCH] arm_pmu: Mark expected switch fall-through Message-ID: <20190730124352.iwh5kbnc2d76mqyf@willie-the-truck> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 30, 2019 at 02:30:27PM +0200, Anders Roxell wrote: > 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 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 > > > > 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