From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Markus Heiser <markus.heiser@darmarIT.de>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kees Cook <keescook@chromium.org>,
Anton Vorontsov <anton@enomsg.org>,
Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>
Subject: Re: [PATCH v2 00/11] Documentation: Add ABI to the admin guide
Date: Thu, 20 Apr 2017 20:21:35 -0300 [thread overview]
Message-ID: <20170420202135.3e5ae79f@vento.lan> (raw)
In-Reply-To: <20170420154000.3a5fc945@lwn.net>
Em Thu, 20 Apr 2017 15:40:00 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:
> On Thu, 13 Apr 2017 07:08:43 -0300
> Mauro Carvalho Chehab <mchehab@s-opensource.com> wrote:
>
> > That's the third attempt to add support for the Kernel ABI
> > at the Documentation's admin guide.
> >
> > The first approach was based on a generic extension that
> > calls a random script. This one is based on a new Sphinx
> > extension with adds a symbol specific for parsing ABI
> > symbols.
> >
> > It adds a new script (scripts/get_abi.pl) with can either
> > search for ABI symbols that match a regular expression or
> > outputs the entire documentation found inside a directory
> > as a ReST book.
>
> So I've finally taken a quick look at this. I'm not quite ready to take
> it for 4.12 at this point, but I guess I'm running out of reasons to
> block it in general..:)
Good!
>
> One question, though: is there a reason for the split between the sphinx
> extension and the Perl script that does the work? Could it all happen in
> the extension directly instead? It seems like a lot of moving parts.
There are a couple of reasons:
- On the last feedback from you and Jani about MAINTAINERS parser,
you both suggested that, if we would be parsing MAINTAINERS, such
functionality should be at get_maintainer.pl. So, I tried to follow
the same way as get_maintainer: to have a single script that would be
in charge of handling ABI parsing;
- get_abi.pl doesn't only generate ReST documentation. It also
query the ABI database. So, with get_abi.pl, do things like:
$ ./scripts/get_abi.pl search usbip_status
/sys/devices/platform/usbip-vudc.%d/usbip_status
------------------------------------------------
Kernel version: 4.6
Date: April 2016
Contact: Krzysztof Opasiak <k.opasiak@samsung.com>
Defined on file: Documentation/ABI/testing/sysfs-platform-usbip-vudc
Description:
Current status of the device.
Allowed values:
1 - Device is available and can be exported
2 - Device is currently exported
3 - Fatal error occurred during communication
with peer
And even use regex, querying for multiple ABI symbols:
$ ./scripts/get_abi.pl search .*bus.*devices/.*power.*usb.*
/sys/bus/usb/devices/.../power/usb2_hardware_lpm
------------------------------------------------
Date: September 2011
Contact: Andiry Xu <andiry.xu@amd.com>
Defined on file: Documentation/ABI/testing/sysfs-bus-usb
Description:
If CONFIG_PM is set and a USB 2.0 lpm-capable device is plugged
in to a xHCI host which support link PM, it will perform a LPM
test; if the test is passed and host supports USB2 hardware LPM
(xHCI 1.0 feature), USB2 hardware LPM will be enabled for the
device and the USB device directory will contain a file named
power/usb2_hardware_lpm. The file holds a string value (enable
or disable) indicating whether or not USB2 hardware LPM is
enabled for the device. Developer can write y/Y/1 or n/N/0 to
the file to enable/disable the feature.
/sys/bus/usb/devices/.../power/usb2_lpm_besl
--------------------------------------------
Date: May 2013
Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
Defined on file: Documentation/ABI/testing/sysfs-bus-usb
Description:
USB 2.0 devices that support hardware link power management (LPM)
L1 sleep state now use a best effort service latency value (BESL) to
indicate the best effort to resumption of service to the device after the
initiation of the resume event.
If the device does not have a preferred besl value then the host can select
one instead. This usb2_lpm_besl attribute allows to tune the host selected besl
value in order to tune power saving and service latency.
Supported values are 0 - 15.
More information on how besl values map to microseconds can be found in
USB 2.0 ECN Errata for Link Power Management, section 4.10)
/sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout
--------------------------------------------------
Date: May 2013
Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
Defined on file: Documentation/ABI/testing/sysfs-bus-usb
Description:
USB 2.0 devices may support hardware link power management (LPM)
L1 sleep state. The usb2_lpm_l1_timeout attribute allows
tuning the timeout for L1 inactivity timer (LPM timer), e.g.
needed inactivity time before host requests the device to go to L1 sleep.
Useful for power management tuning.
Supported values are 0 - 65535 microseconds.
/sys/bus/usb/devices/.../power/usb3_hardware_lpm_u1
---------------------------------------------------
Date: November 2015
Contact: Kevin Strasser <kevin.strasser@linux.intel.com>
Lu Baolu <baolu.lu@linux.intel.com>
Defined on file: Documentation/ABI/testing/sysfs-bus-usb
Description:
If CONFIG_PM is set and a USB 3.0 lpm-capable device is plugged
in to a xHCI host which supports link PM, it will check if U1
and U2 exit latencies have been set in the BOS descriptor; if
the check is passed and the host supports USB3 hardware LPM,
USB3 hardware LPM will be enabled for the device and the USB
device directory will contain two files named
power/usb3_hardware_lpm_u1 and power/usb3_hardware_lpm_u2. These
files hold a string value (enable or disable) indicating whether
or not USB3 hardware LPM U1 or U2 is enabled for the device.
(the output in this mode not ReST)
- I'm not a python programmer ;-) I just took Markus "generic" kernel-cmd
code, hardcoding there a call to the script.
With (a lot of) time, I would likely be able to find a solution to add
the entire ABI logic there, but, in this case, we would lose the
capability of calling the script without Sphinx.
Thanks,
Mauro
next prev parent reply other threads:[~2017-04-20 23:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 10:08 [PATCH v2 00/11] Documentation: Add ABI to the admin guide Mauro Carvalho Chehab
2017-04-13 10:08 ` [PATCH v2 01/11] doc-rst: customize RTD theme; literal-block Mauro Carvalho Chehab
2017-04-13 10:08 ` [PATCH v2 02/11] ABI: fix some syntax issues at the ABI database Mauro Carvalho Chehab
2017-04-13 10:08 ` [PATCH v2 03/11] ABI: sysfs-driver-hid: the "What" field doesn't parse fine Mauro Carvalho Chehab
2017-04-13 10:08 ` [PATCH v2 04/11] ABI: sysfs-class-uwb_rc: remove a duplicated incomplete entry Mauro Carvalho Chehab
2017-04-13 10:08 ` [PATCH v2 05/11] ABI: better identificate tables Mauro Carvalho Chehab
2017-04-13 10:08 ` [PATCH v2 06/11] scripts: add an script to parse the ABI files Mauro Carvalho Chehab
2017-04-13 10:08 ` [PATCH v2 07/11] scripts/get_abi.pl: parse files with text at beginning Mauro Carvalho Chehab
2017-04-13 10:08 ` [PATCH v2 08/11] scripts/get_abi.pl: avoid use literal blocks when not needed Mauro Carvalho Chehab
2017-04-13 10:08 ` [PATCH v2 09/11] scripts/get_abi.pl: split label naming from xref logic Mauro Carvalho Chehab
2017-04-13 10:08 ` [PATCH v2 10/11] scripts/get_abi.pl: add support for searching for ABI symbols Mauro Carvalho Chehab
2017-04-13 10:08 ` [PATCH v2 11/11] doc-rst: add ABI documentation to the admin-guide book Mauro Carvalho Chehab
2017-04-13 11:02 ` [PATCH v2 00/11] Documentation: Add ABI to the admin guide Mauro Carvalho Chehab
[not found] ` <20170413102612.BA6BCC603E@b03ledav006.gho.boulder.ibm.com>
2017-04-13 14:02 ` [PATCH v2 02/11] ABI: fix some syntax issues at the ABI database Andrew Donnellan
2017-04-20 21:40 ` [PATCH v2 00/11] Documentation: Add ABI to the admin guide Jonathan Corbet
2017-04-20 23:21 ` Mauro Carvalho Chehab [this message]
2017-04-21 6:37 ` Markus Heiser
2017-04-21 14:22 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170420202135.3e5ae79f@vento.lan \
--to=mchehab@s-opensource.com \
--cc=anton@enomsg.org \
--cc=ccross@android.com \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.heiser@darmarIT.de \
--cc=mchehab@infradead.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox