Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2295050rdg; Sun, 15 Oct 2023 22:25:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IElhO4yWgoR00EddT3r2Wosd5iXzCtCkmmWXY/EWOeFni6w7I6HWDHRQgnkcZpEronpO7Tz X-Received: by 2002:a17:90b:2887:b0:27d:5ef6:2862 with SMTP id qc7-20020a17090b288700b0027d5ef62862mr2724490pjb.13.1697433931898; Sun, 15 Oct 2023 22:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697433931; cv=none; d=google.com; s=arc-20160816; b=Cu0R9AV156DY5gkkMQ5DRuOsluZweQIGXBHRB4dWyGmO3s5KLLu45BG6A4hbZwNcYr /j/BtCDtl5md3asRn4+QNz6ZimSNbl3AwC7yyljUMUuN51asvBLBLrJIC885hVMC0CPX 0GAeiYeRUxv9qhGb2ZHHc8dwVz+jIaovf+y7dp0GmOhTxztkbFvbGKKDXGsFhdbwRb6N /qzRWZXDYhAwYMzvIepqsOKaZ+YNC5ztOuWvxObNp335/LHZ3DizdkMdmRpVkQLSa6Z7 RNE/4emd4XSvONcwBwjDC+uxKryM/yOkPoDKTPYqqrevaP8YGSbOJudUb/kqaHq873cE x3Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=pUjz0vRe2aqm0WDxROUOoKgVbGfIKsVrcf+gLcK+pJ8=; fh=ptSJPLL9EzMEHMmZv4oZsDrn7PmjNVXYQaI0dW3aMfU=; b=wlIxOubGkiTZ1aeLg2z8BG0a6hPFPEWX4bus8/U1durhNLRMId50G1tod4jWP07HSg EutXgcxVzX86L+FeRzLwA60XmmYm1VfAYWYh6QB3nM+SUtpxNcRoork80vLWqXYdiaby NfbYxbV3ZjfKBa3MJxC7DNWle1I3Bg6Rfi0ZUw/Ee+IluRSUQOyjV73/me21dvDgqLNb DMIqoPKWLSMsQrGiouCDivY1Sj3kJH1S6koRCoP6gH7uBgGxpiW9e7VCJq2M9SfEnA/F cfDvW03pNQcibtSxI+MJX7Ydhn0/UCPB9W3LEIEBQIXlbHZJ2h4cCjfksplBUd+XSjEI RywQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id e6-20020a170902cf4600b001b8039317cesi9249568plg.301.2023.10.15.22.25.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 22:25:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id B9293803E921; Sun, 15 Oct 2023 22:25:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231623AbjJPFY6 (ORCPT + 99 others); Mon, 16 Oct 2023 01:24:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230442AbjJPFYt (ORCPT ); Mon, 16 Oct 2023 01:24:49 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9E493F3; Sun, 15 Oct 2023 22:24:47 -0700 (PDT) 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 EA122DA7; Sun, 15 Oct 2023 22:25:27 -0700 (PDT) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.41.8]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E53193F762; Sun, 15 Oct 2023 22:24:44 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Mark Rutland , Will Deacon , Russell King , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC 2/2] drivers: perf: arm_pmu: Drop 'pmu_lock' element from 'struct pmu_hw_events' Date: Mon, 16 Oct 2023 10:54:31 +0530 Message-Id: <20231016052431.1390269-3-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231016052431.1390269-1-anshuman.khandual@arm.com> References: <20231016052431.1390269-1-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sun, 15 Oct 2023 22:25:22 -0700 (PDT) As 'pmu_lock' element is not being used in any ARM PMU implementation, just drop this from 'struct pmu_hw_events'. Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- drivers/perf/arm_pmu.c | 1 - include/linux/perf/arm_pmu.h | 6 ------ 2 files changed, 7 deletions(-) diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index d712a19e47ac..379479b50bdd 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c @@ -893,7 +893,6 @@ struct arm_pmu *armpmu_alloc(void) struct pmu_hw_events *events; events = per_cpu_ptr(pmu->hw_events, cpu); - raw_spin_lock_init(&events->pmu_lock); events->percpu_pmu = pmu; } diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h index 143fbc10ecfe..e2503d48ddee 100644 --- a/include/linux/perf/arm_pmu.h +++ b/include/linux/perf/arm_pmu.h @@ -59,12 +59,6 @@ struct pmu_hw_events { */ DECLARE_BITMAP(used_mask, ARMPMU_MAX_HWEVENTS); - /* - * Hardware lock to serialize accesses to PMU registers. Needed for the - * read/modify/write sequences. - */ - raw_spinlock_t pmu_lock; - /* * When using percpu IRQs, we need a percpu dev_id. Place it here as we * already have to allocate this struct per cpu. -- 2.25.1