From patchwork Mon May 8 16:05:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 91208 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2266335vqo; Mon, 8 May 2023 09:10:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5HiZphveEDQKBd6lc6ithxHaCD//cq9ttEes4+P5pNgB8ZunDVE/f35HWolXULzwYYmwIW X-Received: by 2002:a05:6a00:1303:b0:63b:817f:664 with SMTP id j3-20020a056a00130300b0063b817f0664mr13544164pfu.22.1683562205658; Mon, 08 May 2023 09:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683562205; cv=none; d=google.com; s=arc-20160816; b=OQKqRsRCJahiFxo1JYVo3NjIMqLUpIl3gfkHa8xbtcYnJPbrPIyBfto1Zk7sYa/Cni 8+k6DUe1sVg+atyJSaHMG+fpLXz7B1IQL9x5B5i8UgixCFNRpZAU3DBLs4v2u1c2pMYr qsSzX1e0cqMUotTQBrKcsGeI+m+0BjeED/dm/RxWn2xZlKAbw4shBdFcYwCbIRAJ9gIi /ENikA/C1o3PDBRx/HIAFQkCkugHKjrtsiDh6PHf9ERYblmxzSwnM4yjDvT9okAfVbt0 frZEaVQ550G/q6cNGKDVgyvsLXfF8YewlueHybwbUF1Wz9pwcZAf6sDqD5Mp/ezTKDKV 1wmA== 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=Z7hQKSSGUrPP+ZmgHs4qwxi5MITOzweXFA28IAK2/q4=; b=AXDrWsOJB4VFj2WKHpAIVrFte7K0Yb1Cdj6GyngXwcZPLgs95n9GYypfPvyMe2AabE S8d+++khYFiRScxWqsZ1KEno/DojmDjKas+DN58vLWVjqTZoK/5o9atR7d4D3JV15o+v 6k2YARk/XV5W6Opq7mAlaEPn2ITExvzweFgHBIQNf1yp5mnmmFQvsGSdgi7TmFLoVgMC 5AD0rZ9RUHlNkXvWTCYgB+u/5BxxIbAsPJekuBaZOtGgvtI3AIwhmYdJa0I2sKhTCMd0 Vhj+oIa45CwzLumMvnvgMTQY9PqUyKYcaItrfx7BBj/Lj7mstD7wWkoGcH5n6bp4sI1J Gs6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c83-20020a624e56000000b0063d2b810fc6si178063pfb.305.2023.05.08.09.09.50; Mon, 08 May 2023 09:10:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233234AbjEHQFg (ORCPT + 99 others); Mon, 8 May 2023 12:05:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232161AbjEHQF3 (ORCPT ); Mon, 8 May 2023 12:05:29 -0400 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5472B5596 for ; Mon, 8 May 2023 09:05:27 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed30:6a18:41e7:fcfe:24c0]) by albert.telenet-ops.be with bizsmtp id uG5R290052WBekD06G5RXE; Mon, 08 May 2023 18:05:25 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1pw3MU-001XSl-9n; Mon, 08 May 2023 18:05:25 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1pw3Mb-00BTFB-0a; Mon, 08 May 2023 18:05:25 +0200 From: Geert Uytterhoeven To: Marc Zyngier , Russell King , Catalin Marinas , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/2] ARM: perf: Mark all accessor functions inline Date: Mon, 8 May 2023 18:05:18 +0200 Message-Id: <3a7d9bc7470aa2d85696ee9765c74f8c03fb5454.1683561482.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765342923388574539?= X-GMAIL-MSGID: =?utf-8?q?1765342923388574539?= When just including : arch/arm/include/asm/arm_pmuv3.h:110:13: error: ‘write_pmevtypern’ defined but not used [-Werror=unused-function] 110 | static void write_pmevtypern(int n, unsigned long val) | ^~~~~~~~~~~~~~~~ arch/arm/include/asm/arm_pmuv3.h:103:13: error: ‘write_pmevcntrn’ defined but not used [-Werror=unused-function] 103 | static void write_pmevcntrn(int n, unsigned long val) | ^~~~~~~~~~~~~~~ arch/arm/include/asm/arm_pmuv3.h:95:22: error: ‘read_pmevcntrn’ defined but not used [-Werror=unused-function] 95 | static unsigned long read_pmevcntrn(int n) | ^~~~~~~~~~~~~~ Fix this by adding the missing "inline" keywords to the three accessor functions that lack them. Fixes: 009d6dc87a568db6 ("ARM: perf: Allow the use of the PMUv3 driver on 32bit ARM") Signed-off-by: Geert Uytterhoeven Reviewed-by: Marc Zyngier Acked-by: Mark Rutland --- arch/arm/include/asm/arm_pmuv3.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arm_pmuv3.h b/arch/arm/include/asm/arm_pmuv3.h index 78d3d4b82c6c2598..f4db3e75d75f024e 100644 --- a/arch/arm/include/asm/arm_pmuv3.h +++ b/arch/arm/include/asm/arm_pmuv3.h @@ -92,7 +92,7 @@ #define RETURN_READ_PMEVCNTRN(n) \ return read_sysreg(PMEVCNTR##n) -static unsigned long read_pmevcntrn(int n) +static inline unsigned long read_pmevcntrn(int n) { PMEVN_SWITCH(n, RETURN_READ_PMEVCNTRN); return 0; @@ -100,14 +100,14 @@ static unsigned long read_pmevcntrn(int n) #define WRITE_PMEVCNTRN(n) \ write_sysreg(val, PMEVCNTR##n) -static void write_pmevcntrn(int n, unsigned long val) +static inline void write_pmevcntrn(int n, unsigned long val) { PMEVN_SWITCH(n, WRITE_PMEVCNTRN); } #define WRITE_PMEVTYPERN(n) \ write_sysreg(val, PMEVTYPER##n) -static void write_pmevtypern(int n, unsigned long val) +static inline void write_pmevtypern(int n, unsigned long val) { PMEVN_SWITCH(n, WRITE_PMEVTYPERN); } From patchwork Mon May 8 16:05:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 91207 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2266191vqo; Mon, 8 May 2023 09:09:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4h3HDXvmbyqZtI4O9vW1bpFF0VUiczqd+fiaKv72Dgxc3OaNSI9FwlMsWVzTD4KkssrE+U X-Received: by 2002:a17:902:b184:b0:1ab:d6f:51a6 with SMTP id s4-20020a170902b18400b001ab0d6f51a6mr10231818plr.53.1683562195556; Mon, 08 May 2023 09:09:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683562195; cv=none; d=google.com; s=arc-20160816; b=eFFEx8RlbmfkL+eYUGZ5CIr1vyKKai9YdTNQVcS5gDHBmiy0rjATa9LGGg1K3mfYW0 DEe13kqS5ZuTMEvUgwbiRBKGxH8wq/00kWis5rMnoHSiKpcf3GBqcRCio2ZGv2B3kxSK gZuW5L8vX2AR1LgyraJmLmPAIJ4Q2yB/ZL9m4hRkvhey0v1EqeBvirv/6e9SEdljVEWo 6VaoghGMq9ORGTrw1PYBzwZTrfzrDCRKIWOjMVKuxR7o6v77LYqtsDzDBDoNbNGJr499 FerIgLAhggmqdWuATRPITMqM/2sTHnVpcpOf/ysBloYS4VfUrjxU4h1QHxIke3XG0Khb yQFQ== 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=toN442RdyhtAtCP35/wxZO2uvo3w1BLhcUyBKkZwCg0=; b=Lq4RZwNexamByB4tXfjfbBdvpW8Mef/QsBjhZ7Dt4/8kVKzhMzBvjliQsTI0+JGQk0 fxYGsge5nrBjY5MccvGFKXEn8gWcc5RmIyKrtMgxjrzcRnaE0i5Ot5GioP1ybvPGHgEX YwkK2/ZU0DhGHyscSQDclj5YQJmlaownZpBJjnPrSoxImxSxpCjqBjV33t9k818oqqiK XULZ9BFdAaiQcwxHeyqhX588pFizTTP4Pbo+OfFKWWrb4KkyFvibCGlzgr05VeMN/U6M j21vnZby5CvhsaHCAGLy9k7h5t7mHEoQ1PbLr5oAAAQsXoUGWX7mo2H07lgLYaD9p6E8 AB/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x14-20020a1709027c0e00b001a637201992si7936039pll.488.2023.05.08.09.09.37; Mon, 08 May 2023 09:09:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233033AbjEHQFb (ORCPT + 99 others); Mon, 8 May 2023 12:05:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232429AbjEHQF3 (ORCPT ); Mon, 8 May 2023 12:05:29 -0400 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36FB45588 for ; Mon, 8 May 2023 09:05:28 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed30:6a18:41e7:fcfe:24c0]) by michel.telenet-ops.be with bizsmtp id uG5R290042WBekD06G5Rm6; Mon, 08 May 2023 18:05:25 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1pw3MU-001XSm-9q; Mon, 08 May 2023 18:05:25 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1pw3Mb-00BTFE-1L; Mon, 08 May 2023 18:05:25 +0200 From: Geert Uytterhoeven To: Marc Zyngier , Russell King , Catalin Marinas , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 2/2] arm64: perf: Mark all accessor functions inline Date: Mon, 8 May 2023 18:05:19 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: <3a7d9bc7470aa2d85696ee9765c74f8c03fb5454.1683561482.git.geert+renesas@glider.be> References: <3a7d9bc7470aa2d85696ee9765c74f8c03fb5454.1683561482.git.geert+renesas@glider.be> MIME-Version: 1.0 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765342912998410120?= X-GMAIL-MSGID: =?utf-8?q?1765342912998410120?= When just including : arch/arm64/include/asm/arm_pmuv3.h:31:13: error: ‘write_pmevtypern’ defined but not used [-Werror=unused-function] 31 | static void write_pmevtypern(int n, unsigned long val) | ^~~~~~~~~~~~~~~~ arch/arm64/include/asm/arm_pmuv3.h:24:13: error: ‘write_pmevcntrn’ defined but not used [-Werror=unused-function] 24 | static void write_pmevcntrn(int n, unsigned long val) | ^~~~~~~~~~~~~~~ arch/arm64/include/asm/arm_pmuv3.h:16:22: error: ‘read_pmevcntrn’ defined but not used [-Werror=unused-function] 16 | static unsigned long read_pmevcntrn(int n) | ^~~~~~~~~~~~~~ Fix this by adding the missing "inline" keywords to the three accessor functions that lack them. Fixes: df29ddf4f04b00cf ("arm64: perf: Abstract system register accesses away") Signed-off-by: Geert Uytterhoeven Reviewed-by: Marc Zyngier Acked-by: Mark Rutland --- arch/arm64/include/asm/arm_pmuv3.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/include/asm/arm_pmuv3.h b/arch/arm64/include/asm/arm_pmuv3.h index d6b51deb7bf0ff2f..18dc2fb3d7b7b2d0 100644 --- a/arch/arm64/include/asm/arm_pmuv3.h +++ b/arch/arm64/include/asm/arm_pmuv3.h @@ -13,7 +13,7 @@ #define RETURN_READ_PMEVCNTRN(n) \ return read_sysreg(pmevcntr##n##_el0) -static unsigned long read_pmevcntrn(int n) +static inline unsigned long read_pmevcntrn(int n) { PMEVN_SWITCH(n, RETURN_READ_PMEVCNTRN); return 0; @@ -21,14 +21,14 @@ static unsigned long read_pmevcntrn(int n) #define WRITE_PMEVCNTRN(n) \ write_sysreg(val, pmevcntr##n##_el0) -static void write_pmevcntrn(int n, unsigned long val) +static inline void write_pmevcntrn(int n, unsigned long val) { PMEVN_SWITCH(n, WRITE_PMEVCNTRN); } #define WRITE_PMEVTYPERN(n) \ write_sysreg(val, pmevtyper##n##_el0) -static void write_pmevtypern(int n, unsigned long val) +static inline void write_pmevtypern(int n, unsigned long val) { PMEVN_SWITCH(n, WRITE_PMEVTYPERN); }