From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 86FE0C2BD09 for ; Mon, 1 Jul 2024 17:11:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=89iG6lCHFBft6bNRDPM2DxMWcprleGzbqU1OejHy1DI=; b=t2FWsqTh2LcYSB7WIvuKsLsOJC +terqk2coJfScD3WyMrQKYTduFh+fuQjatbU4KrPxcXHqguFAeJYOJk9feI+7HL5ErtWukP7+4gEq OlgdAHsMXegSFg3E27GCJwiMNNQ5guJEekfHJQu0tGdudkYlu5nwfh3vaQZmosaERGr21aIrJ+oHM 9d2C6PFx+/a23ZduYfhuTbs4YheeTH1bEZLFK21oHIbuKRZvnzoVm62m24TLTT0XmJIdvCbbU/ibK ttUjy4E95RzJkwJxLkS76QlJaFJYgWxLk/XGrESbtRnCdUtkVmOW4IMerMFf5F9cv1EuwWkTFSPY9 YDY13hAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOKZ1-00000004GUx-48xj; Mon, 01 Jul 2024 17:11:39 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOKYq-00000004GR5-1bkb for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 17:11:30 +0000 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 5FD8D339; Mon, 1 Jul 2024 10:11:52 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 614463F766; Mon, 1 Jul 2024 10:11:24 -0700 (PDT) Date: Mon, 1 Jul 2024 18:11:21 +0100 From: Mark Rutland To: "Rob Herring (Arm)" Cc: Russell King , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Will Deacon , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , James Clark , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, kvmarm@lists.linux.dev Subject: Re: [PATCH v2 02/12] perf: arm_pmuv3: Drop unnecessary IS_ENABLED(CONFIG_ARM64) check Message-ID: References: <20240626-arm-pmu-3-9-icntr-v2-0-c9784b4f4065@kernel.org> <20240626-arm-pmu-3-9-icntr-v2-2-c9784b4f4065@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240626-arm-pmu-3-9-icntr-v2-2-c9784b4f4065@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_101128_498021_03F16E33 X-CRM114-Status: GOOD ( 19.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 26, 2024 at 04:32:26PM -0600, Rob Herring (Arm) wrote: > The IS_ENABLED(CONFIG_ARM64) check for threshold support is unnecessary. > The purpose is to not enable thresholds on arm32, but if threshold is > non-zero, the check against threshold_max() just above here will have > errored out because threshold_max() is always 0 on arm32. > > Signed-off-by: Rob Herring (Arm) Acked-by: Mark rutland Mark. > --- > v2: > - new patch > --- > drivers/perf/arm_pmuv3.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c > index 8ed5c3358920..3e51cd7062b9 100644 > --- a/drivers/perf/arm_pmuv3.c > +++ b/drivers/perf/arm_pmuv3.c > @@ -1045,7 +1045,7 @@ static int armv8pmu_set_event_filter(struct hw_perf_event *event, > return -EINVAL; > } > > - if (IS_ENABLED(CONFIG_ARM64) && th) { > + if (th) { > config_base |= FIELD_PREP(ARMV8_PMU_EVTYPE_TH, th); > config_base |= FIELD_PREP(ARMV8_PMU_EVTYPE_TC, > armv8pmu_event_threshold_control(attr)); > > -- > 2.43.0 >