Message ID | cover.1683561087.git.geert+renesas@glider.be |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2265674vqo; Mon, 8 May 2023 09:09:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7z7pRTPTsBGlZTe2/nu7kDoJJ0lFfhG+DWpMT1tJLjCCAMnbC/QwqfDj+tzuFodIbPC4QZ X-Received: by 2002:a05:6a20:5495:b0:100:6a95:c288 with SMTP id i21-20020a056a20549500b001006a95c288mr4480261pzk.7.1683562151563; Mon, 08 May 2023 09:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683562151; cv=none; d=google.com; s=arc-20160816; b=AbXpd+0j+5Xy6o/+kZB8uZy2+QWaNbMf8xzrT5d8BtpktGGOGumUZHCDGSgHJSe1Ko DFt0XbG6fpEUX6b3bxEE6naB17j4+rN6UC4g4fPAhi84Fx92GvoGLzmLcm5f1IuhxtXo gyzUekbiqB1D6stCxXQbSHStJi+cC8B2DrC0myvZhlhwFNE/9dN2XZ5iNnvYCL1HvIIc 73Tl4BFbPcIMcnL5BcNI1lZDaKoxR5ptzcP5kpC9nrRyngipDwfFWT0iauEnNUZskJbM DnWVpFGaV04yvf2NhNBTKI4Tx29lZaDCLpPBiz/L5q/dGyCFuCUn5om0o10bxq0eCjbx cbOQ== 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 :message-id:date:subject:cc:to:from; bh=X504xR/V8Xetw2B32LjZsN+6x0pmEDngyweUOsBvmsU=; b=ykdHaoIzh13moivuTMwFRw4m3CCjMGSkl9hCv7CXxZX6va6dvcDLhIMKpNCfcMp8s9 Dgx1mom5FwyUt/UC70nkfcq22dZvKpdmsHI0n6Huk0OVI4qTp0Hw24GfGA+vtpXZNLqS NZ/N7AQZ9p3tPpUCqen5ixb1OMm4HmeKIodGkYh2jSkWR5kItTH5KBcoKTe5+X4ESA/+ Eah+558n8nXULmzYH1BqDfGtBClqFxuUOQOW9QO+Nh6qJKFrv5DjmLuAYPiiTpECd/6W +ajNayRaNirCPNSsVW59SrSqOs3OQZJkvIv9HaEhKOCAhg9mNDN3oksI+8O/PFu4jrFp 4vyg== 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 l184-20020a6388c1000000b0050fae6024f8si3370400pgd.792.2023.05.08.09.08.55; Mon, 08 May 2023 09:09:11 -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 S233289AbjEHQFj (ORCPT <rfc822;baris.duru.linux@gmail.com> + 99 others); Mon, 8 May 2023 12:05:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232528AbjEHQF3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); 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 3734555B6 for <linux-kernel@vger.kernel.org>; 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 uG5R290062WBekD06G5Rm7; 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 <geert@linux-m68k.org>) id 1pw3MU-001XSk-9e; Mon, 08 May 2023 18:05:25 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1pw3Ma-00BTF8-WB; Mon, 08 May 2023 18:05:25 +0200 From: Geert Uytterhoeven <geert+renesas@glider.be> To: Marc Zyngier <maz@kernel.org>, Russell King <linux@armlinux.org.uk>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be> Subject: [PATCH 0/2] ARM/arm64: Mark all accessor functions inline Date: Mon, 8 May 2023 18:05:17 +0200 Message-Id: <cover.1683561087.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765342866928198937?= X-GMAIL-MSGID: =?utf-8?q?1765342866928198937?= |
Series |
ARM/arm64: Mark all accessor functions inline
|
|
Message
Geert Uytterhoeven
May 8, 2023, 4:05 p.m. UTC
Hi all, This patch series adds missing "inline" keywords to the few perf accessors that lack them. BTW, I tried converting my local timing code to the new unified system. This works fine on arm64, but broke on arm32. Is read_pmccntr() supposed to work on arm32? I get an undefined instruction exception on Cortex A15 and A9. Before, my custom code used "mrc p15, 0, %0, c9, c13, 0" (as is also used in arch/arm/kernel/perf_event_v7.c), for which there is no accessor yet. Thanks for your comments! Geert Uytterhoeven (2): ARM: perf: Mark all accessor functions inline arm64: perf: Mark all accessor functions inline arch/arm/include/asm/arm_pmuv3.h | 6 +++--- arch/arm64/include/asm/arm_pmuv3.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
Comments
Hi Geert, On Mon, 08 May 2023 17:05:17 +0100, Geert Uytterhoeven <geert+renesas@glider.be> wrote: > > Hi all, > > This patch series adds missing "inline" keywords to the few perf > accessors that lack them. I'll get to that shortly. > > BTW, I tried converting my local timing code to the new unified system. > This works fine on arm64, but broke on arm32. Is read_pmccntr() > supposed to work on arm32? I get an undefined instruction exception on > Cortex A15 and A9. Before, my custom code used "mrc p15, 0, %0, c9, > c13, 0" (as is also used in arch/arm/kernel/perf_event_v7.c), for which > there is no accessor yet. You can only use this instruction on a CPU that implements PMUv3, which limits it to an ARMv8 implementation (either a 64bit CPU in 32bit mode, or something like an A32). A15 and A9 being firmly in the ARMv7 camp, they cannot make use of this (hence the UNDEF you're getting). Thanks, M.
On Mon, May 08, 2023 at 06:05:17PM +0200, Geert Uytterhoeven wrote: > Hi all, > > This patch series adds missing "inline" keywords to the few perf > accessors that lack them. > > BTW, I tried converting my local timing code to the new unified system. > This works fine on arm64, but broke on arm32. Is read_pmccntr() > supposed to work on arm32? I get an undefined instruction exception on > Cortex A15 and A9. That's expected. This code is for PMUv3 (which was added as part of ARMv8), and one of the things changed in PMUv3 was that PMCCNTR was expanded to 64 bits accessible via MRRC and MCRR. Previously, PMCCNTR was only 32 bits, and that's what Cortex-A9 and Cortex-A15 implement. Thanks, Mark. > Before, my custom code used "mrc p15, 0, %0, c9, > c13, 0" (as is also used in arch/arm/kernel/perf_event_v7.c), for which > there is no accessor yet. > > Thanks for your comments! > > Geert Uytterhoeven (2): > ARM: perf: Mark all accessor functions inline > arm64: perf: Mark all accessor functions inline > > arch/arm/include/asm/arm_pmuv3.h | 6 +++--- > arch/arm64/include/asm/arm_pmuv3.h | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) > > -- > 2.34.1 > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds
On Mon, May 08, 2023 at 06:05:17PM +0200, Geert Uytterhoeven wrote: > Hi all, > > This patch series adds missing "inline" keywords to the few perf > accessors that lack them. Will, I assume that you'll pick these up as a cleanup/fix. Thanks, Mark. > BTW, I tried converting my local timing code to the new unified system. > This works fine on arm64, but broke on arm32. Is read_pmccntr() > supposed to work on arm32? I get an undefined instruction exception on > Cortex A15 and A9. Before, my custom code used "mrc p15, 0, %0, c9, > c13, 0" (as is also used in arch/arm/kernel/perf_event_v7.c), for which > there is no accessor yet. > > Thanks for your comments! > > Geert Uytterhoeven (2): > ARM: perf: Mark all accessor functions inline > arm64: perf: Mark all accessor functions inline > > arch/arm/include/asm/arm_pmuv3.h | 6 +++--- > arch/arm64/include/asm/arm_pmuv3.h | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) > > -- > 2.34.1 > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds
On Mon, 8 May 2023 18:05:17 +0200, Geert Uytterhoeven wrote: > Hi all, > > This patch series adds missing "inline" keywords to the few perf > accessors that lack them. > > BTW, I tried converting my local timing code to the new unified system. > This works fine on arm64, but broke on arm32. Is read_pmccntr() > supposed to work on arm32? I get an undefined instruction exception on > Cortex A15 and A9. Before, my custom code used "mrc p15, 0, %0, c9, > c13, 0" (as is also used in arch/arm/kernel/perf_event_v7.c), for which > there is no accessor yet. > > [...] Applied to arm64 (for-next/fixes), thanks! [1/2] ARM: perf: Mark all accessor functions inline https://git.kernel.org/arm64/c/68e3f61eb9f5 [2/2] arm64: perf: Mark all accessor functions inline https://git.kernel.org/arm64/c/3bc879e355da Cheers,