]> git.ipfire.org Git - thirdparty/linux.git/log
thirdparty/linux.git
2 months agodocs: doc-guide: clarify latest theme usage
Randy Dunlap [Mon, 19 May 2025 22:36:13 +0000 (15:36 -0700)] 
docs: doc-guide: clarify latest theme usage

We have been using the Alabaster theme as the default theme since
Sept. 2022.

Keep the information on the RTD theme around in case someone wants to
try it with the DOCS_THEME environment variable.

Fixes: 26d797ffc1c0 ("docs: update sphinx.rst to reflect the default theme change")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250519223613.37277-1-rdunlap@infradead.org>

2 months agoDocumentation/scheduler: Fix typo in sched-stats domain field description
Madadi Vineeth Reddy [Tue, 20 May 2025 10:07:52 +0000 (15:37 +0530)] 
Documentation/scheduler: Fix typo in sched-stats domain field description

Fixes a typo in the description of the 23rd field of the scheduling
domain statistics, which was missing the word "cpu".

Fixes: 7c8cd569ff66 ("docs: Update Schedstat version to 17")
Signed-off-by: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250520100752.39921-1-vineethr@linux.ibm.com>

2 months agoscripts: kernel-doc: prevent a KeyError when checking output
Mauro Carvalho Chehab [Wed, 21 May 2025 09:02:15 +0000 (11:02 +0200)] 
scripts: kernel-doc: prevent a KeyError when checking output

If a file sent to KernelFiles.msg() method doesn't exist, instead
of producing a KeyError, output an error message.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Closes: https://lore.kernel.org/linux-doc/cover.1747719873.git.mchehab+huawei@kernel.org/T/#ma43ae9d8d0995b535cf5099e5381dace0410de04
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <4efa177f2157a7ec009cc197dfc2d87e6f32b165.1747817887.git.mchehab+huawei@kernel.org>

2 months agodocs: kerneldoc.py: simplify exception handling logic
Mauro Carvalho Chehab [Wed, 21 May 2025 09:02:14 +0000 (11:02 +0200)] 
docs: kerneldoc.py: simplify exception handling logic

Get rid of logger.verbose() which is causing the logger to not
work.

Also, instead of having try/except everywhere, place them on a
common place.

While here, get rid of some bogus logs.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <a2cc32d5d519ed343158a915c39e8dc536a8ddb7.1747817887.git.mchehab+huawei@kernel.org>

2 months agoMAINTAINERS: update linux-doc entry to cover new Python scripts
Mauro Carvalho Chehab [Wed, 21 May 2025 09:02:13 +0000 (11:02 +0200)] 
MAINTAINERS: update linux-doc entry to cover new Python scripts

Changes to ABI and kernel-doc need to be c/c linux-doc. Update
the maintainer's entry to cover those files.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <eb9690301ed71a778d6947f458db3c66c0ba5415.1747817887.git.mchehab+huawei@kernel.org>

2 months agodocs: align with scripts/syscall.tbl migration
Jesung Yang [Tue, 6 May 2025 19:48:41 +0000 (04:48 +0900)] 
docs: align with scripts/syscall.tbl migration

Update the documentation to reflect the migration of the following
architectures to the centralized syscall table format:

  arc, arm64, csky, hexagon, loongarch, nios2, openrisc, riscv

As of commit 3db80c999debbad ("riscv: convert to generic syscall table"),
these architectures no longer rely on include/uapi/asm-generic/unistd.h.
Instead, syscall table headers (syscall_table_{32,64}.h) are generated by
scripts/syscalltbl.sh based on entries in scripts/syscall.tbl, with ABIs
specified in arch/*/kernel/Makefile.syscalls.

For the convenience of developers working with older kernel versions, the
original documentation is fully retained, with new sections added to
cover the scripts/syscall.tbl approach.

Verified with `make htmldocs`.

Signed-off-by: Jesung Yang <y.j3ms.n@gmail.com>
Link: https://lore.kernel.org/lkml/20240704143611.2979589-1-arnd@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250506194841.1567737-1-y.j3ms.n@gmail.com>

2 months agoDocumentation: NTB: Fix typo
Utkarsh Tiwari [Mon, 19 May 2025 08:02:47 +0000 (13:32 +0530)] 
Documentation: NTB: Fix typo

Fix 'peace' to 'piece' in the ntb documentation

Signed-off-by: Utkarsh Tiwari <utkarsh02t@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250519080248.648971-1-utkarsh02t@gmail.com>

2 months agoDocumentation: ioctl-number: Update table intro
Bagas Sanjaya [Thu, 8 May 2025 00:58:39 +0000 (07:58 +0700)] 
Documentation: ioctl-number: Update table intro

Introduction paragraph to the ioctl numbers table states that only
ioctls in up to ancient Linux kernel version (v2.6.31) for x86 arch are
listed. This is inaccurate as the table also lists ioctls from non-x86
archs and the kernel is continously developed (currently in v6.x).

Update the paragraph accordingly.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250508005838.8381-2-bagasdotme@gmail.com>

2 months agodocs: conf.py: drop backward support for old Sphinx versions
Mauro Carvalho Chehab [Wed, 7 May 2025 12:11:17 +0000 (14:11 +0200)] 
docs: conf.py: drop backward support for old Sphinx versions

Since commit 5e25b972a22b ("docs: changes: update Python minimal version"),
the minimal Sphinx version is 3.4.3.

Drop support for older versions from the config file.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250507121117.317810-1-mchehab+huawei@kernel.org>

2 months agoDocs: driver-api/basics: add kobject_event interfaces
Randy Dunlap [Fri, 9 May 2025 00:55:38 +0000 (17:55 -0700)] 
Docs: driver-api/basics: add kobject_event interfaces

Add the kernel-doc comments from lib/kobject_uevent.c to the
"Kernel objects manipulation" section of driver API Basics.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250509005538.685678-1-rdunlap@infradead.org>

2 months agoDocs: relay: editing cleanups
Randy Dunlap [Mon, 12 May 2025 02:32:33 +0000 (19:32 -0700)] 
Docs: relay: editing cleanups

Cleanup some punctuation, capital letter, and a missing word
in relay.rst.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Tom Zanussi <tzanussi@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250512023233.107582-1-rdunlap@infradead.org>

2 months agodocs: fix "incase" typo in coresight/panic.rst
Hendrik Hamerlinck [Tue, 13 May 2025 11:09:31 +0000 (13:09 +0200)] 
docs: fix "incase" typo in coresight/panic.rst

Corrects a spelling mistake in Documentation/trace/coresight/panic.rst
where "incase" was used instead of "in case".

Signed-off-by: Hendrik Hamerlinck <hendrik.hamerlinck@hammernet.be>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250513110931.15072-1-hendrik.hamerlinck@hammernet.be>

2 months agoFix spelling error for 'parallel'
Anish Dabhane [Sun, 18 May 2025 14:01:03 +0000 (19:31 +0530)] 
Fix spelling error for 'parallel'

Signed-off-by: Anish Dabhane <anishdabhane71@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250518140107.21310-1-anishdabhane71@gmail.com>

2 months agodocs: admin-guide: fix typos in reporting-issues.rst
Shivam Sharma [Sun, 18 May 2025 17:26:58 +0000 (17:26 +0000)] 
docs: admin-guide: fix typos in reporting-issues.rst

Correct pin-point to pinpoint, If that the case to If that is the case,
and its only slightly modified to it's only slightly modified in
Documentation/admin-guide/reporting-issues.rst for proper spelling and grammar.

Signed-off-by: Shivam Sharma <10sharmashivam@gmail.com>
Acked-by: Thorsten Leemhuis <linux@leemhuis.info>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250518172658.6983-1-10sharmashivam@gmail.com>

2 months agoMerge tag 'Chinese-doc-6.16-rc1' of gitolite.kernel.org:pub/scm/linux/kernel/git...
Jonathan Corbet [Thu, 15 May 2025 09:41:15 +0000 (03:41 -0600)] 
Merge tag 'Chinese-doc-6.16-rc1' of gitolite.kernel.org:pub/scm/linux/kernel/git/alexs/linux into docs-mw

Chinese translation docs for 6.16-rc1 from Alex Shi

This is the Chinese translation subtree for 6.16-rc1. It just
includes few changes:
        - MAINTAINERS: Change Yanteng's email address
        - docs/zh_CN: Add how-to of Chinese translation
        - Add networking translation index
        - Docs/zh_CN: Translate msg_zerocopy.rst to Simplified Chinese

Signed-off-by: Alex Shi <alexs@kernel.org>
2 months agodocs: dmaengine: add explanation for DMA_ASYNC_TX capability
Kendra Moore [Mon, 21 Apr 2025 01:02:05 +0000 (21:02 -0400)] 
docs: dmaengine: add explanation for DMA_ASYNC_TX capability

This patch replaces the TODO for DMA_ASYNC_TX in the DMA engine
provider documentation. The flag is automatically set by the DMA
framework when a device supports key asynchronous memory-to-memory
operations such as memcpy, memset, xor, pq, xor_val, and pq_val.

It must not be set by drivers directly.

Signed-off-by: Kendra Moore <kendra.j.moore3443@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250421010205.84719-1-kendra.j.moore3443@gmail.com>

2 months agoDocumentation: leds: improve readibility of multicolor doc
Jean-Michel Hautbois [Mon, 21 Apr 2025 16:48:10 +0000 (18:48 +0200)] 
Documentation: leds: improve readibility of multicolor doc

When reading the documentation of multicolor leds, the HTML output is
not easy to read. Improve it by adding a few markups, splitting the
console in a dedicated block.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250421-leds-doc-v1-1-9a32df7fc6f4@yoseli.org>

2 months agodocs: fix typo in firmware-related section
Alexander Shatalin [Wed, 30 Apr 2025 14:27:26 +0000 (14:27 +0000)] 
docs: fix typo in firmware-related section

Fix a minor grammar issue by changing 'firmwares' to 'firmware' in the
Documentation/index.rst file.

Signed-off-by: Alexander Shatalin <sashatalin03@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250430142726.3276-1-sashatalin03@gmail.com>

2 months agodocs: Makefile: Inherit PYTHONPYCACHEPREFIX setting as env variable
Akira Yokosawa [Thu, 1 May 2025 08:21:07 +0000 (17:21 +0900)] 
docs: Makefile: Inherit PYTHONPYCACHEPREFIX setting as env variable

Commit 6c2f0b28d76e ("docs: Makefile: store __pycache__ at the output
directory") assigns a new path to PYTHONPYCACHEPREFIX for building
kernel documentation.

However, it is not necessarily optimal for everyone.

If you find PYTHONPYCACHEPREFIX is already set, it strongly suggests
that the developer has selected the setting as best suited for one's own
workflow.

Use "?=" in the assignment to PYTHONPYCACHEPREFIX so that the path of
$(abspath $(BUILDDIR)/__pycache__) works only as a safeguard.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <0253ce98-960c-4498-8ace-a4354e3ebc26@gmail.com>

2 months agoDocumentation: ioctl-number: Update outdated submission info
Bagas Sanjaya [Fri, 2 May 2025 07:45:05 +0000 (14:45 +0700)] 
Documentation: ioctl-number: Update outdated submission info

Much like device numbers that used to be assigned by LANANA (see commit
ebdf4040c16df5 ("Documentation: update the devices.txt documentation"),
ioctl numbers list is maintained by general kernel community nowadays
instead of contacting Michael directly as he's long stepped down from
kernel-related activity (his last LKML message was from 2003 [1] and
he's in CREDITS since the beginning of kernel's git history). Also,
patch (including one to update ioctl numbers list) submission now
follows process as described in
Documentation/process/submitting-patches.rst rather than sending
patches directly to Linus as in the distant past.

Update the docs to reflect that.

Link: https://lore.kernel.org/r/200305261446.h4QEkBVv023861@duracef.shout.net/
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250502074504.26933-2-bagasdotme@gmail.com>

3 months agodocs: namespace: Tweak and reword resource control doc
Joel Savitz [Mon, 21 Apr 2025 16:17:23 +0000 (12:17 -0400)] 
docs: namespace: Tweak and reword resource control doc

Fix the document title and reword the phrasing to active voice.

Signed-off-by: Joel Savitz <jsavitz@redhat.com>
Message-ID: <20250421161723.1138903-1-jsavitz@redhat.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 months agodocs: Makefile: store __pycache__ at the output directory
Mauro Carvalho Chehab [Fri, 25 Apr 2025 00:08:53 +0000 (08:08 +0800)] 
docs: Makefile: store __pycache__ at the output directory

Instead of blocking creation of *.pyc cache, store python
cache under Documentation/output/__pycache__

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <1b9e7f34c1d99a27a8abb308da3221b4663b5693.1745539360.git.mchehab+huawei@kernel.org>

3 months agoscripts/lib/kdoc/kdoc_parser.py: move kernel entry to a class
Mauro Carvalho Chehab [Fri, 25 Apr 2025 07:13:40 +0000 (15:13 +0800)] 
scripts/lib/kdoc/kdoc_parser.py: move kernel entry to a class

The KernelDoc class is too complex. Start optimizing it by
placing the kernel-doc parser entry to a separate class.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <28b456f726a022011f0ce5810dbcc26827c1403a.1745564565.git.mchehab+huawei@kernel.org>

3 months agoscripts/lib/kdoc: change mode to 0644
Mauro Carvalho Chehab [Fri, 25 Apr 2025 07:13:39 +0000 (15:13 +0800)] 
scripts/lib/kdoc: change mode to 0644

The script library here contain just classes. Remove execution
permission.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <be0b0a5bde82fa09027a5083f8202f150581eb4e.1745564565.git.mchehab+huawei@kernel.org>

3 months agodocs: Sphinx: kerneldoc: only initialize kernel-doc classes once
Mauro Carvalho Chehab [Fri, 25 Apr 2025 07:13:38 +0000 (15:13 +0800)] 
docs: Sphinx: kerneldoc: only initialize kernel-doc classes once

Instead of re-creating the objects every time, initialize it
just once.

This allows caching previously parsed objects.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <b00788f26e161512858a6e01a673c34743c954df.1745564565.git.mchehab+huawei@kernel.org>

3 months agoDocumentation: x86: Fix a typo in fsgs.rst
Adrian Bütler [Sat, 26 Apr 2025 12:23:03 +0000 (14:23 +0200)] 
Documentation: x86: Fix a typo in fsgs.rst

Fix a spelling typo in fsgs.rst.

Signed-off-by: Adrian Bütler <buetlera123@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250426122303.15905-1-buetlera123@gmail.com>

3 months agoDocumentation: fix speculation.rst chapter
Cui Wei [Sat, 26 Apr 2025 13:56:09 +0000 (21:56 +0800)] 
Documentation: fix speculation.rst chapter

'Mitigating speculation side-channels' should be a chapter rather
than title.

Signed-off-by: Cui Wei <chris.wei.cui@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250426135609.735-1-chris.wei.cui@gmail.com>

3 months ago.gitignore: ignore Python compiled bytecode
Mauro Carvalho Chehab [Thu, 24 Apr 2025 00:16:24 +0000 (08:16 +0800)] 
.gitignore: ignore Python compiled bytecode

While the building system doesn't create any Python JIT bytecode,
if one manually runs kernel-doc.py or get_abi.py, Python will,
by default, create a bytecode and store it under scripts/lib/*.

This is normal, and not controlled by the Kernel itself. So,
add *.pyc as an extension to be ignored.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <ae1c54ddacf6ded1f7154897b10798d4b3fdaf96.1745453655.git.mchehab+huawei@kernel.org>

3 months agoscripts/kernel-doc.py: don't create *.pyc files
Mauro Carvalho Chehab [Thu, 24 Apr 2025 00:16:23 +0000 (08:16 +0800)] 
scripts/kernel-doc.py: don't create *.pyc files

As reported by Andy, kernel-doc.py is creating a __pycache__
directory at build time.

Disable creation of __pycache__ for the libraries used by
kernel-doc.py, when excecuted via the build system or via
scripts/find-unused-docs.sh.

Reported-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Closes: https://lore.kernel.org/linux-doc/Z_zYXAJcTD-c3xTe@black.fi.intel.com/
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <158b962ed7cd104f7bbfe69f499ec1cc378864db.1745453655.git.mchehab+huawei@kernel.org>

3 months agoMakefile: move KERNELDOC macro to the main Makefile
Mauro Carvalho Chehab [Thu, 24 Apr 2025 00:16:22 +0000 (08:16 +0800)] 
Makefile: move KERNELDOC macro to the main Makefile

As kernel-doc script is used not only on Documentation, but
also on scripts and drivers/drm Makefiles, move it to the
main makefile, as otherwise sub-makefiles may not have it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <bb3ea3b49e76aee51dae7762db10c4d38cd67afe.1745453655.git.mchehab+huawei@kernel.org>

3 months agodocs: Makefile: get rid of KERNELDOC_CONF env variable
Mauro Carvalho Chehab [Thu, 24 Apr 2025 00:16:21 +0000 (08:16 +0800)] 
docs: Makefile: get rid of KERNELDOC_CONF env variable

Despite its name, what's there is a set of Sphinx arguments that
are passed to sphinx/kerneldoc.py:

- kerneldoc_srctree: location of the source tree;
- kerneldoc_bin: external script to excecute kernel-doc

Drop it, and just place the values at the already-existing
ALLSPHINXOPTS variable.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <88be0fc288598c30fbedb9cc230b2a7ed28225a2.1745453655.git.mchehab+huawei@kernel.org>

3 months agodocs: sphinx: kerneldoc: Use python class if available
Mauro Carvalho Chehab [Tue, 15 Apr 2025 03:12:51 +0000 (11:12 +0800)] 
docs: sphinx: kerneldoc: Use python class if available

Better integrate with the new kernel-doc tool by calling the
Python classes directly if KERNELDOC=scripts/kernel-doc.py.

This way, warnings won't be duplicated anymore, as files
will be parsed only once.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/1556a6c005d8e0fafa951f74725e984e1c7459bf.1744685912.git.mchehab+huawei@kernel.org
3 months agoscripts:kdoc_files.py: use glob for export_file seek
Mauro Carvalho Chehab [Tue, 15 Apr 2025 03:12:50 +0000 (11:12 +0800)] 
scripts:kdoc_files.py: use glob for export_file seek

As filenames are expanded using kernel-doc glob, just in case,
use it also when checking for exported symbols.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/21657afdd4f8effe0752a5ec258d74b8a4101f55.1744685912.git.mchehab+huawei@kernel.org
3 months agoscripts/lib/kdoc/kdoc_parser.py: move states to a separate class
Mauro Carvalho Chehab [Tue, 15 Apr 2025 03:12:49 +0000 (11:12 +0800)] 
scripts/lib/kdoc/kdoc_parser.py: move states to a separate class

States are really enums. on Python, enums are actually classes,
as can be seen at:
https://docs.python.org/3/library/enum.html

Yet, I can't see any advantage of derivating the class from
enum class here. So, just place the states on a separate class.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/00cb4e0b8a1545bf7c4401b58213841db5cba2e2.1744685912.git.mchehab+huawei@kernel.org
3 months agoscripts/lib/kdoc/kdoc_files.py: don't try to join None
Mauro Carvalho Chehab [Tue, 15 Apr 2025 03:12:48 +0000 (11:12 +0800)] 
scripts/lib/kdoc/kdoc_files.py: don't try to join None

If out_msg() returns None, it means that an unknown declaration
was found. Avoid letting the script crash on such case.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/4334d16f14cfd93e611b290fb56c35d236cadcb7.1744685912.git.mchehab+huawei@kernel.org
3 months agoDocumentation: trace: Refactor toctree
Purva Yeshi [Wed, 16 Apr 2025 02:40:50 +0000 (09:40 +0700)] 
Documentation: trace: Refactor toctree

Refactor table of contents of kernel tracing subsystem docs to improve
clarity, structure, and organization:

- Reformat sections and add appropriate headings
- Improve section grouping and refine descriptions for each group
- Add docs intro paragraph

Signed-off-by: Purva Yeshi <purvayeshi550@gmail.com>
Link: https://lore.kernel.org/r/20250318113230.24950-2-purvayeshi550@gmail.com
[Bagas: massage commit message and address reviews]
Co-developed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 months agoDocumentation: trace: Reduce toctree depth
Purva Yeshi [Wed, 16 Apr 2025 02:40:49 +0000 (09:40 +0700)] 
Documentation: trace: Reduce toctree depth

Reduce toctree depth from 2 to 1 so that only docs titles are listed
in the toctree.

Signed-off-by: Purva Yeshi <purvayeshi550@gmail.com>
Link: https://lore.kernel.org/r/20250318113230.24950-1-purvayeshi550@gmail.com
[Bagas: massage commit message]
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 months agodocs: Fix conflicting contributor identity info
Ammar Askar [Tue, 18 Mar 2025 23:53:31 +0000 (19:53 -0400)] 
docs: Fix conflicting contributor identity info

In commit d4563201f33a ("Documentation: simplify and clarify DCO
contribution example language"), the patch submission documentation was
updated to remove the note about pseudonyms and instead simplify it to
allow "known identities".

The process documentation still explicitly prohibits pseudonymous
contributors. This patch changes the process documentation to line up
with the submitting patches document.

Signed-off-by: Ammar Askar <ammar@ammaraskar.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250318235331.3566174-1-ammar@ammaraskar.com
3 months agodocs/sp_SP: fix links to mailing list services
Andres Urian Florez [Mon, 24 Mar 2025 16:45:58 +0000 (11:45 -0500)] 
docs/sp_SP: fix links to mailing list services

With the changes in the way mailing lists are hostet at kernel.org, there
is a need to sync the Spanish documentation to:

1. fix links that are pointing at the outdated resources
2. remove an outdated patchbomb admonition

Signed-off-by: Andres Urian Florez <andres.emb.sys@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250324164613.12639-1-andres.emb.sys@gmail.com
3 months agoDocumentation/rtla: Include BPF sample collection
Tomas Glozar [Tue, 11 Mar 2025 11:49:36 +0000 (12:49 +0100)] 
Documentation/rtla: Include BPF sample collection

Add dependencies needed to build rtla with BPF sample collection support
to README, and document both ways of sample collection in the manpages.

Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Reviewed-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250311114936.148012-5-tglozar@redhat.com
3 months agoDocumentation/rtla: Fix typo in common_timerlat_description.rst
Tomas Glozar [Tue, 11 Mar 2025 11:49:35 +0000 (12:49 +0100)] 
Documentation/rtla: Fix typo in common_timerlat_description.rst

Fix "it enable" to "it enables".

Fixes: 29380d4055e5 ("rtla: Add rtla timerlat documentation")
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Reviewed-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250311114936.148012-4-tglozar@redhat.com
3 months agoDocumentation/rtla: Fix typo in rtla-timerlat.rst
Tomas Glozar [Tue, 11 Mar 2025 11:49:34 +0000 (12:49 +0100)] 
Documentation/rtla: Fix typo in rtla-timerlat.rst

The file says "rtla hist hist mode" instead of "rtla timerlat hist
mode".

Fix the typo.

Fixes: 29380d4055e5 ("rtla: Add rtla timerlat documentation")
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Reviewed-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250311114936.148012-3-tglozar@redhat.com
3 months agoDocumentation/rtla: Fix duplicate text about timerlat tracer
Tomas Glozar [Tue, 11 Mar 2025 11:49:33 +0000 (12:49 +0100)] 
Documentation/rtla: Fix duplicate text about timerlat tracer

A passage about how the timerlat tracer outputs information is included
in both common_timerlat_description.rst and rtla-timerlat.rst, leading
it to be displayed twice in the rtla-timerlat page.

Remove the duplicate passage from rtla-timerlat.rst.

Fixes: 29380d4055e5 ("rtla: Add rtla timerlat documentation")
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Reviewed-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250311114936.148012-2-tglozar@redhat.com
3 months agodocs: hid: Fix typo in intel-thc-hid.rst
Chih Yun Lin [Sun, 30 Mar 2025 08:45:18 +0000 (16:45 +0800)] 
docs: hid: Fix typo in intel-thc-hid.rst

Corrected the spelling of "triggerred" to "triggered" and "flexiblity"
to "flexibility".

Signed-off-by: Chih Yun Lin <noralin249@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250330084518.20916-1-noralin249@gmail.com
3 months agoAdded usb_string function to a namespace
Kevin Paul Reddy Janagari [Sat, 5 Apr 2025 16:51:16 +0000 (22:21 +0530)] 
Added usb_string function to a namespace

with reference to WARNING:
Duplicate C declaration, also defined at driver-api/usb/gadget:804
There is a function usb_string in the file message.c,
there is also a struct usb_string in the kernel api headers.
The docs is unable to index the function as the index is occupied by struct
This fix adds messgae.c to the usb_core namespace (in docs) hence providing
usb_sting a unique index usb_core.usb_string()

Signed-off-by: Kevin Paul Reddy Janagari <kevinpaul468@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250405165116.147958-1-kevinpaul468@gmail.com
3 months agocpufreq: editing corrections to cpufreq.rst
Randy Dunlap [Sat, 5 Apr 2025 00:14:47 +0000 (17:14 -0700)] 
cpufreq: editing corrections to cpufreq.rst

Change a few words and abbreviations/punctuation.

Change one echo command to include a trailing '`'.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250405001447.4039463-1-rdunlap@infradead.org
3 months agodocs: Disambiguate a pair of rST labels
James Addison [Mon, 7 Apr 2025 19:51:20 +0000 (21:51 +0200)] 
docs: Disambiguate a pair of rST labels

According to the reStructuredText documentation, internal hyperlink
targets[1] are intended to resolve within the current document.

Sphinx has a bug that causes internal hyperlinks declared with
duplicate names to resolve nondeterministically, producing incorrect
documentation. Sphinx does not yet emit a warning when these
duplicate target names are declared.

To improve the reproducibility and correctness of the HTML
documentation, disambiguate two labels both previously titled
"submit_improvements".

[1] - https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#hyperlink-targets

Link: https://github.com/sphinx-doc/sphinx/issues/13383
Signed-off-by: James Addison <jay@jp-hosting.net>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250407195120.331103-2-jvanderwaa@redhat.com
3 months agodocs: automarkup: Move common logic to add and resolve xref to helper
Nícolas F. R. A. Prado [Tue, 8 Apr 2025 17:57:47 +0000 (13:57 -0400)] 
docs: automarkup: Move common logic to add and resolve xref to helper

Several of the markup functions contain the same code, calling into
sphinx's pending_xref and resolve_xref functions to add and resolve a
cross-reference, with only a few of the parameters changed (domain,
reference type, markup content). Move this logic to its own function and
reuse it in the markup functions.

No functional change.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250408-automarkup-resolve-xref-helper-v2-1-e0a9b8fc7fdd@collabora.com
3 months agoMAINTAINERS: Change Yanteng's email address
Yanteng Si [Fri, 28 Mar 2025 10:06:44 +0000 (18:06 +0800)] 
MAINTAINERS: Change Yanteng's email address

I'm no longer work for Loongson, so I have permanently
lost my Loongson email account.

Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Link: https://lore.kernel.org/r/403fa4722ad008800086e41d412cd322243b9089.1743156287.git.si.yanteng@linux.dev
Signed-off-by: Alex Shi <alexs@kernel.org>
3 months agodocs/zh_CN: Add how-to of Chinese translation
Yanteng Si [Fri, 28 Mar 2025 10:06:43 +0000 (18:06 +0800)] 
docs/zh_CN: Add how-to of Chinese translation

Many new faces keep appearing on the mailing list from time to
time, and there may be many potential developers who want to
participate in the Chinese translation but don't know how to
get started. As more and more documents are translated, it is
becoming increasingly important to improve the maintainability
of Chinese documents. We have a lot of conventions, but currently
these conventions are still being passed on orally. At the same
time, during the review process, especially for the first few
patches submitted by newbies, we have made too many repetitive
comments. In order to address the above issues, I have drafted
this guide, and there is still a lot that needs to be improved.

Alex Shi: Fix a embedded code white space issue.
Co-developed-by: Dongliang Mu <dzm91@hust.edu.cn>
Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
Signed-off-by: Yanteng Si <si.yanteng@linux.dev>
Link: https://lore.kernel.org/r/0443c86e10d900a4d752d103265c948360563d43.1743156287.git.si.yanteng@linux.dev
Signed-off-by: Alex Shi <alexs@kernel.org>
3 months agoDocs/zh_CN: Translate msg_zerocopy.rst to Simplified Chinese
Wang Yaxin [Wed, 19 Mar 2025 07:52:37 +0000 (15:52 +0800)] 
Docs/zh_CN: Translate msg_zerocopy.rst to Simplified Chinese

translate the "msg_zerocopy.rst" into Simplified Chinese.

Update to commit bac2cac12c26("docs: net: description of
MSG_ZEROCOPY for AF_VSOCK")

Fix embedded code type issue by Alex Shi.

Signed-off-by: Wang Yaxin <wang.yaxin@zte.com.cn>
Signed-off-by: Jiang Kun <jiang.kun2@zte.com.cn>
Signed-off-by: xu xin <xu.xin16@zte.com.cn>
Signed-off-by: He Peilin <he.peilin@zte.com.cn>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>
Link: https://lore.kernel.org/r/20250319155237978a-_o_XXMLszvXPDlyRsb4@zte.com.cn
Signed-off-by: Alex Shi <alexs@kernel.org>
3 months agoDocs/zh_CN: Translate index.rst to Simplified Chinese
Wang Yaxin [Wed, 19 Mar 2025 07:51:10 +0000 (15:51 +0800)] 
Docs/zh_CN: Translate index.rst to Simplified Chinese

translate the "index.rst" into Simplified Chinese.

Update to commit e793b86ae44e("Documentation: networking: add
Twisted Pair Ethernet diagnostics at OSI Layer 1")

Signed-off-by: Wang Yaxin <wang.yaxin@zte.com.cn>
Signed-off-by: Jiang Kun <jiang.kun2@zte.com.cn>
Signed-off-by: xu xin <xu.xin16@zte.com.cn>
Signed-off-by: He Peilin <he.peilin@zte.com.cn>
Link: https://lore.kernel.org/r/20250319155110884FL0FcZmsjNzP1NnAC70Zs@zte.com.cn
Signed-off-by: Alex Shi <alexs@kernel.org>
3 months agoMerge branch 'mauro' into docs-mw
Jonathan Corbet [Wed, 9 Apr 2025 18:24:51 +0000 (12:24 -0600)] 
Merge branch 'mauro' into docs-mw

Mauro says:

This changeset contains the kernel-doc.py script to replace the verable
kernel-doc originally written in Perl. It replaces the first version and the
second series I sent on the top of it.

I tried to stay as close as possible of the original Perl implementation
on the first patch introducing kernel-doc.py, as it helps to double check
if each function was  properly translated to Python.  This have been
helpful debugging troubles that happened during the conversion.

I worked hard to make it bug-compatible with the original one. Still, its
output has a couple of differences from the original one:

- The tab expansion works better with the Python script. With that, some
  outputs that contain tabs at kernel-doc markups are now different;

- The new script  works better stripping blank lines. So, there are a couple
  of empty new lines that are now stripped with this version;

- There is a buggy logic at kernel-doc to strip empty description and
  return sections. I was not able to replicate the exact behavior. So, I ended
  adding an extra logic to strip empty sections with a different algorithm.

Yet, on my tests, the results are compatible with the venerable script
output for all .. kernel-doc tags found in Documentation/. I double-checked
this by adding support to output the kernel-doc commands when V=1, and
then I ran a diff between kernel-doc.pl and kernel-doc.py for the same
command lines.

The only patch that doesn't belong to this series is a patch dropping
kernel-doc.pl. I opted to keep it for now, as it can help to better
test the new tools.

With such changes, if one wants to build docs with the old script,
all it is needed is to use KERNELDOC parameter, e.g.:

$ make KERNELDOC=scripts/kernel-doc.pl htmldocs

3 months agoscripts: kernel-doc: fix parsing function-like typedefs (again)
Sean Anderson [Tue, 8 Apr 2025 10:09:36 +0000 (18:09 +0800)] 
scripts: kernel-doc: fix parsing function-like typedefs (again)

Typedefs like

    typedef struct phylink_pcs *(*pcs_xlate_t)(const u64 *args);

have a typedef_type that ends with a * and therefore has no word
boundary. Add an extra clause for the final group of the typedef_type so
we only require a word boundary if we match a word.

[mchehab: modify also kernel-doc.py, as we're deprecating the perl version]

Fixes: 7d2c6b1edf79 ("scripts: kernel-doc: fix parsing function-like typedefs")
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/e0abb103c73a96d76602d909f60ab8fd6e2fd0bd.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: Rename the kernel doc Re class to KernRe
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:35 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: Rename the kernel doc Re class to KernRe

Using just "Re" makes it harder to distinguish from the native
"re" class. So, let's rename it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/4e095ecd5235a3e811ddcf5bad4cfb92f1da0a4a.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel_doc.py: better handle exported symbols
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:34 +0000 (18:09 +0800)] 
scripts/kernel_doc.py: better handle exported symbols

Change the logic which detects internal/external symbols in a way
that we can re-use it when calling via Sphinx extension.

While here, remove an unused self.config var and let it clearer
that self.config variables are read-only. This helps to allow
handling multiple times in parallel if ever needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/6a69ba8d2b7ee6a6427abb53e60d09bd4d3565ee.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/lib/kdoc/kdoc_files.py: allow filtering output per fname
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:33 +0000 (18:09 +0800)] 
scripts/lib/kdoc/kdoc_files.py: allow filtering output per fname

For kerneldoc Sphinx extension, it is useful to display
parsed results only from a single file. Change the logic at
KernelFiles.msg() to allow such usage.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/9f5c0ff2568f34532ca99465fb378241d831d39f.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc: switch to use kernel-doc.py
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:32 +0000 (18:09 +0800)] 
scripts/kernel-doc: switch to use kernel-doc.py

Now that all features are in place, change the kernel-doc alias
to point to kernel-doc.py.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/d84a2ad282821928a60b8dcbec305ef7e7bd58e6.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: Properly handle Werror and exit codes
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:31 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: Properly handle Werror and exit codes

The original kernel-doc script has a logic to return warnings
as errors, and to report the number of warnings found, if in
verbose mode.

Implement it to be fully compatible with the original script.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/de33b0cebd9fdf82d8b221bcfe41db7269286222.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/lib/kdoc/kdoc_parser.py: remove a python 3.9 dependency
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:30 +0000 (18:09 +0800)] 
scripts/lib/kdoc/kdoc_parser.py: remove a python 3.9 dependency

str.removesuffix() was added on Python 3.9, but rstrip()
actually does the same thing, as we just want to remove a single
character. It is also shorter.

So, use it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/f64cc4adef107ada26da4bfb7e4b7002dd783173.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: properly handle KBUILD_BUILD_TIMESTAMP
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:29 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: properly handle KBUILD_BUILD_TIMESTAMP

The logic that handles KBUILD_BUILD_TIMESTAMP is wrong, and adds
a dependency of a third party module (dateutil).

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/ffc70a1b741b010365ed82f31611018f24f91ce7.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: move modulename to man class
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:28 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: move modulename to man class

Only man output requires a modulename. Move its definition
to the man class.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/583085e3885b0075d16ef9961b4f2ad870f30a55.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/lib/kdoc/kdoc_parser.py: fix Python compat with < v3.13
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:27 +0000 (18:09 +0800)] 
scripts/lib/kdoc/kdoc_parser.py: fix Python compat with < v3.13

- str.replace count was introduced only in Python 3.13;
- before Python 3.13, f-string dict arguments can't use the same
  delimiter of the main string.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/e2b8e8361294558dae09236e4b8fbea5d86be5a3.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: adjust some coding style issues
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:26 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: adjust some coding style issues

Make pylint happier by adding some missing documentation and
addressing a couple of pylint warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/0f9d5473105e4c09c6c41e3db72cc63f1d4d55f9.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: Set an output format for --none
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:25 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: Set an output format for --none

Now that warnings output is deferred to the output plugin, we
need to have an output style for none as well.

So, use the OutputFormat base class on such cases.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/caa1089e16f4609f792ff26731ad9e9c3a6f6b1d.1744106242.git.mchehab+huawei@kernel.org
3 months agodocs: sphinx: kerneldoc: use kernel-doc.py script
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:24 +0000 (18:09 +0800)] 
docs: sphinx: kerneldoc: use kernel-doc.py script

Switch to the new version when producing documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/a81d8db099d9cef5161deaef40ac9056bf9802a3.1744106242.git.mchehab+huawei@kernel.org
3 months agodocs: sphinx: kerneldoc: ignore "\" characters from options
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:23 +0000 (18:09 +0800)] 
docs: sphinx: kerneldoc: ignore "\" characters from options

Documentation/driver-api/infiniband.rst has a kernel-doc tag
with "\" characters at the end:

.. kernel-doc:: drivers/infiniband/ulp/iser/iscsi_iser.c
   :functions: iscsi_iser_pdu_alloc iser_initialize_task_headers \
        iscsi_iser_task_init iscsi_iser_mtask_xmit iscsi_iser_task_xmit \
        iscsi_iser_cleanup_task iscsi_iser_check_protection \
        iscsi_iser_conn_create iscsi_iser_conn_bind \
        iscsi_iser_conn_start iscsi_iser_conn_stop \
        iscsi_iser_session_destroy iscsi_iser_session_create \
        iscsi_iser_set_param iscsi_iser_ep_connect iscsi_iser_ep_poll \
        iscsi_iser_ep_disconnect

This is not handled well, as the "\" strings will be just stored inside
Sphinx options.

While the actual problem deserves being fixed, better to relax the
keneldoc.py extension to silently strip "\" from the end of strings,
as otherwise this may cause troubles when preparing arguments to
be executed by kernel-doc.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/4c652d6c57b20500c135b95294e554d9e9a97f42.1744106242.git.mchehab+huawei@kernel.org
3 months agodocs: sphinx: kerneldoc: verbose kernel-doc command if V=1
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:22 +0000 (18:09 +0800)] 
docs: sphinx: kerneldoc: verbose kernel-doc command if V=1

It is useful to know what kernel-doc command was used during
document build time, as it allows one to check the output the same
way as Sphinx extension does.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/a2f01590814b111e138f278e8a721024fdf2d445.1744106242.git.mchehab+huawei@kernel.org
3 months agodocs: add a .pylintrc file with sys path for docs scripts
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:21 +0000 (18:09 +0800)] 
docs: add a .pylintrc file with sys path for docs scripts

The docs scripts that are used by Documentation/sphinx are
using scripts/lib/* directories to place classes that will
be used by both extensions and scripts.

When pylint is used, it needs to identify the path where
such scripts are, otherwise it will bail out. Add a simple
RC file placing the location of such files.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/7b3c8a932c50ae52ce4c848676602b46d1d4a8f9.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: postpone warnings to the output plugin
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:20 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: postpone warnings to the output plugin

We don't want to have warnings displayed for symbols that
weren't output. So, postpone warnings print to the output
plugin, where symbol output is validated.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/e6344711e390cf22af02a56bb5dd51ca67c0afb6.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: properly handle out_section for ReST
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:19 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: properly handle out_section for ReST

There is a difference at the way DOC sections are output with
the include mode. Handle such difference properly.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/935d00c6a7c45b25a8be72fad6183fe5a8476cd2.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: fix handling of doc output check
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:18 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: fix handling of doc output check

The filtering logic was seeking for the DOC name to check for
symbols, but such data is stored only inside a section. Add it
to the output_declaration, as it is quicker/easier to check
the declaration name than to check inside each section.

While here, make sure that the output for both ReST and man
after filtering will be similar to what kernel-doc Perl
version does.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/6d8b77af85295452c0191863ea1041f4195aeaaf.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: fix line number output
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:17 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: fix line number output

With the Pyhton version, the actual output happens after parsing,
from records stored at self.entries.

Ensure that line numbers will be properly stored there and
that they'll produce the desired results at the ReST output.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/5182a531d14b5fe9e1fc5da5f9dae05d66852a60.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: implement support for -no-doc-sections
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:16 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: implement support for -no-doc-sections

The venerable kernel-doc Perl script has a number of options that
aren't properly documented. Among them, there is -no-doc-sections,
which is used by the Sphinx extension.

Implement support for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/06b18a32142b44d5ba8b41ac64a76c02b03b4969.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: move file lists to the parser function
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:15 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: move file lists to the parser function

Instead of setting file lists at __init__ time, move it to
the actual parsing function. This allows adding more files
to be parsed in real time, by calling parse function multiple
times.

With the new way, the export_files logic was rewritten to
avoid parsing twice EXPORT_SYMBOL for partial matches.

Please notice that, with this logic, it can still read the
same file twice when export_file is used.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/ab10bc94050406ce6536d4944b5d718ecd70812f.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: convert message output to an interactor
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:14 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: convert message output to an interactor

Instead of directly printing output messages, change kdoc classes
to return an interactor with the output message, letting the
actual display to happen at the command-line command.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/557304c8458f1fb4aa2e833f4bdaff953094ddcb.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: move output classes to a separate file
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:13 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: move output classes to a separate file

In preparation for letting kerneldoc Sphinx extension to import
Python libraries, move kernel-doc output logic to a separate file.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/81087eff25d11c265019a8631f7fc8d3904795d0.1744106242.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: move KernelFiles class to a separate file
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:12 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: move KernelFiles class to a separate file

The KernelFiles class is the main dispatcher which parses each
source file.

In preparation for letting kerneldoc Sphinx extension to import
Python libraries, move regex ancillary classes to a separate
file.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/80bc855e128a9ff0a11df5afe9ba71775dfc9a0f.1744106241.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: move KernelDoc class to a separate file
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:11 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: move KernelDoc class to a separate file

In preparation for letting kerneldoc Sphinx extension to import
Python libraries, move regex ancillary classes to a separate
file.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/c76df228504e711c6b4bcd23d5a0ea1fda678cda.1744106241.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: move regex methods to a separate file
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:10 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: move regex methods to a separate file

In preparation for letting kerneldoc Sphinx extension to import
Python libraries, move regex ancillary classes to a separate
file.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/64f96b6744435b51894bb4ab7612851d9d054190.1744106241.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: properly handle struct_group macros
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:09 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: properly handle struct_group macros

Handing nested parenthesis with regular expressions is not an
easy task. It is even harder with Python's re module, as it
has a limited subset of regular expressions, missing more
advanced features.

We might use instead Python regex module, but still the
regular expressions are very hard to understand. So, instead,
add a logic to properly match delimiters.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/74dee485f70b7ce85e90496bfdd360283a677a58.1744106241.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: better handle empty sections
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:08 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: better handle empty sections

While doing the conversion, we opted to skip empty sections
(description, return), but this makes harder to see the differences
between kernel-doc (Perl) and kernel-doc.py.

Also, the logic doesn't always work properly. So, change the
way this is done by adding an extra step to remove such
sections, doing it only for Return and Description.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/1b057092a48ba61d92a411f4f6d505b802913785.1744106241.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: output warnings the same way as kerneldoc
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:07 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: output warnings the same way as kerneldoc

Add a formatter to logging to produce outputs in a similar way
to kernel-doc. This should help making it more compatible with
existing scripts.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/559f0ad9e6fecfcbb3cc38b6097463bd38d58629.1744106241.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc.py: add a Python parser
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:06 +0000 (18:09 +0800)] 
scripts/kernel-doc.py: add a Python parser

Maintaining kernel-doc has been a challenge, as there aren't many
perl developers among maintainers. Also, the logic there is too
complex. Having lots of global variables and using pure functions
doesn't help.

Rewrite the script in Python, placing most global variables
inside classes. This should help maintaining the script in long
term.

It also allows a better integration with kernel-doc Sphinx
extension in the future.

I opted to keep this version as close as possible to what we
have already in Perl. There are some differences though:

1. There is one regular expression that required a rewrite:

/\bSTRUCT_GROUP(\(((?:(?>[^)(]+)|(?1))*)\))[^;]*;/

   As this one uses two features that aren't available by the native
   Python regular expression module (re):

- recursive patterns: ?1
- atomic grouping (?>...)

   Rewrite it to use a much simpler regular expression:

/\bSTRUCT_GROUP\(([^\)]+)\)[^;]*;/

   Extra care should be taken when validating this script, as such
   replacement might cause some regressions.

2. The filters are now applied only during output generation.
   In particular, "nosymbol" argument is only handled there.

   It means that, if the same file is processed twice for
   different symbols, the warnings will be duplicated.

   I opted to use this behavior as it allows the Sphinx extension
   to read the file(s) only once, and apply the filtering only
   when producing the ReST output. This hopefully will help
   to speed up doc generation

3. This version can handle multiple files and multiple directories.

   So, if one just wants to produce a big output with everything
   inside a file, this could be done with

   $ time ./scripts/kernel-doc.py -man . 2>/dev/null >new
   real    0m54.592s
   user    0m53.345s
   sys     0m0.997s

4. I tried to replicate as much as possible the same arguments
   from kernel-doc, with about the same behavior, for the
   command line parameters starting with a single dash (-parameter).

   I also added one letter aliases for each parameter, and a
   --parameter (sometimes with a better name).

5. There are some sutile nuances between how Perl handles
   certain regular expressions. In special, the qr operatior,
   which compiles a regular expression also works as a
   non-capturing group. It means that some regexes like
   this one:

my $type1 = qr{[\w\s]+};

   needs to be mapped as:

type1 = r'(?:[\w\s]+)?'

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/2fa671a9fb08d03a376a42d46cc0b1d3aab4ae3f.1744106241.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc: add a symlink to the Perl version of kernel-doc
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:05 +0000 (18:09 +0800)] 
scripts/kernel-doc: add a symlink to the Perl version of kernel-doc

Preserve kernel-doc name, associating with the curent version
in Perl.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/a5d69e436287433ad8be066c648a77ffe493c21c.1744106241.git.mchehab+huawei@kernel.org
3 months agoscripts/kernel-doc: rename it to scripts/kernel-doc.pl
Mauro Carvalho Chehab [Tue, 8 Apr 2025 10:09:04 +0000 (18:09 +0800)] 
scripts/kernel-doc: rename it to scripts/kernel-doc.pl

In preparation for deprecating scripts/kernel-doc in favor of a
new version written in Perl, rename it to scripts/kernel-doc.pl.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/a8a86136bcf102495f09c24a65817f1600fae0e8.1744106241.git.mchehab+huawei@kernel.org
3 months agoLinux 6.15-rc1 v6.15-rc1
Linus Torvalds [Sun, 6 Apr 2025 20:11:33 +0000 (13:11 -0700)] 
Linux 6.15-rc1

3 months agotools/include: make uapi/linux/types.h usable from assembly
Thomas Weißschuh [Wed, 2 Apr 2025 20:21:57 +0000 (21:21 +0100)] 
tools/include: make uapi/linux/types.h usable from assembly

The "real" linux/types.h UAPI header gracefully degrades to a NOOP when
included from assembly code.

Mirror this behaviour in the tools/ variant.

Test for __ASSEMBLER__ over __ASSEMBLY__ as the former is provided by the
toolchain automatically.

Reported-by: Mark Brown <broonie@kernel.org>
Closes: https://lore.kernel.org/lkml/af553c62-ca2f-4956-932c-dd6e3a126f58@sirena.org.uk/
Fixes: c9fbaa879508 ("selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20250321-uapi-consistency-v1-1-439070118dc0@linutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoMerge tag 'turbostat-2025.05.06' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 6 Apr 2025 19:32:43 +0000 (12:32 -0700)] 
Merge tag 'turbostat-2025.05.06' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux

Pull turbostat updates from Len Brown:

 - support up to 8192 processors

 - add cpuidle governor debug telemetry, disabled by default

 - update default output to exclude cpuidle invocation counts

 - bug fixes

* tag 'turbostat-2025.05.06' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  tools/power turbostat: v2025.05.06
  tools/power turbostat: disable "cpuidle" invocation counters, by default
  tools/power turbostat: re-factor sysfs code
  tools/power turbostat: Restore GFX sysfs fflush() call
  tools/power turbostat: Document GNR UncMHz domain convention
  tools/power turbostat: report CoreThr per measurement interval
  tools/power turbostat: Increase CPU_SUBSET_MAXCPUS to 8192
  tools/power turbostat: Add idle governor statistics reporting
  tools/power turbostat: Fix names matching
  tools/power turbostat: Allow Zero return value for some RAPL registers
  tools/power turbostat: Clustered Uncore MHz counters should honor show/hide options

3 months agoMerge tag 'soundwire-6.15-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 6 Apr 2025 19:04:53 +0000 (12:04 -0700)] 
Merge tag 'soundwire-6.15-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire

Pull soundwire fix from Vinod Koul:

 - add missing config symbol CONFIG_SND_HDA_EXT_CORE required for asoc
   driver CONFIG_SND_SOF_SOF_HDA_SDW_BPT

* tag 'soundwire-6.15-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
  ASoC: SOF: Intel: Let SND_SOF_SOF_HDA_SDW_BPT select SND_HDA_EXT_CORE

3 months agotools/power turbostat: v2025.05.06
Len Brown [Sun, 6 Apr 2025 18:49:20 +0000 (14:49 -0400)] 
tools/power turbostat: v2025.05.06

Support up to 8192 processors
Add cpuidle governor debug telemetry, disabled by default
Update default output to exclude cpuidle invocation counts
Bug fixes

Signed-off-by: Len Brown <len.brown@intel.com>
3 months agotools/power turbostat: disable "cpuidle" invocation counters, by default
Len Brown [Sun, 6 Apr 2025 18:29:57 +0000 (14:29 -0400)] 
tools/power turbostat: disable "cpuidle" invocation counters, by default

Create "pct_idle" counter group, the sofware notion of residency
so it can now be singled out, independent of other counter groups.

Create "cpuidle" group, the cpuidle invocation counts.
Disable "cpuidle", by default.

Create "swidle" = "cpuidle" + "pct_idle".
Undocument "sysfs", the old name for "swidle", but keep it working
for backwards compatibilty.

Create "hwidle", all the HW idle counters

Modify "idle", enabled by default
"idle" = "hwidle" + "pct_idle" (and now excludes "cpuidle")

Signed-off-by: Len Brown <len.brown@intel.com>
3 months agoMerge tag 'perf-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 6 Apr 2025 17:48:12 +0000 (10:48 -0700)] 
Merge tag 'perf-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf event fix from Ingo Molnar:
 "Fix a perf events time accounting bug"

* tag 'perf-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/core: Fix child_total_time_enabled accounting bug at task exit

3 months agoMerge tag 'sched-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 6 Apr 2025 17:44:58 +0000 (10:44 -0700)] 
Merge tag 'sched-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:

 - Fix a nonsensical Kconfig combination

 - Remove an unnecessary rseq-notification

* tag 'sched-urgent-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  rseq: Eliminate useless task_work on execve
  sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP

3 months agoDisable SLUB_TINY for build testing
Linus Torvalds [Sun, 6 Apr 2025 17:00:04 +0000 (10:00 -0700)] 
Disable SLUB_TINY for build testing

... and don't error out so hard on missing module descriptions.

Before commit 6c6c1fc09de3 ("modpost: require a MODULE_DESCRIPTION()")
we used to warn about missing module descriptions, but only when
building with extra warnigns (ie 'W=1').

After that commit the warning became an unconditional hard error.

And it turns out not all modules have been converted despite the claims
to the contrary.  As reported by Damian Tometzki, the slub KUnit test
didn't have a module description, and apparently nobody ever really
noticed.

The reason nobody noticed seems to be that the slub KUnit tests get
disabled by SLUB_TINY, which also ends up disabling a lot of other code,
both in tests and in slub itself.  And so anybody doing full build tests
didn't actually see this failre.

So let's disable SLUB_TINY for build-only tests, since it clearly ends
up limiting build coverage.  Also turn the missing module descriptions
error back into a warning, but let's keep it around for non-'W=1'
builds.

Reported-by: Damian Tometzki <damian@riscv-rocks.de>
Link: https://lore.kernel.org/all/01070196099fd059-e8463438-7b1b-4ec8-816d-173874be9966-000000@eu-central-1.amazonses.com/
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Fixes: 6c6c1fc09de3 ("modpost: require a MODULE_DESCRIPTION()")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agotools/power turbostat: re-factor sysfs code
Len Brown [Sun, 6 Apr 2025 16:53:18 +0000 (12:53 -0400)] 
tools/power turbostat: re-factor sysfs code

Probe cpuidle "sysfs" residency and counts separately,
since soon we will make one disabled on, and the
other disabled off.

Clarify that some BIC (build-in-counters) are actually "groups".
since we're about to re-name some of those groups.

no functional change.

Signed-off-by: Len Brown <len.brown@intel.com>
3 months agotools/power turbostat: Restore GFX sysfs fflush() call
Zhang Rui [Wed, 19 Mar 2025 00:53:07 +0000 (08:53 +0800)] 
tools/power turbostat: Restore GFX sysfs fflush() call

Do fflush() to discard the buffered data, before each read of the
graphics sysfs knobs.

Fixes: ba99a4fc8c24 ("tools/power turbostat: Remove unnecessary fflush() call")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
3 months agotools/power turbostat: Document GNR UncMHz domain convention
Len Brown [Sun, 6 Apr 2025 16:23:22 +0000 (12:23 -0400)] 
tools/power turbostat: Document GNR UncMHz domain convention

Document that on Intel Granite Rapids Systems,
Uncore domains 0-2 are CPU domains, and
uncore domains 3-4 are IO domains.

Signed-off-by: Len Brown <len.brown@intel.com>
3 months agotools/power turbostat: report CoreThr per measurement interval
Len Brown [Sun, 6 Apr 2025 15:18:39 +0000 (11:18 -0400)] 
tools/power turbostat: report CoreThr per measurement interval

The CoreThr column displays total thermal throttling events
since boot time.

Change it to report events during the measurement interval.

This is more useful for showing a user the current conditions.
Total events since boot time are still available to the user via
/sys/devices/system/cpu/cpu*/thermal_throttle/*

Document CoreThr on turbostat.8

Fixes: eae97e053fe30 ("turbostat: Support thermal throttle count print")
Reported-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Chen Yu <yu.c.chen@intel.com>
3 months agotools/power turbostat: Increase CPU_SUBSET_MAXCPUS to 8192
Justin Ernst [Wed, 19 Mar 2025 20:27:31 +0000 (15:27 -0500)] 
tools/power turbostat: Increase CPU_SUBSET_MAXCPUS to 8192

On systems with >= 1024 cpus (in my case 1152), turbostat fails with the error output:
"turbostat: /sys/fs/cgroup/cpuset.cpus.effective: cpu str malformat 0-1151"

A similar error appears with the use of turbostat --cpu when the inputted cpu
range contains a cpu number >= 1024:
# turbostat -c 1100-1151
"--cpu 1100-1151" malformed
...

Both errors are caused by parse_cpu_str() reaching its limit of CPU_SUBSET_MAXCPUS.

It's a good idea to limit the maximum cpu number being parsed, but 1024 is too low.
For a small increase in compute and allocated memory, increasing CPU_SUBSET_MAXCPUS
brings support for parsing cpu numbers >= 1024.

Increase CPU_SUBSET_MAXCPUS to 8192, a common setting for CONFIG_NR_CPUS on x86_64.

Signed-off-by: Justin Ernst <justin.ernst@hpe.com>
Signed-off-by: Len Brown <len.brown@intel.com>