From patchwork Wed Jun 26 22:32:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 13713492 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 ABB71C27C4F for ; Wed, 26 Jun 2024 22:33:17 +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:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2/R2nMSEdpbnsG0GBdoDxaCC84ymxtL0BYcKkbZHCQQ=; b=O4kGUo18CpiIhj73OrYxo5yEEe cbLwCHdaPViduPS/lOXE8SwjC5UeHlD3YvOCKMGKAv2n/9T+oh6Xe4QjDvwrS5OcBqZ054L01bjcI 2shSpY+SDaj6cwcNIoFNg4yN3BiprupHALYBklXux+YCIq+gexthgOVK36OmFLCsO++UL0cpWbBYI 8Mf0MGQFGcdY4qbKv8VAAdRzEBol1WpGKjHbqw7lAwxyXQvYNDlWLP3mVWT76IfT/b1YoLrWsVi/x ne6VvNulLA5ZDKKr/kVJeiOMePiXWdjmbCjAmcGRu9p+lX7aWcdc+2fXrG4i5F8w3xJUsygpVW6D+ 8Q8Zl1VA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMbCL-00000008Vdz-3ztI; Wed, 26 Jun 2024 22:33:05 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMbBy-00000008VOs-4BLV for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2024 22:32:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id A3018CE2D07; Wed, 26 Jun 2024 22:32:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C836C4AF07; Wed, 26 Jun 2024 22:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719441160; bh=WFW4O9a/P3vJBEq/1R2/A6s4nHRFlDzLuQG5qk6khFQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jqnRnP7kq3HQQ6yTW0IAppr/Mqyt5PEzSwDm8LbWM0gG7EGy7/OIMN01Xf2XPDnUy DvS79Lywp5m8Ahl0QbN0gj3imZpqFy4SpwqPijMiRvgY+cSomahgvPg8LAgc1Qcsfe Gc15rJrNgJPH82M0T39zxMkOjsBOyX8YGsbsJtjiokgfQJyHUsM8YqYduZ0FxdFz+y 4QHfUnbF+VquXUuRyd+AbYlR1aV8tbnCMfb8kOKcg1HwU8VlvGYstP0rmvmsVK4zlv B9X0A9vv2yL7uFwSPP3p6Ijm6+WYrsNfs4RuExi6QzKMPQu9z+mKVM52/20asaCeD+ r8nsoBCTHYLVQ== From: "Rob Herring (Arm)" Date: Wed, 26 Jun 2024 16:32:26 -0600 Subject: [PATCH v2 02/12] perf: arm_pmuv3: Drop unnecessary IS_ENABLED(CONFIG_ARM64) check MIME-Version: 1.0 Message-Id: <20240626-arm-pmu-3-9-icntr-v2-2-c9784b4f4065@kernel.org> References: <20240626-arm-pmu-3-9-icntr-v2-0-c9784b4f4065@kernel.org> In-Reply-To: <20240626-arm-pmu-3-9-icntr-v2-0-c9784b4f4065@kernel.org> To: Russell King , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, kvmarm@lists.linux.dev X-Mailer: b4 0.14-dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240626_153243_327270_30EF9B65 X-CRM114-Status: GOOD ( 13.06 ) 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 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 --- 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));