From nobody Sun Feb 8 11:26:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D0E51A2C06; Fri, 17 Jan 2025 17:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; cv=none; b=Tjz0wUOrVDnUSVNfSXLqjnEUVX81xSuSPo5JAgbgnr1tLaN6vWN/Yn9HntrDhHRCrJjfjtFYPw16QHwcfFqyDVq5UXiZ52HZmpUVmjnrZ4vW3dXD5v6mQGRy7LP/tCRRx74RX9NLG3DcWxnTpY9gmlwz7VGMP3x+Lb/GP0uZ/48= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; c=relaxed/simple; bh=/H+OLoZ2kSlBBHpxEGHakZW6kJ82w76RHhbP2QrkPCg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sSa8HlbUifwhJ5SK+q1dghUPKbhvD59K4QYWOCvn0DHgBO3knMDXfVd0LW07n31pXZfXn0Xpw1CH09Z2+t7IlQlA99bQnkfYS68CVJvk4YVux7BZIOFH7IY/0oNpg2/7T/xbpAlJ6L9QmNGeIe4r5pswD1J0Bf7Pr72F8MPcbUI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dG+Xd8mZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dG+Xd8mZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0A37C4AF09; Fri, 17 Jan 2025 17:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737136795; bh=/H+OLoZ2kSlBBHpxEGHakZW6kJ82w76RHhbP2QrkPCg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dG+Xd8mZFVXg4fa5H++CKRhsZ+liEdeBWougxx6Ap+TiFx0hAyU0ekKs92BE9oZRl 4Se7/zbmfVUHSwpGtM9EQz7Da0dVGB+EixQJvxd/j/hp0HPveGU9K1SVk55T06seZd yKpb/a6gLZFljuBYuiVReDQIn0X8tej2/OcDXoZqHmHBUGiOvJ4rDmabSahbZFB4aw VdXdW43VQUPmYrxSaJQdP22VbhqG4DxUHu6KKp1Kq2wpca5Jr+0DJHxWkMlPzNrcXd DYbKuVjLyQa2juBlAhBK8NMycYn1+TaAh28f2Av3hOFRwC6PPkHORsn6uscxtiXTst VcUDYVq2JUfrw== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tYqdM-00000006AjX-1Yq4; Fri, 17 Jan 2025 18:59:52 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org Subject: [PATCH RFC 01/10] scripts/get_abi.pl use label to better sort ABI symbols and files Date: Fri, 17 Jan 2025 18:59:30 +0100 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" Currently, not all symbols are in labeled alphabetic order. That's because they are using the hash table key, which doesn't necessarely are identical to the label displayed for each symbol/file. Add labels to file as well and use labels instead of key names to sort them. Signed-off-by: Mauro Carvalho Chehab --- scripts/get_abi.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl index de1c0354b50c..2311d4e3f3ef 100755 --- a/scripts/get_abi.pl +++ b/scripts/get_abi.pl @@ -108,6 +108,7 @@ sub parse_abi { $data{$nametag}->{filepath} =3D $file; $data{$nametag}->{is_file} =3D 1; $data{$nametag}->{line_no} =3D 1; + $data{$nametag}->{label} =3D "abi_file_$fn"; =20 my $type =3D $file; $type =3D~ s,.*/(.*)/.*,$1,; @@ -320,7 +321,7 @@ sub output_rest { =20 foreach my $what (sort { ($data{$a}->{type} eq "File") cmp ($data{$b}->{type} eq "File") || - $a cmp $b + $data{$a}->{label} cmp $data{$b}->{label} } keys %data) { my $type =3D $data{$what}->{type}; =20 --=20 2.47.1 From nobody Sun Feb 8 11:26:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26B19188A18; Fri, 17 Jan 2025 17:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; cv=none; b=um3PeEYxOprNB8YoVD+y+U+6hopCdDm564PHtQjLg1EyTHcvUWGEvkxIzprHWKYih2atyZFsHEmrZ4ajxsKm1RNAOxqupjI4baT9d70ZdKQlOR5ISyPiuoXUOWFlxoAYse8ld3TlFtg38+ujKGAbyIfe152OGAygrFTcndrFdy4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; c=relaxed/simple; bh=DpwGZSjL1fDJ0MaoW/bdtyNx3vjLki1I5aLnRAqCHUk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ev3Vd0i0zyyyP7gz5FUeu35nhbUUY0G2uXAnU8pyipBTcE+Nr+7m/skkLizUCRz0lguahtEIiwq3lxR296BFP0snYdBCqxKWztrctrO256TctbcqfgCBe2Vpye/gNRiARP3+nHvteOaATQzvN+2YL2Pm/Um5GuKBI0UPhwdl6rA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r6urYEaR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="r6urYEaR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBDEBC4CEE4; Fri, 17 Jan 2025 17:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737136795; bh=DpwGZSjL1fDJ0MaoW/bdtyNx3vjLki1I5aLnRAqCHUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r6urYEaR4nDHxapeT6xlt4vzEuRlTwL+Q1lnfNEoU1H+qB7mmdQs79LroUYX2DVw4 tdF2mw11KXFl62VieEzoTkLRy09LpdyjVs/ZuAzhjRdhgYhliy/lJmJ9w+2kwowukU SYOS7fYNlgGqEB/ZQuxrBTpFF4UkUNCLDf56YLRNHWug6yMduuG1vYLs6onQhsyjLI 0l2mfudVNXpz/oknYrUfNsogOq0K/Kl02ITJNxjeDhhf4+zxGr96ZddVUAi0pNbiPi 8oYOwgsTmdcsNjOgQ0IxUOczExKxjMqh55SneZTAmzPvT858n0Gu/20nmvU7BVPzZO urmTc9RJV22mw== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tYqdM-00000006Ajb-1fTL; Fri, 17 Jan 2025 18:59:52 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , Johannes Berg , linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org Subject: [PATCH RFC 02/10] ABI: sysfs-class-rfkill: fix kernelversion tags Date: Fri, 17 Jan 2025 18:59:31 +0100 Message-ID: <07d4e82750f20b92a18b526a900ffd8c89180aed.1737135484.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" Some kernelversion tags are missing colons. Add them to comply with ABI description and produce right results when converted to html/pdf. Signed-off-by: Mauro Carvalho Chehab --- Documentation/ABI/removed/sysfs-class-rfkill | 2 +- Documentation/ABI/stable/sysfs-class-rfkill | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/ABI/removed/sysfs-class-rfkill b/Documentation/A= BI/removed/sysfs-class-rfkill index f25174eafd55..20cb688af173 100644 --- a/Documentation/ABI/removed/sysfs-class-rfkill +++ b/Documentation/ABI/removed/sysfs-class-rfkill @@ -4,7 +4,7 @@ For details to this subsystem look at Documentation/driver-= api/rfkill.rst. =20 What: /sys/class/rfkill/rfkill[0-9]+/claim Date: 09-Jul-2007 -KernelVersion v2.6.22 +KernelVersion: v2.6.22 Contact: linux-wireless@vger.kernel.org Description: This file was deprecated because there no longer was a way to claim just control over a single rfkill instance. diff --git a/Documentation/ABI/stable/sysfs-class-rfkill b/Documentation/AB= I/stable/sysfs-class-rfkill index 037979f7dc4b..67b605e3dd16 100644 --- a/Documentation/ABI/stable/sysfs-class-rfkill +++ b/Documentation/ABI/stable/sysfs-class-rfkill @@ -16,7 +16,7 @@ Description: The rfkill class subsystem folder. =20 What: /sys/class/rfkill/rfkill[0-9]+/name Date: 09-Jul-2007 -KernelVersion v2.6.22 +KernelVersion: v2.6.22 Contact: linux-wireless@vger.kernel.org Description: Name assigned by driver to this key (interface or driver nam= e). Values: arbitrary string. @@ -24,7 +24,7 @@ Values: arbitrary string. =20 What: /sys/class/rfkill/rfkill[0-9]+/type Date: 09-Jul-2007 -KernelVersion v2.6.22 +KernelVersion: v2.6.22 Contact: linux-wireless@vger.kernel.org Description: Driver type string ("wlan", "bluetooth", etc). Values: See include/linux/rfkill.h. @@ -32,7 +32,7 @@ Values: See include/linux/rfkill.h. =20 What: /sys/class/rfkill/rfkill[0-9]+/persistent Date: 09-Jul-2007 -KernelVersion v2.6.22 +KernelVersion: v2.6.22 Contact: linux-wireless@vger.kernel.org Description: Whether the soft blocked state is initialised from non-volat= ile storage at startup. @@ -44,7 +44,7 @@ Values: A numeric value: =20 What: /sys/class/rfkill/rfkill[0-9]+/state Date: 09-Jul-2007 -KernelVersion v2.6.22 +KernelVersion: v2.6.22 Contact: linux-wireless@vger.kernel.org Description: Current state of the transmitter. This file was scheduled to be removed in 2014, but due to its @@ -67,7 +67,7 @@ Values: A numeric value. =20 What: /sys/class/rfkill/rfkill[0-9]+/hard Date: 12-March-2010 -KernelVersion v2.6.34 +KernelVersion: v2.6.34 Contact: linux-wireless@vger.kernel.org Description: Current hardblock state. This file is read only. Values: A numeric value. @@ -81,7 +81,7 @@ Values: A numeric value. =20 What: /sys/class/rfkill/rfkill[0-9]+/soft Date: 12-March-2010 -KernelVersion v2.6.34 +KernelVersion: v2.6.34 Contact: linux-wireless@vger.kernel.org Description: Current softblock state. This file is read and write. Values: A numeric value. --=20 2.47.1 From nobody Sun Feb 8 11:26:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CF0B1A4F2B; Fri, 17 Jan 2025 17:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; cv=none; b=d6XQDAWNZjYN+ijw2fyt6+c35Z3eJpuiDy1WTkLJHk3cDyh1oM5hW0y8u2NckgsSf/xWXHsHuernpYKQdtnfL3jMk+vGz3BQ4w11uXwqDMNtRPxNZbecdLcLQFTgBA303G8iYuPr0mCBebFkrQVUCfE/Pd2cANjVyHRA32XMT3w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; c=relaxed/simple; bh=6gEYJTjQk5lbuerHoQnuWyfqni0OXL5KFNZYTT6nkQM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=unvf3v9q68vbfTp+Pzr+CiAlYqkfSMZ4NGMAS87ByfzhQ1vnWPvNByYRefw65Nfw7OGMsV9IRTd9WYB7RP7D13crazDm6H3M/ir2CxUNYtESXQQm5UoxqAdzddJaBy7ArYd8NTztXOsWje7eSW+yQnM7udccOXY3Ykblq5ymfLs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YASA+Q+V; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YASA+Q+V" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1FD3C4AF0B; Fri, 17 Jan 2025 17:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737136795; bh=6gEYJTjQk5lbuerHoQnuWyfqni0OXL5KFNZYTT6nkQM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YASA+Q+VT35wve+F9U70COnpE2hAPHn//MRQ/TmSM2ps31nQHubj3iFb39ruaCYa5 PpTlEKOCrRPjZoO0f9LdAGMdPWd0amvweNDhNX1uwsPap292UA4X3VLOpJJkegJVth /sqnSX+Nq/gC0g3mMbSAE/26BTSSlAJ1C4H0yuf1I2TTqdWY3lLtouiW4H2z73WsMo pdzTxda1YQ0hbOC4uJTxZpfhW+7SF/O2XVUvG4PZFAmYdYr+EsSpsFTHhs/ERNAMU3 c9+AS76Hz3If4Df4r83zslFKjeUWk7lO5Dfjtz5v+1n57ZOX3fcYaSNdu/UZbRNf0r LNeibgqt1keKA== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tYqdM-00000006Ajf-1mxH; Fri, 17 Jan 2025 18:59:52 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , James Clark , Mike Leach , Suzuki K Poulose , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH RFC 03/10] ABI: sysfs-bus-coresight-*: fix kernelversion tags Date: Fri, 17 Jan 2025 18:59:32 +0100 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" Some kernelversion tags are missing colons. Add them to comply with ABI description and produce right results when converted to html/pdf. Signed-off-by: Mauro Carvalho Chehab --- .../testing/sysfs-bus-coresight-devices-cti | 78 +++++++++---------- .../testing/sysfs-bus-coresight-devices-tpdm | 52 ++++++------- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-cti b/Do= cumentation/ABI/testing/sysfs-bus-coresight-devices-cti index bf2869c413e7..a97b70f588da 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-cti +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-cti @@ -1,241 +1,241 @@ What: /sys/bus/coresight/devices//enable Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (RW) Enable/Disable the CTI hardware. =20 What: /sys/bus/coresight/devices//powered Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) Indicate if the CTI hardware is powered. =20 What: /sys/bus/coresight/devices//ctmid Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) Display the associated CTM ID =20 What: /sys/bus/coresight/devices//nr_trigger_cons Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) Number of devices connected to triggers on this CTI =20 What: /sys/bus/coresight/devices//triggers/name Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) Name of connected device =20 What: /sys/bus/coresight/devices//triggers/in_signals Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) Input trigger signals from connected device =20 What: /sys/bus/coresight/devices//triggers/in_types Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) Functional types for the input trigger signals from connected device =20 What: /sys/bus/coresight/devices//triggers/out_signals Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) Output trigger signals to connected device =20 What: /sys/bus/coresight/devices//triggers/out_types Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) Functional types for the output trigger signals to connected device =20 What: /sys/bus/coresight/devices//regs/inout_sel Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (RW) Select the index for inen and outen registers. =20 What: /sys/bus/coresight/devices//regs/inen Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (RW) Read or write the CTIINEN register selected by inout_sel. =20 What: /sys/bus/coresight/devices//regs/outen Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (RW) Read or write the CTIOUTEN register selected by inout_se= l. =20 What: /sys/bus/coresight/devices//regs/gate Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (RW) Read or write CTIGATE register. =20 What: /sys/bus/coresight/devices//regs/asicctl Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (RW) Read or write ASICCTL register. =20 What: /sys/bus/coresight/devices//regs/intack Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Write) Write the INTACK register. =20 What: /sys/bus/coresight/devices//regs/appset Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (RW) Set CTIAPPSET register to activate channel. Read back to determine current value of register. =20 What: /sys/bus/coresight/devices//regs/appclear Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Write) Write APPCLEAR register to deactivate channel. =20 What: /sys/bus/coresight/devices//regs/apppulse Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Write) Write APPPULSE to pulse a channel active for one clock cycle. =20 What: /sys/bus/coresight/devices//regs/chinstatus Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) Read current status of channel inputs. =20 What: /sys/bus/coresight/devices//regs/choutstatus Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) read current status of channel outputs. =20 What: /sys/bus/coresight/devices//regs/triginstatus Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) read current status of input trigger signals =20 What: /sys/bus/coresight/devices//regs/trigoutstatus Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) read current status of output trigger signals. =20 What: /sys/bus/coresight/devices//channels/trigin_attach Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Write) Attach a CTI input trigger to a CTM channel. =20 What: /sys/bus/coresight/devices//channels/trigin_detach Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Write) Detach a CTI input trigger from a CTM channel. =20 What: /sys/bus/coresight/devices//channels/trigout_attach Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Write) Attach a CTI output trigger to a CTM channel. =20 What: /sys/bus/coresight/devices//channels/trigout_detach Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Write) Detach a CTI output trigger from a CTM channel. =20 What: /sys/bus/coresight/devices//channels/chan_gate_enable Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (RW) Enable CTIGATE for single channel (Write) or list enabled channels through the gate (R). =20 What: /sys/bus/coresight/devices//channels/chan_gate_disable Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Write) Disable CTIGATE for single channel. =20 What: /sys/bus/coresight/devices//channels/chan_set Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Write) Activate a single channel. =20 What: /sys/bus/coresight/devices//channels/chan_clear Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Write) Deactivate a single channel. =20 What: /sys/bus/coresight/devices//channels/chan_pulse Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Write) Pulse a single channel - activate for a single clock = cycle. =20 What: /sys/bus/coresight/devices//channels/trigout_filtered Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) List of output triggers filtered across all connection= s. =20 What: /sys/bus/coresight/devices//channels/trig_filter_enable Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (RW) Enable or disable trigger output signal filtering. =20 What: /sys/bus/coresight/devices//channels/chan_inuse Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) show channels with at least one attached trigger signa= l. =20 What: /sys/bus/coresight/devices//channels/chan_free Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) show channels with no attached trigger signals. =20 What: /sys/bus/coresight/devices//channels/chan_xtrigs_sel Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (RW) Write channel number to select a channel to view, read to see selected channel number. =20 What: /sys/bus/coresight/devices//channels/chan_xtrigs_in Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) Read to see input triggers connected to selected view channel. =20 What: /sys/bus/coresight/devices//channels/chan_xtrigs_out Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Read) Read to see output triggers connected to selected view channel. =20 What: /sys/bus/coresight/devices//channels/chan_xtrigs_reset Date: March 2020 -KernelVersion 5.7 +KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Write) Clear all channel / trigger programming. diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpdm b/D= ocumentation/ABI/testing/sysfs-bus-coresight-devices-tpdm index bf710ea6e0ef..53cb454b60d0 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpdm +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpdm @@ -1,6 +1,6 @@ What: /sys/bus/coresight/devices//integration_test Date: January 2023 -KernelVersion 6.2 +KernelVersion: 6.2 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (Write) Run integration test for tpdm. Integration test @@ -14,7 +14,7 @@ Description: =20 What: /sys/bus/coresight/devices//reset_dataset Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (Write) Reset the dataset of the tpdm. @@ -24,7 +24,7 @@ Description: =20 What: /sys/bus/coresight/devices//dsb_trig_type Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the trigger type of the DSB for tpdm. @@ -35,7 +35,7 @@ Description: =20 What: /sys/bus/coresight/devices//dsb_trig_ts Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the trigger timestamp of the DSB for tpdm. @@ -46,7 +46,7 @@ Description: =20 What: /sys/bus/coresight/devices//dsb_mode Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the programming mode of the DSB for tpdm. @@ -60,7 +60,7 @@ Description: =20 What: /sys/bus/coresight/devices//dsb_edge/ctrl_idx Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the index number of the edge detection for the DSB @@ -69,7 +69,7 @@ Description: =20 What: /sys/bus/coresight/devices//dsb_edge/ctrl_val Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: Write a data to control the edge detection corresponding to @@ -85,7 +85,7 @@ Description: =20 What: /sys/bus/coresight/devices//dsb_edge/ctrl_mask Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: Write a data to mask the edge detection corresponding to the index @@ -97,21 +97,21 @@ Description: =20 What: /sys/bus/coresight/devices//dsb_edge/edcr[0:15] Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: Read a set of the edge control value of the DSB in TPDM. =20 What: /sys/bus/coresight/devices//dsb_edge/edcmr[0:7] Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: Read a set of the edge control mask of the DSB in TPDM. =20 What: /sys/bus/coresight/devices//dsb_trig_patt/xpr[0:7] Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the value of the trigger pattern for the DSB @@ -119,7 +119,7 @@ Description: =20 What: /sys/bus/coresight/devices//dsb_trig_patt/xpmr[0:7] Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the mask of the trigger pattern for the DSB @@ -127,21 +127,21 @@ Description: =20 What: /sys/bus/coresight/devices//dsb_patt/tpr[0:7] Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the value of the pattern for the DSB subunit TPDM. =20 What: /sys/bus/coresight/devices//dsb_patt/tpmr[0:7] Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the mask of the pattern for the DSB subunit TPDM. =20 What: /sys/bus/coresight/devices//dsb_patt/enable_ts Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (Write) Set the pattern timestamp of DSB tpdm. Read @@ -153,7 +153,7 @@ Description: =20 What: /sys/bus/coresight/devices//dsb_patt/set_type Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (Write) Set the pattern type of DSB tpdm. Read @@ -165,7 +165,7 @@ Description: =20 What: /sys/bus/coresight/devices//dsb_msr/msr[0:31] Date: March 2023 -KernelVersion 6.7 +KernelVersion: 6.7 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the MSR(mux select register) for the DSB subunit @@ -173,7 +173,7 @@ Description: =20 What: /sys/bus/coresight/devices//cmb_mode Date: January 2024 -KernelVersion 6.9 +KernelVersion: 6.9 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (Write) Set the data collection mode of CMB tpdm. Continuous change creates CMB data set elements on every CMBCLK edge. @@ -187,7 +187,7 @@ Description: (Write) Set the data collection mode of CM= B tpdm. Continuous =20 What: /sys/bus/coresight/devices//cmb_trig_patt/xpr[0:1] Date: January 2024 -KernelVersion 6.9 +KernelVersion: 6.9 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the value of the trigger pattern for the CMB @@ -195,7 +195,7 @@ Description: =20 What: /sys/bus/coresight/devices//cmb_trig_patt/xpmr[0:1] Date: January 2024 -KernelVersion 6.9 +KernelVersion: 6.9 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the mask of the trigger pattern for the CMB @@ -203,21 +203,21 @@ Description: =20 What: /sys/bus/coresight/devices//dsb_patt/tpr[0:1] Date: January 2024 -KernelVersion 6.9 +KernelVersion: 6.9 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the value of the pattern for the CMB subunit TPDM. =20 What: /sys/bus/coresight/devices//dsb_patt/tpmr[0:1] Date: January 2024 -KernelVersion 6.9 +KernelVersion: 6.9 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the mask of the pattern for the CMB subunit TPDM. =20 What: /sys/bus/coresight/devices//cmb_patt/enable_ts Date: January 2024 -KernelVersion 6.9 +KernelVersion: 6.9 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (Write) Set the pattern timestamp of CMB tpdm. Read @@ -229,7 +229,7 @@ Description: =20 What: /sys/bus/coresight/devices//cmb_trig_ts Date: January 2024 -KernelVersion 6.9 +KernelVersion: 6.9 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the trigger timestamp of the CMB for tpdm. @@ -240,7 +240,7 @@ Description: =20 What: /sys/bus/coresight/devices//cmb_ts_all Date: January 2024 -KernelVersion 6.9 +KernelVersion: 6.9 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Read or write the status of timestamp upon all interface. @@ -252,7 +252,7 @@ Description: =20 What: /sys/bus/coresight/devices//cmb_msr/msr[0:31] Date: January 2024 -KernelVersion 6.9 +KernelVersion: 6.9 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the MSR(mux select register) for the CMB subunit --=20 2.47.1 From nobody Sun Feb 8 11:26:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 827AC1A3BD8; Fri, 17 Jan 2025 17:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; cv=none; b=bozaXCmXdqJ22rswYoPFend1CZIV9d04dnZJ0LiYK4D58LSdI34/j3W1vy61aNelh2VAXMrLNVPc3tQv4PgVr8suL2ufM9CenjEPEH8c2L7lWttfL4G9F31jvgoOHXWKM94TuD7FrF3NMEnKC4EJWRZUb/ybhAA/1v3R/LPo0+E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; c=relaxed/simple; bh=g6tnp2e5+rZEad/bKZCAx+K3zN94fParUnq2cjwVZ4A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ulziZsQQhCLDgzcVczYNoam3WvHlGUy6ClBLM5b1yzpOVkheveDgyDipNIAOyrb3zI1gx+KIImtPpFBTOtHZKIErDv8ZJVJqNjRxPe+7GeczFsIvSleMTDfNGbt0NSaaiRrEcXyg+iedUAIIYGIC5kBnrLGxYxCNC2Bs9gNWfLo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FI/nLGox; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FI/nLGox" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDEF6C4CEE6; Fri, 17 Jan 2025 17:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737136795; bh=g6tnp2e5+rZEad/bKZCAx+K3zN94fParUnq2cjwVZ4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FI/nLGoxunHFbHVUh5O6ekNm2iIQdBgU4ntpXS3Rhz0+Hyzy0FcLaIzozbfiCkDyl fYj/8+jw8QvrzEqwY8XRdroj65137z6wAb8X3hvizACG6LT9U1BTaH/49JS2E0WqE2 r3gixoWlltifSJ/SE5Wm0aLVwVJvpp3Jo92YYXMgmD8ZVdHXxqSavjJALHrx3HYMJX OcvKuL4gNtSQcwmrAIdsy9z9pfJnSHhVoBB6GVTI6N0thyNZh14RGPwD5YLZbY2KPg K0C+CC3k2eCRyS4YvOGKxvSBkGu94MlF2d/tWmLcfHQCsGm1fJB+uUGsRBFNPs9YkL 5/siorKVx6HeA== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tYqdM-00000006Ajj-1tyA; Fri, 17 Jan 2025 18:59:52 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org Subject: [PATCH RFC 04/10] ABI: sysfs-driver-dma-idxd: fix date tags Date: Fri, 17 Jan 2025 18:59:33 +0100 Message-ID: <8ee3184748b8d595e7ad16cdfe0e77b2b62774a6.1737135484.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" Some date tags are missing colons. Add them to comply with ABI description and produce right results when converted to html/pdf. Signed-off-by: Mauro Carvalho Chehab --- Documentation/ABI/stable/sysfs-driver-dma-idxd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/stable/sysfs-driver-dma-idxd b/Documentation= /ABI/stable/sysfs-driver-dma-idxd index f2ec42949a54..4a355e6747ae 100644 --- a/Documentation/ABI/stable/sysfs-driver-dma-idxd +++ b/Documentation/ABI/stable/sysfs-driver-dma-idxd @@ -246,14 +246,14 @@ Description: Controls whether PRS disable is turned o= n for the workqueue. capability. =20 What: /sys/bus/dsa/devices/wq./occupancy -Date May 25, 2021 +Date: May 25, 2021 KernelVersion: 5.14.0 Contact: dmaengine@vger.kernel.org Description: Show the current number of entries in this WQ if WQ Occupancy Support bit WQ capabilities is 1. =20 What: /sys/bus/dsa/devices/wq./enqcmds_retries -Date Oct 29, 2021 +Date: Oct 29, 2021 KernelVersion: 5.17.0 Contact: dmaengine@vger.kernel.org Description: Indicate the number of retires for an enqcmds submission on a= sharedwq. --=20 2.47.1 From nobody Sun Feb 8 11:26:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AE801A3AB1; Fri, 17 Jan 2025 17:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; cv=none; b=JP9zlgp7gDzoHRm36I6g4+/0HcMlbVKnwFUepruD0fFnlzvQH8xhUhT23GKRay9XUbAuA/DGj4T7cjGItRnoPO8eTTRUH+nHtsIUW1GNdX1mN6eO66s65H/P1uAaGaAh41T+rKKoKk2uvmngivbXyO9qx2T2R3gGRMlzFoeS4YM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; c=relaxed/simple; bh=eIZnybLSi/SLtggShPreZtgXkXe68+zdK87zK1E6aBk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gGF4yq/YKUnkDaGT45A2X0xhU7mjUITuGEDK32bJ2dJXkdd98feydpc9FeHmfRqVDRXZ7FN1v3A+qsgC8qhDFWa1IJAW+f1HYRyWyT06a3gBjwbFd36ymRKROZ1f4AhTfsnaXPSlI2nxw02PhV1zdCYsBLWBRBecMytZjpMcUxE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LQ0CPjeR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LQ0CPjeR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3653C4CEE5; Fri, 17 Jan 2025 17:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737136795; bh=eIZnybLSi/SLtggShPreZtgXkXe68+zdK87zK1E6aBk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LQ0CPjeRomhFFivBHEMXxVMtQP6ArQOenqkH5GJGLVKNAkyrc5VWIyMJ4PFiHjKbY /cU0sdHLypqD0i+Gm/PeKDFE6R4Ocpc9ZK4VTGruCGmCgFbLyHM2PgOBGY8TDyZBjZ B4429v/xUGcKDIBwHmLHEHaopdkYhMQ7QMa6jWCV9MdLMzvoxqsBmoxhIUb5HGiZyK 2kQvCVZvRKucD9CorqAuOqx3CbbbMHjELlwigycTLby17ZdBdjNrduZI0qJUJf5nQP vIjxV7i1+H9Nkfsrn06XjmH1iGGXS+0gVRMya9bNTDj15BDW4So+9q228ziSreuL2Y x1ZVds80tZYSw== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tYqdM-00000006Ajn-210m; Fri, 17 Jan 2025 18:59:52 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , Chao Yu , Jaegeuk Kim , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH RFC 05/10] ABI: sysfs-fs-f2fs: fix date tags Date: Fri, 17 Jan 2025 18:59:34 +0100 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" Some date tags are missing colons. Add them to comply with ABI description and produce right results when converted to html/pdf. Signed-off-by: Mauro Carvalho Chehab --- Documentation/ABI/testing/sysfs-fs-f2fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/te= sting/sysfs-fs-f2fs index 3e1630c70d8a..e44bb614964b 100644 --- a/Documentation/ABI/testing/sysfs-fs-f2fs +++ b/Documentation/ABI/testing/sysfs-fs-f2fs @@ -347,7 +347,7 @@ Description: Used to control configure extension list: - [c] means add/del cold file extension =20 What: /sys/fs/f2fs//unusable -Date April 2019 +Date: April 2019 Contact: "Daniel Rosenberg" Description: If checkpoint=3Ddisable, it displays the number of blocks that are unusable. @@ -355,7 +355,7 @@ Description: If checkpoint=3Ddisable, it displays the n= umber of blocks that would be unusable if checkpoint=3Ddisable were to be set. =20 What: /sys/fs/f2fs//encoding -Date July 2019 +Date: July 2019 Contact: "Daniel Rosenberg" Description: Displays name and version of the encoding set for the filesys= tem. If no encoding is set, displays (none) --=20 2.47.1 From nobody Sun Feb 8 11:26:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 473DB1A2630; Fri, 17 Jan 2025 17:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; cv=none; b=UmAwpLVN/lzi9qY/HtxoXx1cBRo6MvdnyeyPKZUfHYD0D9LeRdGeZQy+oz7PgIfLWWu3nXXPq4H8yEeHlLyxPuMiWyMK1PLNjRNQKbbg1dl74OzfiAPlayxnVwwJ1nqy7p6isMOXsfBdcmrLFm0B13KRP7WnnMOoLGJys9EvbsY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; c=relaxed/simple; bh=RS/ElkUzCP7P0hES8gHUtJQMDcscyac74hLr/hRb6wI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o7ytIX0qO+imXRUdZpc/HqL2fNPswE+NruVmxeMIT/7PoRQe4ikQM510MopW3fwUJ7Ngo0k7813ODISW5HzepUB3mkpSTMKX1XJvC2hl6isL40vwXmyEPAMjsaEocDI7ry5AFiTfgZ68x2rxycfgWvI/hbYX7eQmGl9SEEI5BOc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IqB8S6nb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IqB8S6nb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFC38C4CEDD; Fri, 17 Jan 2025 17:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737136794; bh=RS/ElkUzCP7P0hES8gHUtJQMDcscyac74hLr/hRb6wI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IqB8S6nbi6MZcszQ5NcOdniXvDlQsxOxlaZbnFK9KjeQ3ksqrfxyq1EK7wZqXlWl/ 1EC+97OihBdPM9ZJb4US4UT5h1MZ7MJsKGyYB1hjDNxAFq/zAEgA55SwXowqbyeS1I jhWqiYEqbs+dASZ1Oc0zVh5fr69d7bkuv+d0Tg9xpa1nITeyYJ5TAevt9UDDbPbvDv phJC7c7JdcSm2gzWcbWrWVkWc21m4mPzTB41EOX2+6Mm6l/Gxl2LXMcjZFrB7f8o+B pnTs5LYiqUX3nQpyJY8IYpnDU9FpbHZCdSm6Ao/o6yh0if3tKdRZJdsHW1t3JSAQSL 9LH0WUU4cZjtg== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tYqdM-00000006Ajr-27kb; Fri, 17 Jan 2025 18:59:52 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org Subject: [PATCH RFC 06/10] ABI: sysfs-power: fix a what tag Date: Fri, 17 Jan 2025 18:59:35 +0100 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" There is one What tag that it is using semicolon instead of colon. Fix it to comply with ABI description and produce right results when converted to html/pdf. Signed-off-by: Mauro Carvalho Chehab --- Documentation/ABI/testing/sysfs-power | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/test= ing/sysfs-power index a3942b1036e2..2192478e83cf 100644 --- a/Documentation/ABI/testing/sysfs-power +++ b/Documentation/ABI/testing/sysfs-power @@ -131,7 +131,7 @@ Description: CAUTION: Using it will cause your machine's real-time (CMOS) clock to be set to a random invalid time after a resume. =20 -What; /sys/power/pm_trace_dev_match +What: /sys/power/pm_trace_dev_match Date: October 2010 Contact: James Hogan Description: --=20 2.47.1 From nobody Sun Feb 8 11:26:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB2581A705C; Fri, 17 Jan 2025 17:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; cv=none; b=BQeqJiKmk/rVfvNKaW6MYY7OwiJ4IYUpFFkAeC93vHoH+8JMqRjLHosV96zIoYI6tCdMZsRt3IavcC3rQE0fIDHqyS1rlZCPg3cCpP4Qy/Ylkd0Lrs0siq5WGw7nQEnUscMRO2QdE6ejnDV+5YwOHqfTjyDo14OEhZFuXKB3FnI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; c=relaxed/simple; bh=LIPJhhxI9x5E9YFP9vKAabDVgdnVjYMv//IillkBlls=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BHT+/68ikBgfm2Wt3cjHLwHDXkckjErsPR1XLmpEpUQ9M79444hZBb91g7L3v52B02SLoisEz5Gnuyn+ZsgwMhAksOtQj/qjDx7QTMAAMe9KBNkxVhW/3sRothWWyClA5DpVaFBhlc4kkxBdBtP2Npgaq9p3WgQ2nwCgvpcre3k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kuc1Uhx/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kuc1Uhx/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0739AC4CEE7; Fri, 17 Jan 2025 17:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737136795; bh=LIPJhhxI9x5E9YFP9vKAabDVgdnVjYMv//IillkBlls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kuc1Uhx/2VM84ZWETTnkU+4HeE2wnfK3KEcBoqhL64CkUa2dLDlqK5Z1FCkxfLhs4 csc8jOpEFV07ooB3rC1yig+4x40LwxVMRQDle8NAMgqNj1+7v6C26rykDabaAzhOIV aIO6icsE5fJPgBzOyYjUc16AsY0oTb9o5YUVqf/ADmodPD8S/kygTdwnV0KemLw4RL V+aP8ScrRTSlRxRVlhpEFAqa5OpAgRdN+3rKNCn3wSTLVGpqM+MBwAlYYZAdVPYWlt LrJm8lQ5b1rVTmQ5ojuWz7dcDUpeM2lChLgvFvmr3OMsQW6FPw1V0WKM222cNatKjE HtF8Q1BM58phw== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tYqdM-00000006Ajv-2Egp; Fri, 17 Jan 2025 18:59:52 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org Subject: [PATCH RFC 07/10] [RFC] scripts: add a get_abi.py tool to generate ReST output Date: Fri, 17 Jan 2025 18:59:36 +0100 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" The get_abi.pl script is requiring some care, but it seems that the number of changes on it since when I originally wrote it was not too high. Granted, maintaining perl scripts without classes requires a higher efforted than on python. Also, it sounds easier to find python developer those days than perl ones. With that in mind, rewrite the core of get_abi.pl in Python, using classes, to help producing documentation. This will allow a better integration in the future with the Sphinx ABI extension. The algorithms used there are the same as the ones in Perl, with a couple of cleanups to remove redundant variables and to help with cross-reference generation. I also removed some code that were important in the past during txt to ReST migration, but aren't needed now anymore. The end script is a little bit faster than the original one (tested on a machine with ssd disks). That's probably because we're now using only pre-compiled regular expressions, and it is using string replacement methods instead of regex where possible. The new version is a little bit more conservative when creating cross-references to avoid adding them into literal blocks. We may end making it working better once we change Sphinx integration, in the future. The end result was compared with the one produced by the perl script and showed no regressions. As a side effect, that makes integration with Sphinx easier. This script follows flake8 style, verified with: $ flake8 ./scripts/get_abi.py --max-line-length 100 (most lines are below 80 columns limit, but some strings are longer) Signed-off-by: Mauro Carvalho Chehab --- scripts/get_abi.py | 583 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 583 insertions(+) create mode 100755 scripts/get_abi.py diff --git a/scripts/get_abi.py b/scripts/get_abi.py new file mode 100755 index 000000000000..64a0ec8b1d89 --- /dev/null +++ b/scripts/get_abi.py @@ -0,0 +1,583 @@ +#!/usr/bin/env python3 +# pylint: disable=3DR0902,R0903,R0911,R0912,R0914,R0915 +# Copyright(c) 2025: Mauro Carvalho Chehab . +# SPDX-License-Identifier: GPL-2.0 + +""" +Parse ABI documentation and produce results from it. +""" + + +import argparse +import os +import re +import sys + +from glob import glob +from random import randrange + +if __name__ =3D=3D "__main__": + import logging +else: + from sphinx.util import logging + +ABI_DIR =3D "Documentation/ABI/" + +# Debug levels +DEBUG_WHAT_PARSING =3D 1 +DEBUG_WHAT_OPEN =3D 2 +DEBUG_DUMP_ABI_STRUCTS =3D 4 +DEBUG_UNDEFINED =3D 8 + + +class AbiParser: + """Main class to parse ABI files""" + + TAGS =3D r"(what|where|date|kernelversion|contact|description|users)" + XREF =3D r"(?:^|\s|\()(\/(?:sys|config|proc|dev|kvd)\/[^,.:;\)\s]+)(?:= [,.:;\)\s]|\Z)" + + def __init__(self, directory, enable_lineno=3DFalse, show_warnings=3DT= rue, debug=3D0): + """Stores arguments for the class and initialize global vars""" + + self.directory =3D directory + self.enable_lineno =3D enable_lineno + self.show_warnings =3D show_warnings + self.debug =3D debug + + self.log =3D logging.getLogger("get_abi") + self.data =3D {} + self.what_symbols =3D {} + self.file_refs =3D {} + self.what_refs =3D {} + + # Regular expressions used on parser + self.re_tag =3D re.compile(r"(\S+)(:\s*)(.*)", re.I) + self.re_valid =3D re.compile(self.TAGS) + self.re_start_spc =3D re.compile(r"(\s*)(\S.*)") + self.re_whitespace =3D re.compile(r"^\s+") + + # Regular used on print + self.re_what =3D re.compile(r"(\/?(?:[\w\-]+\/?){1,2})") + self.re_escape =3D re.compile(r"([\.\x01-\x08\x0e-\x1f\x21-\x2f\x3= a-\x40\x7b-\xff])") + self.re_unprintable =3D re.compile(r"([\x00-\x2f\x3a-\x40\x5b-\x60= \x7b-\xff]+)") + self.re_title_mark =3D re.compile(r"\n[\-\*\=3D\^\~]+\n") + self.re_doc =3D re.compile(r"Documentation/(?!devicetree)(\S+)\.rs= t") + self.re_abi =3D re.compile(r"(Documentation/ABI/)([\w\/\-]+)") + self.re_xref_node =3D re.compile(self.XREF) + + def warn(self, fdata, msg, extra=3DNone): + """Displays a parse error if warning is enabled""" + + if not self.show_warnings: + return + + msg =3D f"{fdata.fname}:{fdata.ln}: {msg}" + if extra: + msg +=3D "\n\t\t" + extra + + self.log.warning(msg) + + def add_symbol(self, what, fname, ln=3DNone, xref=3DNone): + """Create a reference table describing where each 'what' is locate= d""" + + if what not in self.what_symbols: + self.what_symbols[what] =3D {"file": {}} + + if fname not in self.what_symbols[what]["file"]: + self.what_symbols[what]["file"][fname] =3D [] + + if ln: + self.what_symbols[what]["file"][fname].append(ln) + + if xref: + self.what_symbols[what]["xref"] =3D xref + + def _parse_line(self, fdata, line): + """Parse a single line of an ABI file""" + + new_what =3D False + new_tag =3D False + content =3D None + + match =3D self.re_tag.match(line) + if match: + new =3D match.group(1).lower() + sep =3D match.group(2) + content =3D match.group(3) + + match =3D self.re_valid.search(new) + if match: + new_tag =3D match.group(1) + else: + if fdata.tag =3D=3D "description": + # New "tag" is actually part of description. + # Don't consider it a tag + new_tag =3D False + elif fdata.tag !=3D "": + self.warn(fdata, f"tag '{fdata.tag}' is invalid", line) + + if new_tag: + # "where" is Invalid, but was a common mistake. Warn if found + if new_tag =3D=3D "where": + self.warn(fdata, + "tag 'Where' is invalid. Should be 'What:' inste= ad") + new_tag =3D "what" + + if new_tag =3D=3D "what": + fdata.space =3D None + + if content not in self.what_symbols: + self.add_symbol(what=3Dcontent, + fname=3Dfdata.fname, ln=3Dfdata.ln) + + if fdata.tag =3D=3D "what": + fdata.what.append(content.strip("\n")) + else: + if fdata.key: + if "description" not in self.data.get(fdata.key, {= }): + self.warn(fdata, + f"{fdata.key} doesn't have a descrip= tion") + + for w in fdata.what: + self.add_symbol(what=3Dw, fname=3Dfdata.fname, + ln=3Dfdata.what_ln, xref=3Dfda= ta.key) + + fdata.label =3D content + new_what =3D True + + key =3D "abi_" + content.lower() + fdata.key =3D self.re_unprintable.sub("_", key).strip(= "_") + + # Avoid duplicated keys + while fdata.key in self.data: + char =3D randrange(0, 51) + ord("A") + if char > ord("Z"): + char +=3D ord("a") - ord("Z") - 1 + + fdata.key +=3D chr(char) + + if fdata.key and fdata.key not in self.data: + self.data[fdata.key] =3D { + "what": [content], + "file": [fdata.file_ref], + "line_no": fdata.ln, + } + + fdata.what =3D self.data[fdata.key]["what"] + + self.what_refs[content] =3D fdata.key + fdata.tag =3D new_tag + fdata.what_ln =3D fdata.ln + + if fdata.nametag["what"]: + t =3D (content, fdata.key) + if t not in fdata.nametag["symbols"]: + fdata.nametag["symbols"].append(t) + + return + + if fdata.tag and new_tag: + fdata.tag =3D new_tag + + if new_what: + fdata.label =3D "" + + self.data[fdata.key]["type"] =3D fdata.ftype + + if "description" in self.data[fdata.key]: + self.data[fdata.key]["description"] +=3D "\n\n" + + if fdata.file_ref not in self.data[fdata.key]["file"]: + self.data[fdata.key]["file"].append(fdata.file_ref) + + if self.debug =3D=3D DEBUG_WHAT_PARSING: + self.log.debug("what: %s", fdata.what) + + if not fdata.what: + self.warn(fdata, "'What:' should come first:", line) + return + + if new_tag =3D=3D "description": + fdata.space =3D None + + if content: + sep =3D sep.replace(":", " ") + + c =3D " " * len(new_tag) + sep + content + c =3D c.expandtabs() + + match =3D self.re_start_spc.match(c) + if match: + # Preserve initial spaces for the first line + fdata.space =3D match.group(1) + content =3D match.group(2) + "\n" + + self.data[fdata.key][fdata.tag] =3D content + + return + + # Store any contents before tags at the database + if not fdata.tag and "what" in fdata.nametag: + fdata.nametag["description"] +=3D line + return + + if fdata.tag =3D=3D "description": + content =3D line.expandtabs() + + if self.re_whitespace.sub("", content) =3D=3D "": + self.data[fdata.key][fdata.tag] +=3D "\n" + return + + if fdata.space is None: + match =3D self.re_start_spc.match(content) + if match: + # Preserve initial spaces for the first line + fdata.space =3D match.group(1) + + content =3D match.group(2) + "\n" + else: + if content.startswith(fdata.space): + content =3D content[len(fdata.space):] + + else: + fdata.space =3D "" + + if fdata.tag =3D=3D "what": + w =3D content.strip("\n") + if w: + self.data[fdata.key][fdata.tag].append(w) + else: + self.data[fdata.key][fdata.tag] +=3D content + return + + content =3D line.strip() + if fdata.tag: + if fdata.tag =3D=3D "what": + w =3D content.strip("\n") + if w: + self.data[fdata.key][fdata.tag].append(w) + else: + self.data[fdata.key][fdata.tag] +=3D "\n" + content.rstrip= ("\n") + return + + # Everything else is error + if content: + self.warn(fdata, "Unexpected content", line) + + def parse_file(self, fname, path, basename): + """Parse a single file""" + + ref =3D f"abi_file_{path}_{basename}" + ref =3D self.re_unprintable.sub("_", ref).strip("_") + + # Store per-file state into a namespace variable. This will be used + # by the per-line parser state machine and by the warning function. + fdata =3D argparse.Namespace + + fdata.fname =3D fname + fdata.name =3D basename + fdata.file_ref =3D (basename, ref) + fdata.ln =3D 0 + fdata.what_ln =3D 0 + fdata.tag =3D "" + fdata.label =3D "" + fdata.what =3D [] + fdata.key =3D None + fdata.xrefs =3D None + fdata.space =3D None + fdata.ftype =3D path.split("/")[0] + + fdata.nametag =3D {} + fdata.nametag["what"] =3D [f"File {path}/{basename}"] + fdata.nametag["type"] =3D "File" + fdata.nametag["file"] =3D [fdata.file_ref] + fdata.nametag["line_no"] =3D 1 + fdata.nametag["description"] =3D "" + fdata.nametag["symbols"] =3D [] + + self.data[ref] =3D fdata.nametag + self.file_refs[fname] =3D ref + + with open(fname, "r", encoding=3D"utf8", errors=3D"backslashreplac= e") as fp: + for line in fp: + fdata.ln +=3D 1 + + self._parse_line(fdata, line) + + if "description" in fdata.nametag: + fdata.nametag["description"] =3D fdata.nametag["descriptio= n"].lstrip("\n") + + if fdata.key: + if "description" not in self.data.get(fdata.key, {}): + self.warn(fdata, f"{fdata.key} doesn't have a descript= ion") + + for w in fdata.what: + self.add_symbol(what=3Dw, fname=3Dfname, xref=3Dfdata.= key) + + def parse_abi(self): + """Parse documentation ABI""" + + ignore_suffixes =3D ("rej", "org", "orig", "bak", "~") + re_abi =3D re.compile(r".*" + ABI_DIR) + + for fname in glob(os.path.join(self.directory, '**'), recursive=3D= True): + if os.path.isdir(fname): + continue + + basename =3D os.path.basename(fname) + + if basename =3D=3D "README": + continue + if basename.startswith(".") or basename.endswith(ignore_suffix= es): + continue + + path =3D re_abi.sub("", os.path.dirname(fname)) + + self.parse_file(fname, path, basename) + + def print_desc_txt(self, desc): + """Print description as found inside ABI files""" + + desc =3D desc.strip(" \t\n") + + print(desc + "\n") + + def print_desc_rst(self, desc): + """Enrich ReST output by creating cross-references""" + + # Remove title markups from the description + # Having titles inside ABI files will only work if extra + # care would be taken in order to strictly follow the same + # level order for each markup. + desc =3D self.re_title_mark.sub("\n\n", "\n" + desc) + desc =3D desc.rstrip(" \t\n").lstrip("\n") + + new_desc =3D "" + for d in desc.split("\n"): + if d =3D=3D "": + new_desc +=3D "\n" + continue + + # Use cross-references for doc files where needed + d =3D self.re_doc.sub(r":doc:`/\1`", d) + + # Use cross-references for ABI generated docs where needed + matches =3D self.re_abi.findall(d) + for m in matches: + abi =3D m[0] + m[1] + + xref =3D self.file_refs.get(abi) + if not xref: + self.log.warning("Didn't find ABI reference for %s", a= bi) + continue + + new =3D self.re_escape.sub(r"\\\1", m[1]) + + d =3D d.replace(abi, f":ref:`{new} <{xref}>`") + + # Seek for cross reference symbols like /sys/... + # Need to be careful to avoid doing it on a code block + if d[0] not in [' ', '\t']: + matches =3D self.re_xref_node.findall(d) + for m in matches: + + # Finding ABI here is more complex due to wildcards + xref =3D self.what_refs.get(m) + if not xref: + continue + + new =3D self.re_escape.sub(r"\\\1", m) + + d =3D d.replace(m, f":ref:`{new} <{xref}>`") + + new_desc +=3D d + "\n" + + print(new_desc + "\n") + + def print_data(self, enable_lineno, output_in_txt, show_file=3DFalse): + """Print ABI at stdout""" + + part =3D None + for key, v in sorted(self.data.items(), + key=3Dlambda x: (x[1].get("type", ""), x[0])): + + wtype =3D v.get("type", "Var") + file_ref =3D v.get("file") + names =3D v.get("what", [""]) + + if not show_file and wtype =3D=3D "File": + continue + + if enable_lineno: + ln =3D v.get("line_no", 1) + print(f".. LINENO {file_ref[0][0]}#{ln}\n") + + if wtype !=3D "File": + cur_part =3D names[0] + if cur_part.find("/") >=3D 0: + match =3D self.re_what.match(cur_part) + if match: + symbol =3D match.group(1).rstrip("/") + cur_part =3D "symbols under " + symbol + + if cur_part and cur_part !=3D part: + part =3D cur_part + print(f"{part}\n{"-" * len(part)}\n") + + print(f".. _{key}:\n") + + max_len =3D 0 + for i in range(0, len(names)): # pylint: disable= =3DC0200 + names[i] =3D "**" + self.re_escape.sub(r"\\\1", names[= i]) + "**" + + max_len =3D max(max_len, len(names[i])) + + print("+-" + "-" * max_len + "-+") + for name in names: + print(f"| {name}" + " " * (max_len - len(name)) + " |") + print("+-" + "-" * max_len + "-+") + print() + + for ref in file_ref: + if wtype =3D=3D "File": + print(f".. _{ref[1]}:\n") + else: + print(f"Defined on file :ref:`{ref[0]} <{ref[1]}>`\n") + + if wtype =3D=3D "File": + print(f"{names[0]}\n{"-" * len(names[0])}\n") + + desc =3D v.get("description") + if not desc and wtype !=3D "File": + print(f"DESCRIPTION MISSING for {names[0]}\n") + + if desc: + if output_in_txt: + self.print_desc_txt(desc) + else: + self.print_desc_rst(desc) + + symbols =3D v.get("symbols") + if symbols: + print("Has the following ABI:\n") + + for w, label in symbols: + + # Escape special chars from content + content =3D self.re_escape.sub(r"\\\1", w) + + print(f"- :ref:`{content} <{label}>`\n") + + users =3D v.get("users") + if users and users.strip(" \t\n"): + print(f"Users:\n\t{users.strip("\n").replace('\n', '\n\t')= }\n") + + def check_issues(self): + + """Warn about duplicated ABI entries""" + + for what, v in self.what_symbols.items(): + files =3D v.get("file") + if not files: + # Should never happen if the parser works properly + self.log.warning("%s doesn't have a file associated", what) + continue + + if len(files) =3D=3D 1: + continue + + f =3D [] + for fname, lines in sorted(files.items()): + if not lines: + f.append(f"{fname}") + elif len(lines) =3D=3D 1: + f.append(f"{fname}:{lines[0]}") + else: + f.append(f"{fname} lines {", ".join(lines)}") + + self.log.warning("%s is defined %d times: %s", + what, len(f), "; ".join(f)) + + +class AbiRest: + """Initialize an argparse subparser for rest output""" + + def __init__(self, subparsers): + """Initialize argparse subparsers""" + + parser =3D subparsers.add_parser("rest", + formatter_class=3Dargparse.Argument= DefaultsHelpFormatter, + description=3D"produce output in re= st format") + + parser.add_argument("--enable-lineno", action=3D"store_true", + help=3D"enable lineno") + parser.add_argument("--txt", action=3D"store_true", + help=3D"output text in Text mode instead of Re= ST") + parser.add_argument("--no-file", action=3D"store_true", + help=3D"Don't output files") + parser.add_argument("--show-hints", help=3D"show-hints") + + parser.set_defaults(func=3Dself.run) + + def run(self, args): + """Run subparser""" + + args.parser.parse_abi() + args.parser.check_issues() + args.parser.print_data(args.enable_lineno, args.txt, not args.no_f= ile) + + +class AbiValidate: + """Initialize an argparse subparser for ABI validation""" + + def __init__(self, subparsers): + """Initialize argparse subparsers""" + + parser =3D subparsers.add_parser("validate", + formatter_class=3Dargparse.Argument= DefaultsHelpFormatter, + description=3D"list events") + + parser.set_defaults(func=3Dself.run) + + def run(self, args): + """Run subparser""" + + args.parser.parse_abi() + args.parser.check_issues() + + +def main(): + """Main program""" + + parser =3D argparse.ArgumentParser(formatter_class=3Dargparse.Argument= DefaultsHelpFormatter) + + parser.add_argument("-d", "--debug", type=3Dint, default=3D0, + help=3D"debug level") + parser.add_argument("-D", "--dir", default=3DABI_DIR, + help=3D"directory with ABIs to be parsed") + + subparsers =3D parser.add_subparsers() + + AbiRest(subparsers) + AbiValidate(subparsers) + + args =3D parser.parse_args() + + if args.debug: + level =3D logging.DEBUG + else: + level =3D logging.INFO + + logging.basicConfig(level=3Dlevel, format=3D"[%(levelname)s] %(message= )s") + + if "func" in args: + args.parser =3D AbiParser(args.dir, debug=3Dargs.debug) + + args.func(args) + else: + sys.exit(f"Please specify a valid command for {sys.argv[0]}") + + +# Call main method +if __name__ =3D=3D "__main__": + main() --=20 2.47.1 From nobody Sun Feb 8 11:26:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C5B11A4F1B; Fri, 17 Jan 2025 17:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; cv=none; b=gAtEVkNAC3OsGzimkcfrF/K6C+7uENgQCBvqQgiXABkFcO7N05eqixNPwJ5GMwpTP3+QFD95IdrwJHOTrWaVuKCqtlCdU9yQsUJn5BMz3kZPDh6I5zetl6dWCNQFmvs6TpvcN7hZHXQJQY9SCHKAN6HDtJBrulMfjmW9vr7MrHg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; c=relaxed/simple; bh=+YmkeryPo7zpEBCjbvnCQlJvDtm1i6rT9p93GfkJIBY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MeFpcsGzZZDRnwvcgyY/F4Jr0PzQ15MCPN5kyEin+3rdRRkCMCjL5RCwjNLJMWGIJgYUDJSgKRlKQ5RLkXxCkTF3bpekiy9CtHj4J6apj0M0QXRURlU/PmqTwVD+jFuLSgQMJww40NJfvmCCGT8HX2vsNoW3UqDAIqYUuVcfmQA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Denh7FDo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Denh7FDo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01B52C4CEE8; Fri, 17 Jan 2025 17:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737136795; bh=+YmkeryPo7zpEBCjbvnCQlJvDtm1i6rT9p93GfkJIBY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Denh7FDoSoB2/O/IS80vMtW7A9dNe39dXTFmAmV2shlGcFbngbaCHBSemgDoYeus1 h5W+TKshFK+RifywndujeulUbMKry4sIBdO4KamqI8IWcMG54i+I3oE1keBugJXlJ5 46W2pGHXAZJP6sMLu0K6u0NAYqrbeBKPfBZBogBVMur25jBWmz1UxL9V9MOU+Gu23i oq+LJIyHY3H+MC+lqF7JOMOy3obK8+4p+nRc3s9HEx+rcyrDj9Xv5heDjGCJnrOFQv 9Wp7cnJwVFB68NpR69VuVepjNvKHGnSTkk1y5T0An0dQZp/eFX0bZVZbCYd54sUEMF cF/V0hd31zCfw== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tYqdM-00000006Ajz-2LRD; Fri, 17 Jan 2025 18:59:52 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org Subject: [PATCH RFC 08/10] [RFC] scripts/get_abi.py: add support for symbol search Date: Fri, 17 Jan 2025 18:59:37 +0100 Message-ID: <954d0065a2a62ff36989d68ea2f86dd3800079aa.1737135484.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" Add support for searching an ABI symbol Signed-off-by: Mauro Carvalho Chehab --- scripts/get_abi.py | 73 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/scripts/get_abi.py b/scripts/get_abi.py index 64a0ec8b1d89..6a461f7cef32 100755 --- a/scripts/get_abi.py +++ b/scripts/get_abi.py @@ -498,6 +498,56 @@ class AbiParser: self.log.warning("%s is defined %d times: %s", what, len(f), "; ".join(f)) =20 + def search_symbols(self, expr): + """ Searches for ABI symbols """ + + regex =3D re.compile(expr, re.I) + + found_keys =3D 0 + for key, v in sorted(self.data.items(), key=3Dlambda x: [0]): + wtype =3D v.get("type", "") + if wtype =3D=3D "File": + continue + + for what in v.get("what", [""]): + if regex.search(what): + found_keys +=3D 1 + + kernelversion =3D v.get("kernelversion", "").strip(" \= t\n") + date =3D v.get("date", "").strip(" \t\n") + contact =3D v.get("contact", "").strip(" \t\n") + users =3D v.get("users", "").strip(" \t\n") + desc =3D v.get("description", "").strip(" \t\n") + + files =3D [] + for f in v.get("file", ()): + files.append(f[0]) + + what =3D str(found_keys) + ". " + what + bar =3D "-" * len(what) + + print(f"\n{what}\n{bar}\n") + + if kernelversion: + print(f"Kernel version:\t\t{kernelversion}") + + if date: + print(f"Date:\t\t\t{date}") + + if contact: + print(f"Contact:\t\t{contact}") + + if users: + print(f"Users:\t\t\t{users}") + + print(f"Defined on file{'s'[:len(files) ^ 1]}:\t{", ".= join(files)}") + + if desc: + print(f"\n{desc.strip("\n")}\n") + + if not found_keys: + print(f"Regular expression /{expr}/ not found.") + =20 class AbiRest: """Initialize an argparse subparser for rest output""" @@ -546,6 +596,28 @@ class AbiValidate: args.parser.check_issues() =20 =20 +class AbiSearch: + """Initialize an argparse subparser for ABI search""" + + def __init__(self, subparsers): + """Initialize argparse subparsers""" + + parser =3D subparsers.add_parser("search", + formatter_class=3Dargparse.Argument= DefaultsHelpFormatter, + description=3D"Search ABI using a r= egular expression") + + parser.add_argument("expression", + help=3D"Case-insensitive search pattern for th= e ABI symbol") + + parser.set_defaults(func=3Dself.run) + + def run(self, args): + """Run subparser""" + + args.parser.parse_abi() + args.parser.search_symbols(args.expression) + + def main(): """Main program""" =20 @@ -560,6 +632,7 @@ def main(): =20 AbiRest(subparsers) AbiValidate(subparsers) + AbiSearch(subparsers) =20 args =3D parser.parse_args() =20 --=20 2.47.1 From nobody Sun Feb 8 11:26:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4742B1A2642; Fri, 17 Jan 2025 17:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; cv=none; b=b8h9s7Vu7DiD4987P9CfE/JWDZpcS8Ek+hA80hbLxd9d/1vBl+ovYOEjMSGhq/Me8AJO7KC0wUfhVYz+IVwNEQmxbzt5vsGp5ZHhv/bcpCvK9Bi+mwEf1aa4L4hoUHW8BBVsTsgPFm1pqf3iixF+pUtDIA7I94EandlvOqZMuZY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; c=relaxed/simple; bh=SxtEHDFzMPJqPTT2w14O7dlMQf1Le6Zyc610CsiBD+c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OmEnK6Yxhp/bqIDpU1H/+RO01/8NWaCRjV0u7/7RbGM1/XRBX7OTb4b1M1TUpkL9o1V3yLpPRiUGTw4j6DicwqPwX0YJG9K4YofOSHpXFO0M02mWx351aCPlEXsoDCJW1ZCnh5yPrZa1TZvw0682ZsmHXJTf+4byhEsIDfYghYw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GSVlfJWt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GSVlfJWt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0BC0C4CEE0; Fri, 17 Jan 2025 17:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737136794; bh=SxtEHDFzMPJqPTT2w14O7dlMQf1Le6Zyc610CsiBD+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GSVlfJWtaL/eKb251XrnnWKu6+++bcVwWPUwUEMbUd/ZhEhJcCg/NUoRhPFqO8sNB 8e1Rg1N0PCMf5cSp6ZMr5nyrrN3BedAh427YE5grxlcG/mdP4BCAJ4tu+4XLsbOn60 a9C8u0f+1Dhl1QwkXlb+kUQEPJ2gg/4MYuggwDfijQxZixFrtRXmdE8O4/2fI3BsWA EEZwhioL+JKwa5l0+4HVKuw3FEr0l54WyqPGjkycAAt2sqR/o97rQS2fygobWtDYGz jPIZSd/FQ2cH8UUWbaOPI6gxaa7eI/AyxcYevvJCjV6jWpE5nLBUH94YsqrTw+1Kaw 1Kbg0qGa7+0pg== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tYqdM-00000006Ak3-2SFm; Fri, 17 Jan 2025 18:59:52 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org Subject: [PATCH RFC 09/10] [RFC] docs: use get_abi.py for ABI generation Date: Fri, 17 Jan 2025 18:59:38 +0100 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" Use the new script instead of the old one when generating ABI docs. For now, execute it via exec. A future version may just import the class. Signed-off-by: Mauro Carvalho Chehab --- Documentation/admin-guide/abi-obsolete.rst | 1 - Documentation/admin-guide/abi-removed.rst | 1 - Documentation/admin-guide/abi-stable.rst | 1 - Documentation/admin-guide/abi-testing.rst | 1 - Documentation/sphinx/kernel_abi.py | 10 +++------- 5 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Documentation/admin-guide/abi-obsolete.rst b/Documentation/adm= in-guide/abi-obsolete.rst index 594e697aa1b2..1adc74047ed1 100644 --- a/Documentation/admin-guide/abi-obsolete.rst +++ b/Documentation/admin-guide/abi-obsolete.rst @@ -8,4 +8,3 @@ The description of the interface will document the reason w= hy it is obsolete and when it can be expected to be removed. =20 .. kernel-abi:: ABI/obsolete - :rst: diff --git a/Documentation/admin-guide/abi-removed.rst b/Documentation/admi= n-guide/abi-removed.rst index f9e000c81828..61d247a5d296 100644 --- a/Documentation/admin-guide/abi-removed.rst +++ b/Documentation/admin-guide/abi-removed.rst @@ -2,4 +2,3 @@ ABI removed symbols =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 .. kernel-abi:: ABI/removed - :rst: diff --git a/Documentation/admin-guide/abi-stable.rst b/Documentation/admin= -guide/abi-stable.rst index fc3361d847b1..445964b5b997 100644 --- a/Documentation/admin-guide/abi-stable.rst +++ b/Documentation/admin-guide/abi-stable.rst @@ -11,4 +11,3 @@ Most interfaces (like syscalls) are expected to never cha= nge and always be available. =20 .. kernel-abi:: ABI/stable - :rst: diff --git a/Documentation/admin-guide/abi-testing.rst b/Documentation/admi= n-guide/abi-testing.rst index 19767926b344..6869dfe895a3 100644 --- a/Documentation/admin-guide/abi-testing.rst +++ b/Documentation/admin-guide/abi-testing.rst @@ -17,4 +17,3 @@ name to the description of these interfaces, so that the = kernel developers can easily notify them if any changes occur. =20 .. kernel-abi:: ABI/testing - :rst: diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kern= el_abi.py index 5911bd0d7965..5970bd077a6d 100644 --- a/Documentation/sphinx/kernel_abi.py +++ b/Documentation/sphinx/kernel_abi.py @@ -14,7 +14,7 @@ u""" :license: GPL Version 2, June 1991 see Linux/COPYING for details. =20 The ``kernel-abi`` (:py:class:`KernelCmd`) directive calls the - scripts/get_abi.pl script to parse the Kernel ABI files. + scripts/get_abi.py script to parse the Kernel ABI files. =20 Overview of directive's argument and options. =20 @@ -67,7 +67,6 @@ class KernelCmd(Directive): =20 option_spec =3D { "debug" : directives.flag, - "rst" : directives.unchanged } =20 def run(self): @@ -78,15 +77,12 @@ class KernelCmd(Directive): srctree =3D os.path.abspath(os.environ["srctree"]) =20 args =3D [ - os.path.join(srctree, 'scripts/get_abi.pl'), + os.path.join(srctree, 'scripts/get_abi.py'), + '-D', os.path.join(srctree, 'Documentation', self.arguments[0]= ), 'rest', '--enable-lineno', - '--dir', os.path.join(srctree, 'Documentation', self.arguments= [0]), ] =20 - if 'rst' in self.options: - args.append('--rst-source') - lines =3D subprocess.check_output(args, cwd=3Dos.path.dirname(doc.= current_source)).decode('utf-8') nodeList =3D self.nestedParse(lines, self.arguments[0]) return nodeList --=20 2.47.1 From nobody Sun Feb 8 11:26:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 473831A262D; Fri, 17 Jan 2025 17:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; cv=none; b=H48JCh08uc2AkRJj1KbHumAGOwEotUyEO65NL2qH+KUhuM0nUg4WMYeWatlSDksdX1Xw0Zn4ABMMK2EcpPD88qdZxlGu2GC1fjv4PLzfTOhXt+i8XzBkpRvKXJQc/dsVc7QNvPIF3uW3mHiQS7rCEb8tJthjeUO5F/boB7d8Z9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737136795; c=relaxed/simple; bh=ceilUjRXkpDjjzvZIWDIPF1HxMNskgMsU9ZZ7pdFzYQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RZbfccJqVIrK2wdbvpq6zV6UKhNaThxukUdERv+JapJW/pr4JOv4TSlsw4Gq6nm3bsc0dUPMh8K47Fj1jTIk4xQbsvi4CJ/N7Qn9ZGh/IZDBnS4FK9s4WoyJKY5+ExQbCLYjXcI3lERs+67+2Rpd7x8fP69qudhkg7cl2yr4Bdk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uhQ+o/4D; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uhQ+o/4D" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2BBDC4CEE3; Fri, 17 Jan 2025 17:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737136794; bh=ceilUjRXkpDjjzvZIWDIPF1HxMNskgMsU9ZZ7pdFzYQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uhQ+o/4DkdFCwDD3EW9mbhhMkmE4WjyE3MqlJ29wzj/6wBPzwuT5eIGp6E+QXfLfE 2XmGaNxCxskVCb1Cf5EJeFO91su3U0HtOhBbYXh+9950V0gsVO+BNIRX2ts1lscsOC QJg9mGG56jqMgmhcECQIGNp9dJU1Ycs2JQ5smERW8h2UYZzvkkmN+tGjAhIC2vpTVq TJWU/GIUTHUll/UoSfcFC2iQjOIM9lYoJ4q8H5g9OtWlpYRsJNuuMBhBcSpy21cyF7 XffeJcy7m2g2wYBEXxg8Yl6FHIwGaHgKD8MbaOvRWOdZVdwkmwWeqqL2dwC0Lw5Z2Y CHZgXa9hr1KSg== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tYqdM-00000006Ak7-2Z5z; Fri, 17 Jan 2025 18:59:52 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org Subject: [PATCH RFC 10/10] [RFC BOILERPLATE] scripts/get_abi.py: add support for undefined ABIs Date: Fri, 17 Jan 2025 18:59:39 +0100 Message-ID: <89e3c065815db72901294bdda8ca7f05ab86b881.1737135484.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" For this RFC, let's keep here a boilerplate, just as a reminder. This patch contains just an skeleton for the argparse stuff. The plan is to implement such functionality here to be able to fully replace all get_abi.pl functionality. Signed-off-by: Mauro Carvalho Chehab --- scripts/get_abi.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/scripts/get_abi.py b/scripts/get_abi.py index 6a461f7cef32..221338c0d893 100755 --- a/scripts/get_abi.py +++ b/scripts/get_abi.py @@ -618,6 +618,27 @@ class AbiSearch: args.parser.search_symbols(args.expression) =20 =20 +class AbiUndefined: + """ + Initialize an argparse subparser for logic to check undefined ABI at + the current machine's sysfs + """ + + def __init__(self, subparsers): + """Initialize argparse subparsers""" + + parser =3D subparsers.add_parser("undefined", + formatter_class=3Dargparse.ArgumentDefault= sHelpFormatter, + description=3D"check undefined ABIs on loc= al machine") + + parser.set_defaults(func=3Dself.run) + + def run(self, args): + """Run subparser""" + + args.parser.parse_abi() + + def main(): """Main program""" =20 @@ -633,6 +654,7 @@ def main(): AbiRest(subparsers) AbiValidate(subparsers) AbiSearch(subparsers) + AbiUndefined(subparsers) =20 args =3D parser.parse_args() =20 --=20 2.47.1