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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01EAFC433EF for ; Mon, 21 Mar 2022 10:03:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241910AbiCUKE4 (ORCPT ); Mon, 21 Mar 2022 06:04:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239190AbiCUKEz (ORCPT ); Mon, 21 Mar 2022 06:04:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FEB93C723; Mon, 21 Mar 2022 03:03:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2DEDC612D7; Mon, 21 Mar 2022 10:03:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3718AC340E8; Mon, 21 Mar 2022 10:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647857008; bh=Urs1WBqJhnohfH0zLlL03sA1jfDJexJVbVcUFckiFGw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M71m8WKC9uJ11+TpouqdAedjog3Y7ReATMY41tjTuDB6z6q+HWjN9rCaw0ZbVyLfj afj9hNC9ylnp5ueaxuAlzGFESs8TO4EufIfxhwK9dpdkBz6fCLIXRt+MSguwqcTpqN VYOos0MNu241dfTkSQTpcyX2Petp34pVp+Gl227g= Date: Mon, 21 Mar 2022 11:03:25 +0100 From: Greg Kroah-Hartman To: Quan Nguyen Cc: Lee Jones , Rob Herring , Krzysztof Kozlowski , Jean Delvare , Guenter Roeck , Jonathan Corbet , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Thu Nguyen , Gustavo Pimentel , open list , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:HARDWARE MONITORING" , "open list:DOCUMENTATION" , OpenBMC Maillist , Open Source Submission , Phong Vo , "Thang Q . Nguyen" Subject: Re: [PATCH v7 9/9] docs: ABI: testing: Document the Ampere Altra Family's SMpro sysfs interfaces Message-ID: References: <20220321081355.6802-1-quan@os.amperecomputing.com> <20220321081355.6802-10-quan@os.amperecomputing.com> <8f01a63d-0d10-81ee-7398-b69e496964f8@os.amperecomputing.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f01a63d-0d10-81ee-7398-b69e496964f8@os.amperecomputing.com> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Mon, Mar 21, 2022 at 04:46:36PM +0700, Quan Nguyen wrote: > > > On 21/03/2022 15:23, Greg Kroah-Hartman wrote: > > On Mon, Mar 21, 2022 at 03:13:55PM +0700, Quan Nguyen wrote: > > > Add documentation for the Ampere(R)'s Altra(R) SMpro sysfs interfaces > > > > > > Signed-off-by: Quan Nguyen > > > --- > > > Changes in v7: > > > + First introduce in v7 [Greg] > > > > > > .../sysfs-bus-platform-devices-ampere-smpro | 133 ++++++++++++++++++ > > > 1 file changed, 133 insertions(+) > > > create mode 100644 Documentation/ABI/testing/sysfs-bus-platform-devices-ampere-smpro > > > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-platform-devices-ampere-smpro b/Documentation/ABI/testing/sysfs-bus-platform-devices-ampere-smpro > > > new file mode 100644 > > > index 000000000000..9bfd8d6d0f71 > > > --- /dev/null > > > +++ b/Documentation/ABI/testing/sysfs-bus-platform-devices-ampere-smpro > > > @@ -0,0 +1,133 @@ > > > +What: /sys/bus/platform/devices/smpro-errmon.*/errors_[core|mem|pcie|other]_[ce|ue] > > > > Please split this out as one entry per file. > > > > These sysfs share same format of HW errors (the 48-byte Arm vendor specific > HW error record) but for separate HW domains: Core, PCIe, Mem... etc > > > > +KernelVersion: 5.14 > > > > 5.14 is a long time ago. > > > > > +Contact: quan@os.amperecomputing.com > > > +Description: > > > + (RO) Contains the 48-byte Ampere (Vendor-Specific) Error Record, see [1] > > > + printed in hex format as below: > > > + > > > + AA BB CCCC DDDDDDDD DDDDDDDDDDDDDDDD DDDDDDDDDDDDDDDD \ > > > + DDDDDDDDDDDDDDDD DDDDDDDDDDDDDDDD DDDDDDDDDDDDDDDD > > > + Where: > > > + AA : Error Type > > > + BB : Subtype > > > + CCCC : Instance > > > + DDD...DDD: Similar to the Arm RAS standard error record > > > > No, this is not a valid sysfs file, sorry. This should just be one > > value per file. > > > > This 48-byte value is unable to separate into smaller values because it > contain all information necessary to indicate a single HW error as per ARM > RAS supplement document [1]. The format is to make it read-able other than a > single 48-byte hex value. > > [1] https://developer.arm.com/documentation/ddi0587/latest/ Just export the 48 byte hex value and make userspace split it up if it wants to do so. Don't do things in the kernel that can be done in userspace. thanks, greg k-h 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 7485BC433F5 for ; Mon, 21 Mar 2022 10:04:10 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4KMVZd1Cgfz30Q9 for ; Mon, 21 Mar 2022 21:04:09 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=M71m8WKC; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linuxfoundation.org (client-ip=145.40.68.75; helo=ams.source.kernel.org; envelope-from=gregkh@linuxfoundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=M71m8WKC; dkim-atps=neutral Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4KMVYw2FdLz3071 for ; Mon, 21 Mar 2022 21:03:32 +1100 (AEDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CAEA9B811B8; Mon, 21 Mar 2022 10:03:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3718AC340E8; Mon, 21 Mar 2022 10:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647857008; bh=Urs1WBqJhnohfH0zLlL03sA1jfDJexJVbVcUFckiFGw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M71m8WKC9uJ11+TpouqdAedjog3Y7ReATMY41tjTuDB6z6q+HWjN9rCaw0ZbVyLfj afj9hNC9ylnp5ueaxuAlzGFESs8TO4EufIfxhwK9dpdkBz6fCLIXRt+MSguwqcTpqN VYOos0MNu241dfTkSQTpcyX2Petp34pVp+Gl227g= Date: Mon, 21 Mar 2022 11:03:25 +0100 From: Greg Kroah-Hartman To: Quan Nguyen Subject: Re: [PATCH v7 9/9] docs: ABI: testing: Document the Ampere Altra Family's SMpro sysfs interfaces Message-ID: References: <20220321081355.6802-1-quan@os.amperecomputing.com> <20220321081355.6802-10-quan@os.amperecomputing.com> <8f01a63d-0d10-81ee-7398-b69e496964f8@os.amperecomputing.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f01a63d-0d10-81ee-7398-b69e496964f8@os.amperecomputing.com> X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:HARDWARE MONITORING" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Jean Delvare , Phong Vo , Arnd Bergmann , Jonathan Corbet , Gustavo Pimentel , Dragan Cvetic , "open list:DOCUMENTATION" , open list , "Thang Q . Nguyen" , OpenBMC Maillist , Thu Nguyen , Rob Herring , Krzysztof Kozlowski , Open Source Submission , Lee Jones , Derek Kiernan , Guenter Roeck Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" On Mon, Mar 21, 2022 at 04:46:36PM +0700, Quan Nguyen wrote: > > > On 21/03/2022 15:23, Greg Kroah-Hartman wrote: > > On Mon, Mar 21, 2022 at 03:13:55PM +0700, Quan Nguyen wrote: > > > Add documentation for the Ampere(R)'s Altra(R) SMpro sysfs interfaces > > > > > > Signed-off-by: Quan Nguyen > > > --- > > > Changes in v7: > > > + First introduce in v7 [Greg] > > > > > > .../sysfs-bus-platform-devices-ampere-smpro | 133 ++++++++++++++++++ > > > 1 file changed, 133 insertions(+) > > > create mode 100644 Documentation/ABI/testing/sysfs-bus-platform-devices-ampere-smpro > > > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-platform-devices-ampere-smpro b/Documentation/ABI/testing/sysfs-bus-platform-devices-ampere-smpro > > > new file mode 100644 > > > index 000000000000..9bfd8d6d0f71 > > > --- /dev/null > > > +++ b/Documentation/ABI/testing/sysfs-bus-platform-devices-ampere-smpro > > > @@ -0,0 +1,133 @@ > > > +What: /sys/bus/platform/devices/smpro-errmon.*/errors_[core|mem|pcie|other]_[ce|ue] > > > > Please split this out as one entry per file. > > > > These sysfs share same format of HW errors (the 48-byte Arm vendor specific > HW error record) but for separate HW domains: Core, PCIe, Mem... etc > > > > +KernelVersion: 5.14 > > > > 5.14 is a long time ago. > > > > > +Contact: quan@os.amperecomputing.com > > > +Description: > > > + (RO) Contains the 48-byte Ampere (Vendor-Specific) Error Record, see [1] > > > + printed in hex format as below: > > > + > > > + AA BB CCCC DDDDDDDD DDDDDDDDDDDDDDDD DDDDDDDDDDDDDDDD \ > > > + DDDDDDDDDDDDDDDD DDDDDDDDDDDDDDDD DDDDDDDDDDDDDDDD > > > + Where: > > > + AA : Error Type > > > + BB : Subtype > > > + CCCC : Instance > > > + DDD...DDD: Similar to the Arm RAS standard error record > > > > No, this is not a valid sysfs file, sorry. This should just be one > > value per file. > > > > This 48-byte value is unable to separate into smaller values because it > contain all information necessary to indicate a single HW error as per ARM > RAS supplement document [1]. The format is to make it read-able other than a > single 48-byte hex value. > > [1] https://developer.arm.com/documentation/ddi0587/latest/ Just export the 48 byte hex value and make userspace split it up if it wants to do so. Don't do things in the kernel that can be done in userspace. thanks, greg k-h