Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3353641rwb; Sat, 3 Dec 2022 03:38:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf5B9tfsQ6xYkhv88VgCcioOK6H8/Dguh6FfCAiZU4UPo+KqVHZw7l7zC+GMuvVCZ9vxYMtc X-Received: by 2002:aa7:cad5:0:b0:461:948e:55db with SMTP id l21-20020aa7cad5000000b00461948e55dbmr67828329edt.131.1670067508365; Sat, 03 Dec 2022 03:38:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670067508; cv=none; d=google.com; s=arc-20160816; b=cr5Ik9XQGmz+TcF0uw/gYmqjPjaQi+qYg6FV6XhrTtYUl6ntRPQEwcMxcyMtekXkW2 XX0qId2HMaXnLewF03YEgyUAu0x4oGwQONI+G3cCwojlMVVl0GiOq83D8Z7U83yMJFGu YEEc8fN952mpZM4OKoawKf4Znso7qZ3ZqfQqMFDuXvyERMbL/g6sHGQ66cSKF1zOINM8 OAag9CuHEq4qW9UnsmtF7pQSrgdccLTxT7e3HXWOIIs3lQ5NL/HdkAWBdpZT/sYPNJgk mcoBkF000Ade5mrbHlI+TUUnLukA4+hwtnxWduIwU1A6pcHR9c05zNydEDnn2ZqCFkLD /uig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature:dkim-filter; bh=AcvliI0lkNH/1gvzi1wuMUNaRNRaEKyutJ7x8ZgHioo=; b=hLb/sHyYg+oNPrED9k7mQBBoSw6DBRWwUKn9Ywj3fDH8eEg0h02vJVEK+caJPzeVi5 kPSMgRQLq5387GpZRAUnnflepedNisk2+e8ib8sah40pDrQnNiiU/v9eRrOfnkryey9x Q7iGntr4dP4Of2gs76qHq2n/zprVDPIGroXvjoLipVS9vJWWOHEgnVg4bjrkLGe7YH2B sS0cr/0XylhCOKAUN053RUX8+BuJN9GhIb4CIJTOvo8t1u9DD+HjgLS3eCarc081DxWH EAV7UDh2mHOW4nK6LivlVegycQBlqut4QlSNvyHs7zn2zq9aq4dakuCGdlyyV8hgxM7T V27w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=CHCA02xM; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb9-20020a1709076d8900b007879bb73291si8382991ejc.807.2022.12.03.03.38.07; Sat, 03 Dec 2022 03:38:28 -0800 (PST) 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; dkim=pass header.i=@lwn.net header.s=20201203 header.b=CHCA02xM; 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 S229452AbiLCKjB (ORCPT + 82 others); Sat, 3 Dec 2022 05:39:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbiLCKi5 (ORCPT ); Sat, 3 Dec 2022 05:38:57 -0500 Received: from ms.lwn.net (ms.lwn.net [IPv6:2600:3c01:e000:3a1::42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDF7759FC8; Sat, 3 Dec 2022 02:38:55 -0800 (PST) Received: from localhost (mdns.lwn.net [45.79.72.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id CC32B723; Sat, 3 Dec 2022 10:38:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net CC32B723 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1670063935; bh=AcvliI0lkNH/1gvzi1wuMUNaRNRaEKyutJ7x8ZgHioo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=CHCA02xMNduX7UNI7ipKcoRy8ZCNWX2Db2OFXlJYv4tgtTeJeXByBswOeU1PEWu1/ KkGWdqySGqwF+0OGkLS+Oy5Ept6k1UJTHkIq+AUQcj+rnsGSq0HVHiNKweDwUHUOp9 XOn/rlfrHkfD2moHIkXbvLpOJVIg79/dY60f3XhyKDh64H1bG1P0EODCMnJ0QHWcWq EFJAVY3zjG+IzkFRVKdR+gQxRzx/F6nxhlpBkF2Mdgb3JOPRzMzk09DVaoZlySONlw AfA7jaUoLSmQaMOQZ1UD3f7ABR93ySW/3+osU1G+CFY948I4zGWUIHLpCtTB2moRmF EfsDMEAMKmINA== From: Jonathan Corbet To: Palmer Dabbelt , Conor Dooley Cc: Conor Dooley , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Documentation: riscv: note that counter access is part of the uABI In-Reply-To: References: Date: Sat, 03 Dec 2022 03:38:49 -0700 Message-ID: <87359wpy9y.fsf@meer.lwn.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 Palmer Dabbelt writes: > On Thu, 01 Dec 2022 05:51:10 PST (-0800), Conor Dooley wrote: >> Commit 5a5294fbe020 ("RISC-V: Re-enable counter access from userspace") >> fixed userspace access to CYCLE, TIME & INSTRET counters and left a nice >> comment in-place about why they must not be restricted. Since we now >> have a uABI doc in RISC-V land, add a section documenting it. >> >> Signed-off-by: Conor Dooley >> --- >> Based on an, as yet, unsent v2 of my other uABI changes. I don't expect >> it to be applicable, just getting a patch into patchwork while I don't >> forget about this. >> --- >> Documentation/riscv/uabi.rst | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/Documentation/riscv/uabi.rst b/Documentation/riscv/uabi.rst >> index 8d2651e42fda..638ddce56700 100644 >> --- a/Documentation/riscv/uabi.rst >> +++ b/Documentation/riscv/uabi.rst >> @@ -3,6 +3,13 @@ >> RISC-V Linux User ABI >> ===================== >> >> +Counter access >> +-------------- >> + >> +Access to the CYCLE, TIME and INSTRET counters, now controlled by the SBI PMU >> +extension, were part of the ISA when the uABI was frozen & so remain accessible >> +from userspace. >> + >> ISA string ordering in /proc/cpuinfo >> ------------------------------------ >> >> >> base-commit: 13ee7ef407cfcf63f4f047460ac5bb6ba5a3447d >> prerequisite-patch-id: d17a9ffb6fcf99eb683728da98cd50e18cd28fe8 >> prerequisite-patch-id: 0df4127e3f4a0c02a235fea00bcb69cd94fabb38 >> prerequisite-patch-id: 171724b870ba212b714ebbded480269accd83733 > > Reviewed-by: Palmer Dabbelt > Acked-by: Palmer Dabbelt > > I think I merged the last one of these, but if the doc folks pick it up > that's fine with me. Otherwise I'll take it when it comes back around, > so folks have time to take a look. "Doc folks" applied it, thanks. :) jon