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 X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F28EFC43460 for ; Tue, 20 Apr 2021 03:15:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BB4A3613C3 for ; Tue, 20 Apr 2021 03:15:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234128AbhDTDQG (ORCPT ); Mon, 19 Apr 2021 23:16:06 -0400 Received: from mail-oi1-f169.google.com ([209.85.167.169]:40779 "EHLO mail-oi1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233742AbhDTDPw (ORCPT ); Mon, 19 Apr 2021 23:15:52 -0400 Received: by mail-oi1-f169.google.com with SMTP id u16so20313610oiu.7 for ; Mon, 19 Apr 2021 20:15:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KftKmS/o27Sgcc1bT74gmV9DoDXvkolzpYg8pd6W3VI=; b=jg7HmEm5KHqgEzY66JadAKnvMF/CcSeHZAX69kT/07CUgNHq7mXnxO71U9HtKgflKL T25QzJCY2QDVfU5xTtMhg+BqSNyG6Dq034zDzoyojHEtlC9h7cs5gN9fSpINsLizlACI HtZ/AwkHz5Z1y18B03RLhmJjLiH6QJ4IM51JqIZ1NIRRZMo5AP5qCF2X/GLF3Sk45MGl IAVbRmxe2OQTBH/rsaqL2aU/mpT31N/rzVHBWVmdug89Pu93JmkEPfgmX6nNwJZsNyJD E04awkH/criRsDSBzMCb8D/sYRnw6QmsBWk6uCa0l9Z0yoR8+JSIpTe0PDrIkAPMhCks nxtQ== X-Gm-Message-State: AOAM533Azz6SIsfPBqwc1DNckn4glMCj6y4bfVLEl+42LRuhfYUmlkA3 gEVpLVE7XH2djHJL6xnMeg== X-Google-Smtp-Source: ABdhPJxsK2DzpEeJyXr3X69a2tHZ7oR+L1gWKVPUP1pZFIAbKl2SXiMmqMWi1Bxotx5uMWMS+0uPZQ== X-Received: by 2002:aca:408b:: with SMTP id n133mr1596036oia.13.1618888520829; Mon, 19 Apr 2021 20:15:20 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id g16sm2347896oof.43.2021.04.19.20.15.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 20:15:20 -0700 (PDT) From: Rob Herring To: Will Deacon , Catalin Marinas , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Jiri Olsa , Mark Rutland Cc: Alexander Shishkin , honnappa.nagarahalli@arm.com, Zachary.Leaf@arm.com, Raphael Gault , Jonathan Cameron , Namhyung Kim , Itaru Kitayama , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 4/9] drivers/perf: arm_pmu: Export the per_cpu cpu_armpmu Date: Mon, 19 Apr 2021 22:15:06 -0500 Message-Id: <20210420031511.2348977-5-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210420031511.2348977-1-robh@kernel.org> References: <20210420031511.2348977-1-robh@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The arm64 PMU driver needs to retrieve the struct arm_pmu pointer for the current CPU. As the common code already maintains this with the percpu cpu_armpmu, let's make it global. Signed-off-by: Rob Herring --- drivers/perf/arm_pmu.c | 2 +- include/linux/perf/arm_pmu.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index 2d10d84fb79c..6ac56280b9c7 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c @@ -99,7 +99,7 @@ static const struct pmu_irq_ops percpu_pmunmi_ops = { .free_pmuirq = armpmu_free_percpu_pmunmi }; -static DEFINE_PER_CPU(struct arm_pmu *, cpu_armpmu); +DEFINE_PER_CPU(struct arm_pmu *, cpu_armpmu); static DEFINE_PER_CPU(int, cpu_irq); static DEFINE_PER_CPU(const struct pmu_irq_ops *, cpu_irq_ops); diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h index 63af052e3909..1daad3b2cce5 100644 --- a/include/linux/perf/arm_pmu.h +++ b/include/linux/perf/arm_pmu.h @@ -127,6 +127,8 @@ struct arm_pmu { #define to_arm_pmu(p) (container_of(p, struct arm_pmu, pmu)) +DECLARE_PER_CPU(struct arm_pmu *, cpu_armpmu); + u64 armpmu_event_update(struct perf_event *event); int armpmu_event_set_period(struct perf_event *event); -- 2.27.0 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 X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D434C433B4 for ; Tue, 20 Apr 2021 03:18:11 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA87C61220 for ; Tue, 20 Apr 2021 03:18:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA87C61220 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4dmnRRmFZhItG6CW+FxeulBddG8Ef9Ra1es85HWUT9c=; b=rNQPTJSLmy2hOLbkWffC7C4lq 1YP6qonajKBR42/9mSve1PVDD/PB52yJaMpKLDU/l8TPT3mNXSC6ssEFVHOF411jHUD9pP0ac8F1X P6rO0XS541udiYMcBcjLuhhcZSXr1R6SfzDQGmNETBwoUQMifYZXmLjUfeeJrW7BJLKylNU2k28ch YT9rve0n86L0jSR81Mh2rudtcb5bFOM3d5X71Jr6RA53T5QWb5slr7Y6NMJZaQ7Cm6THAeT0Fm59Q /Ts4wsp4yKw5lU+fMfWSlXd0HPg/Yuh+sawPngwi6PCSe5RZui7vhwQNR3med8LZxArCpU+UVWYmn jl5agQHdA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYgs6-00B3Ie-Ut; Tue, 20 Apr 2021 03:16:19 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYgrJ-00B37e-KN for linux-arm-kernel@desiato.infradead.org; Tue, 20 Apr 2021 03:15:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=KftKmS/o27Sgcc1bT74gmV9DoDXvkolzpYg8pd6W3VI=; b=qzf6T6bcZfE92hhI/d9e/+AhQ4 dLAWA7CGDukPYbuRReSadT4/y71dVjsdFdzlz9wAVbVNascgfyhxKqbcEDxXonkmXTvkzhuYlErbR XyxhHWZ17wsP2T17she682iBWUmLOaKBcIg3x8DeP1pV9GiJDbeL0oYoQycS/wmVTMyyMs0PiuFQL NlhBo6qOSqXcNOMOvTMSXmtjtkS5+46iS0nhOTqw2xxDlxugFMAwHbZBUdx3DLvzbqxHO87dDF2fn R+PbcxYuiR9hHyAQMcgdtBGxsEsYBMB/gHEqNGBj3c0Ae+MagjoizLYYbmO16O4IrZh3P7HGt5APQ e0sYXOHg==; Received: from mail-oi1-f180.google.com ([209.85.167.180]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYgrD-00Bmis-E3 for linux-arm-kernel@lists.infradead.org; Tue, 20 Apr 2021 03:15:28 +0000 Received: by mail-oi1-f180.google.com with SMTP id x20so3868086oix.10 for ; Mon, 19 Apr 2021 20:15:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KftKmS/o27Sgcc1bT74gmV9DoDXvkolzpYg8pd6W3VI=; b=G8DKx21gk/kvptBI2A3LwFmrseukwmPCLFtM/E1ZukCcC0eZWQIz48/BM97C3hYmir nlBXOxzYLJno771mMF9nM1J/j+eFNEHji9MLzkI/ccfPSNOeL3Hv1QuKeMkKQjxWzP4Z 7MBLJdUqKDC484/CB1qq+AaIz/Zi4FiFGDJmkMUt3hXa0zIgKyKiRFDYtpVYEixe3erT K+vBbt5CvNfTthGX+y51qOJnWe6DHC9gLh4GeaRjfEqpQ7ehkeHGFaOArjKrl2mqiYVm EaZ9zdy6tDs2hCLBu/2ptoGJfSe/kv8zdu2Ins8HUVjGqWcSD97xDHVE3eMBfVboZA9L //xw== X-Gm-Message-State: AOAM531WuMUls8QmVuRFnwGqCplm2fA/G5aFrPaKANvpN6ghvvWPCBVU KDQuaPRu+Cy2bkwUkpMr/ftLkqy7Ew== X-Google-Smtp-Source: ABdhPJxsK2DzpEeJyXr3X69a2tHZ7oR+L1gWKVPUP1pZFIAbKl2SXiMmqMWi1Bxotx5uMWMS+0uPZQ== X-Received: by 2002:aca:408b:: with SMTP id n133mr1596036oia.13.1618888520829; Mon, 19 Apr 2021 20:15:20 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id g16sm2347896oof.43.2021.04.19.20.15.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 20:15:20 -0700 (PDT) From: Rob Herring To: Will Deacon , Catalin Marinas , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Jiri Olsa , Mark Rutland Cc: Alexander Shishkin , honnappa.nagarahalli@arm.com, Zachary.Leaf@arm.com, Raphael Gault , Jonathan Cameron , Namhyung Kim , Itaru Kitayama , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 4/9] drivers/perf: arm_pmu: Export the per_cpu cpu_armpmu Date: Mon, 19 Apr 2021 22:15:06 -0500 Message-Id: <20210420031511.2348977-5-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210420031511.2348977-1-robh@kernel.org> References: <20210420031511.2348977-1-robh@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210419_201523_501657_B8728E45 X-CRM114-Status: GOOD ( 14.51 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The arm64 PMU driver needs to retrieve the struct arm_pmu pointer for the current CPU. As the common code already maintains this with the percpu cpu_armpmu, let's make it global. Signed-off-by: Rob Herring --- drivers/perf/arm_pmu.c | 2 +- include/linux/perf/arm_pmu.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index 2d10d84fb79c..6ac56280b9c7 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c @@ -99,7 +99,7 @@ static const struct pmu_irq_ops percpu_pmunmi_ops = { .free_pmuirq = armpmu_free_percpu_pmunmi }; -static DEFINE_PER_CPU(struct arm_pmu *, cpu_armpmu); +DEFINE_PER_CPU(struct arm_pmu *, cpu_armpmu); static DEFINE_PER_CPU(int, cpu_irq); static DEFINE_PER_CPU(const struct pmu_irq_ops *, cpu_irq_ops); diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h index 63af052e3909..1daad3b2cce5 100644 --- a/include/linux/perf/arm_pmu.h +++ b/include/linux/perf/arm_pmu.h @@ -127,6 +127,8 @@ struct arm_pmu { #define to_arm_pmu(p) (container_of(p, struct arm_pmu, pmu)) +DECLARE_PER_CPU(struct arm_pmu *, cpu_armpmu); + u64 armpmu_event_update(struct perf_event *event); int armpmu_event_set_period(struct perf_event *event); -- 2.27.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel