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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8144EB64D7 for ; Fri, 30 Jun 2023 11:17:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nNkmoO/SHqf0Hrx3BcEFVXNXdxpXI37cabk6ZF7XpYw=; b=N/fOhB88t7EOGk NOytVOYnTtfKftUt7188EeV9Ie0NEQYwoM3s45iI94MIpJinKV9eBxYdeMQNNju54ke2Zh+sLzn5P 5V4laheInnzDdTxm+tr57XwD10FNwQoFqTJ5NytAJZVwl9Xdak09EAptWjGHuV7LFf3d/T4wEf9yF aGuuBcyFnXbYLY/6a9rvn1DBm2NuJfr1hCc7oJ/N4nbXnpsPt0dRW7yizPOBtANjLIKGLgCh6OeyJ sKbxZygDkuf378Yetm0j8HcmtcRYuIUszpUAu/5AFFEvzdbRzwSefxuoVnj10Dvk/Wmes2I0FyMAx VELHIr31MRABpdVHDnSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qFC7O-003Zq3-0I; Fri, 30 Jun 2023 11:16:50 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qFC7K-003Znq-34 for linux-arm-kernel@lists.infradead.org; Fri, 30 Jun 2023 11:16:48 +0000 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-98de21518fbso203859666b.0 for ; Fri, 30 Jun 2023 04:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1688123802; x=1690715802; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=G8RwKyWjQ7rl3Ppk6BKT6e69k8Me0Zd0vefhl7KFO/s=; b=alSd83XbCIZVP078BLSQM0l4zqXAmX9RA3KGRnaY0VhC8hH2Q7YphCMDU6ie3QuThk O1RYBXNwBlv24hRu/r78aorS08LRpDAnGkPJ6pLRkxMN9wYzGXmWGO53nTSShJxsjJM4 lWAK6bN478iwmKDc4K6TB6+s/aQQWDu4nEpNzbieMCgZlZO6+K+5u6k86+dWD14sPWUh JICl5qx/D6iS0mtvfgjli1Cv0Gg+GVVdP3E8PZznNgza08lE2OoqtJKQps5qiO6Ysr2M 0+/spiNhqfevxHk8EEBDMRP326Z+3vUIOk6Ca0WwHpBhg2jcwDXW7hSsFJM/qQEvnjlC 7rOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688123802; x=1690715802; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=G8RwKyWjQ7rl3Ppk6BKT6e69k8Me0Zd0vefhl7KFO/s=; b=fY3YFES7uHMohvG8C0aCpQYYr2HwIyv3bqZ/8B5PuFklCbSkXW7VutNBxO2Aefudet 7RAdcGd/bxCDydiG49xNVuDrXa25tvGkQ7GPM+RC4cVSODC1qfBLk9zoWUmonn2g5uhN q6WO5ahMFqNY3nXbCgmff1IR33s1cQtoO8/ECSO9laARvAi8ZScO6UV/0+8G0f7GmaYI 4aGPBVrMpIdnaI3TI4vJOhjXn/hP/So9YxYz5/ML1tQFn6rLpdrLuxybWm4uB8m531o9 wolrEzRaxdpCfcixlI4V7ODPdJMVdt9q1i4ioroyM85iHKjKO2ZQcHYSyt0nbIoJ7dDf ZeYg== X-Gm-Message-State: ABy/qLaAZujCW9uuUSdX0RpkHT5uz+0Wj8aTaDSfp5oekcKwTCfduXZa FkqPcIlc0LrL7xTme3iKAVa9jQ== X-Google-Smtp-Source: APBJJlGSh9pnM2wyCvB7H8i4x229ME/Bu1b+gqOsS0eyPxPuv9wkd6hm541bA82OQ/1dlmptKbQXrA== X-Received: by 2002:a17:906:d961:b0:990:8807:8f88 with SMTP id rp1-20020a170906d96100b0099088078f88mr1741080ejb.55.1688123802399; Fri, 30 Jun 2023 04:16:42 -0700 (PDT) Received: from localhost (2001-1ae9-1c2-4c00-20f-c6b4-1e57-7965.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:20f:c6b4:1e57:7965]) by smtp.gmail.com with ESMTPSA id u12-20020a1709064acc00b009930308425csm22356ejt.31.2023.06.30.04.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 04:16:42 -0700 (PDT) Date: Fri, 30 Jun 2023 13:16:41 +0200 From: Andrew Jones To: Alexandre Ghiti Cc: Jonathan Corbet , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Paul Walmsley , Palmer Dabbelt , Albert Ou , Atish Patra , Anup Patel , Will Deacon , Rob Herring , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 08/10] Documentation: admin-guide: Add riscv sysctl_perf_user_access Message-ID: <20230630-f714cc46ee65cc65318f2ada@orel> References: <20230630083013.102334-1-alexghiti@rivosinc.com> <20230630083013.102334-9-alexghiti@rivosinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230630083013.102334-9-alexghiti@rivosinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230630_041646_991009_74A8893B X-CRM114-Status: GOOD ( 25.54 ) 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 On Fri, Jun 30, 2023 at 10:30:11AM +0200, Alexandre Ghiti wrote: > riscv now uses this sysctl so document its usage for this architecture. > > Signed-off-by: Alexandre Ghiti > --- > Documentation/admin-guide/sysctl/kernel.rst | 26 +++++++++++++++++---- > 1 file changed, 22 insertions(+), 4 deletions(-) > > diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst > index d85d90f5d000..c376692b372b 100644 > --- a/Documentation/admin-guide/sysctl/kernel.rst > +++ b/Documentation/admin-guide/sysctl/kernel.rst > @@ -941,16 +941,34 @@ enabled, otherwise writing to this file will return ``-EBUSY``. > The default value is 8. > > > -perf_user_access (arm64 only) > -================================= > +perf_user_access (arm64 and riscv only) > +======================================= > + > +Controls user space access for reading perf event counters. > > -Controls user space access for reading perf event counters. When set to 1, > -user space can read performance monitor counter registers directly. > +arm64 > +===== > > The default value is 0 (access disabled). Should add a blank line here. > +When set to 1, user space can read performance monitor counter registers > +directly. > > See Documentation/arm64/perf.rst for more information. > > +riscv > +===== > + > +When set to 0, user access is disabled. > + > +When set to 1, user space can read performance monitor counter registers > +directly only through perf, any direct access without perf intervention will Remove 'directly only' (It can't be both "direct" and "through" at the same time.) > +trigger an illegal instruction. > + > +The default value is 2, This is no longer true. > which enables legacy mode (user space has direct > +access to cycle and insret CSRs only). Note that this legacy value > +is deprecated and will be removed once all userspace applications are fixed. > + > +Note that the time CSR is for now always accessible to all modes. s/always accessible/always directly accessible/ Also, remove 'for now'. While we may change this in the future, I'm not sure if the 'for now' helps much. Maybe a "This may change in the future." type of sentence? Or, just nothing (for now :-) and we'll modify this document if it changes later. Thanks, drew > > pid_max > ======= > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel