Convert internal cross-references in "Putting Your Stuff in the kernel"
section from inline code to internal links.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251223035254.22894-4-bagasdotme@gmail.com>
Do not italicize EXPORT_SYMBOL() and EXPORT_SYMBOL_GPL() references in
EXPORT_SYMBOL_NS() and EXPORT_SYMBOL_NS_GPL() subsections.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251223035254.22894-3-bagasdotme@gmail.com>
Add guidance for AI assistants and developers using AI tools for kernel
contributions, per the consensus reached at the 2025 Maintainers Summit.
Create Documentation/process/coding-assistants.rst with detailed guidance
on licensing, Signed-off-by requirements, and attribution format. The
README points AI tools to this documentation.
This will allow coding assistants to easily parse these instructions and
comply with guidelines set by the community.
Link: https://lwn.net/Articles/1049830/
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251223122110.2496946-1-sashal@kernel.org>
The memory-barriers.txt Korean translation is quite outdated. The last
update on the translation was made on 2022-10-10, by commit ee5a86f451
("docs/memory-barriers.txt/kokr: Fix confusing name of 'data dependency
barrier'"). After the date, the original memory-barriers.txt got seven
more changes so far. The most recent one was made on 2025-11-05. But
none of those are applied to the translation.
Maybe I can work again on keeping it updated. But, given the
advancement of translation tools, I think it might not be worth keeping
it at all. Remove the outdated translation.
If it turns out to be worthy to keep the translation and someone willing
to keep it updated steps up, this could be reverted.
This change was inspired from the last kernel summit discussion [1].
[1] https://lpc.events/event/19/contributions/2259/
Cc: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: SeongJae Park <sj@kernel.org>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251225014027.15948-1-sj@kernel.org>
For review of patches that revisioned multiple times, patch changelogs
are very useful. Adding actual links to the previous versions can
further help the review. Using such links, reviewers can double check
the changelog by themselves, and find previous discussions. Nowadays
having such links (e.g., lore.kernel.org archive links) is easy and
reliable. Suggest adding such links if available.
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251225015447.16387-1-sj@kernel.org>
The documentation states that:
make W=n
can be used to verify the documentation format. This is true for .c
files but not for headers [1].
Modify the documentation to specify that headers files are not covered
by make W=n and that these need to be checked separately with
scripts/kernel-doc.
[1] commit 3a025e1d1c ("Add optional check for bad kernel-doc comments")
Link: https://git.kernel.org/torvalds/c/3a025e1d1c2e
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251225-doc-format-check-v1-1-dff637a4d275@kernel.org>
Fixed capitalization and punctuation in process documentation.
Signed-off-by: Volodymyr Kot <volodymyr.kot.ua@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251225133911.87512-1-volodymyr.kot.ua@gmail.com>
While reading the git-format-patch manpages [1], I discovered the existence
of the "Toggle Line Wrap" extension for Thunderbird which I found rather
convenient.
Looking at the history, the ancestor of this extension was added to the
documentation in commit e0e34e977a ("Documentation/email-clients.txt:
update Thunderbird docs with wordwrap plugin") but then removed in commit
f9a0974d3f ("Documentation: update thunderbird email client settings").
Extend the paragraph on Thunderbird's mailnews.wraplength register to
mention the existence of the "Toggle Line Wrap" extension. The goal is not
to create a war on what is the best option so make it clear that this is
just an alternative.
[1] man git-format-patch -- §Thunderbird
Link: https://git-scm.com/docs/git-format-patch#_thunderbird
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Acked-by: Sotir Danailov <sndanailov@gmail.com> # As past commit author
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251226-docs_thunderbird-toggle-line-wrap-v2-1-aebb8c60025d@kernel.org>
When using `make help`, SPHINXDIR doesn't wrap around 80 characters,
causing text to overflow or wrap in incorrect ways,
which then makes the text difficult to read
Signed-off-by: Mustafa Elrasheid <mustafaelrasheid@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251227125244.6407-1-mustafaelrasheid@gmail.com>
The recent move of this script from scripts/ to tools/docs/
did not account for the 'cd' directory usage.
Update "cd .." to "cd ../.." to make the script self-correcting.
This also eliminates a shell warning:
./tools/docs/find-unused-docs.sh: line 33: cd: Documentation/: No such file or directory
Fixes: 184414c6a6 ("docs: move find-unused-docs.sh to tools/docs")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: 184414c6a6 (docs: move find-unused-docs.sh to tools/docs)
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260102200657.1040234-1-rdunlap@infradead.org>
The current Japanese translation incorrectly implies that the kernel is
independent of the C language.
Translate "freestanding C environment" accurately.
Signed-off-by: Masaharu Noguchi <nogunix@gmail.com>
Reviewed-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260104-ja-howto-v2-2-8cac525b3dfe@gmail.com>
Fix obvious typos and duplicated phrases in the Japanese translation.
No change in meaning intended.
Acked-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Masaharu Noguchi <nogunix@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260104-ja-howto-v2-1-8cac525b3dfe@gmail.com>
Commit f51fe3b7e4 ("Documentation: Add real-time to core-api") adds new
documentation on real-time support, i.e., PREEMPT_RT. So, add a file entry
for that directory to the corresponding section in MAINTAINERS.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251127154343.292156-4-bigeasy@linutronix.de>
Commit 4843a45ef9fe8 ("entry: Rename "kvm" entry code assets to "virt"
to genericize APIs") renames the config KVM_XFER_TO_GUEST_WORK to
VIRT_XFER_TO_GUEST_WORK.
Adjust the documentation to the current situation, and specifically
refer to the new name of the config.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251127154343.292156-3-bigeasy@linutronix.de>
Some thoughts on hardware that is used for real-time workload. Certainly
not complete but should cover some of the import topics such as:
- Main memory, caches and the possiblie control given by the hardware.
- What could happen by putting critical hardware behind USB or VirtIO.
- Allowing real-time tasks to consume the CPU entirely without giving
the system some time to breath.
- Networking with what the kernel provides.
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251127154343.292156-2-bigeasy@linutronix.de>
As the trend of AI-generated reports is growing, the trend of unreadable
reports in gimmicky formats is following, and we cannot request that
developers rely on online viewers to be able to read a security report
full for formatting tags. Let's just insist on the plain text requirement
a bit more.
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251129141741.19046-1-w@1wt.eu>
"listed in MAINTAINERS" is not enough to qualify for the free Nitrokey
Start. You have to be listed in an M: entry. Mention that to reduce
confusion for reviewers who wonder why their application fails.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251203074349.1826233-2-u.kleine-koenig@baylibre.com>
When the optional .flush() method was added to the mbox_chan structure,
the documentation was not updated.
Fixes: a8803d7421 ("mailbox: Support blocking transfers in atomic context")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <6a50a5d4f0d0da26e5cccf348550879e53792e6e.1764861174.git.geert+renesas@glider.be>
Update the device tree binding reference from .txt to YAML.
Binding was converted in commit 20b3c9a403 ("dt-bindings: arm: Convert ti,keystone to DT schema")
and moved to Documentation/devicetree/bindings/arm/ti/ti,keystone.yaml.
Signed-off-by: Shubham Sharma <slopixelz@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251207195632.68681-1-slopixelz@gmail.com>
The clang-format documentation contains a minor spelling issue where
"intended" is used instead of "indented" when describing deeply nested
code. This patch corrects the typo to improve the clarity and consistency.
Signed-off-by: Addison English <addison.englishw@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251208065136.9092-1-addison.englishw@gmail.com>
Inline kernel-doc blocks failed to parse tags containing dots (e.g.
creator.process_name in panfrost_gem.h) because the @name regex only
matched word characters. Modify the single-line pattern to match
doc_inline_sect so it includes \. and parses the same as a multi-line
comment.
Signed-off-by: Steven Price <steven.price@arm.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251211104851.45330-1-steven.price@arm.com>
For several years, and still ongoing, the kernel.h is being split
to smaller and narrow headers to avoid "including everything" approach
which is bad in many ways. Since that, documentation missed a few
required updates to align with that work. Do it here.
Note, language translations are left untouched and if anybody willing
to help, please provide path(es) based on the updated English variant.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251126214709.2322314-1-andriy.shevchenko@linux.intel.com>
Mauro says:
As suggested and discussed with Randy, this small series add support
for documenting variables using kernel-doc.
- patch 1: add support for the new feature;
- patch 2: extends to support DEFINE_*;
- patch 3: document two media vars;
- patch 4: fix an issue on kernel-doc.rst markups and automarkup;
- patch 5: document it;
- patch 6: better handle DEFINE_ macros when they don't have static/type;
Since version 5, I'm using "c:macro" to describe variables, as it
avoids Sphinx C domain to try parse the variable. This makes it more
flexible and easier to maintain in long term.
Currently, the logic for vars require a
type DEFINE_foo();
where type is usually "static".
Make the logic more generic.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Closes: https://lore.kernel.org/linux-doc/e1dad7e4-a0ca-4be6-a33c-97b75175c12f@infradead.org/
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <be16e087cbc065fbd041fb6d6f8fa5cf0426cca5.1765894964.git.mchehab+huawei@kernel.org>
Add a description containing the new syntax to document
variables within kernel-doc markups.
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <aa0e3abcd6882a62f3ab9c34033c60fca1c44604.1765894964.git.mchehab+huawei@kernel.org>
This document contains several words that tricks automarkup.
Ensure that all of them will be inside a ``const`` markup,
avoiding automarkup to touch them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <a6adfa3d775c1dccc9f80a7b82be003cbc0051d2.1765894964.git.mchehab+huawei@kernel.org>
The media kAPI has two global variables at v4l2-ioctl.h. Document
them.
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <8ebe25ff579962fec09b586f00e77fae7802985f.1765894964.git.mchehab+huawei@kernel.org>
Improve the parser and output plugin to work with macros,
adding support for the common pattern of using DEFINE_*
to create variables.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <757a45100cfc493984574ff780aa9d90506eecb4.1765894964.git.mchehab+huawei@kernel.org>
Specially on kAPI, sometimes it is desirable to be able to
describe global variables that are part of kAPI.
Documenting vars with Sphinx is simple, as we don't need
to parse a data struct. All we need is the variable
declaration and use native C domain ::c:var: to format it
for us.
Add support for it.
Link: https://lore.kernel.org/linux-doc/491c3022-cef8-4860-a945-c9c4a3b63c09@infradead.org/T/#m947c25d95cb1d96a394410ab1131dc8e9e5013f1
Suggested-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <fa7d1c61a8de9150f71b318382f1507d3b13848d.1765894964.git.mchehab+huawei@kernel.org>
The comma is wrong, remove it.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251219171827.44015-2-thorsten.blum@linux.dev>
The correct command to generate header files is
make headers_install.
Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251220125434.2430-1-cp0613@linux.alibaba.com>
These patches fix a typo and make the coccicheck script more robust by
ensuring that only compatible semantic patches are executed for the
chosen mode.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEnGZC8gbRfLXdcpA0F+92B3f5RZ0FAmlIV1kACgkQF+92B3f5
RZ2G3Q//ThX4NnrrgY+HINCGboH4RG5sCGZs0IM3+gkPFLlJ4X6FbWq5xQXVk+yd
eS7FegsHFK4V7sM+mf5ruVwJg2cBPX2OuZtC8UsEeAvMgW93ng5i4/KeFDGD03+/
95zcSKiUN1zlvevsz+Rwz9aaSojMQJ7q3T8eoo7F4hzLbnyn/Qm60ztgPaE+Jtsk
/imMPzQdomU31wIfat+VGuMSr65be/m8TASCe7bT9aFJ2g/qDzBj/lD9SWipMV4L
UHj/ZKn3L3LeaW9C50oKsENkfJygMJWeIcRMk0PLexU4EpQ6xsixcyfvlso/NRXG
Bbyrpf9ZRwJ71CnvEjBnxL/wpJ8adbGdZxZZ5XZE4nnWtPY1Qv+aREZYf9Ww9LPT
DFdmf8utfo8ZBHuT71rtCke/TFMFKivYOEWxjRL1ULNH0l+Eb+/lo2fJe9VdAIlA
elVlmU/DIFhQP+xCzwLfAMxcJAcpC30If7NlSjnHmRFgTy54LSQXWi5QhAR7AEad
RgM2Ig6aE3oJjwih0vw3uOJlIsvJEioo+zAPcu47dGYG7eBFPWTxT3l4bs11iG0d
ijtGrhaL1g1TEAgEzc6QNwQp23Jfy4NOPtTwndQLRPw84kklGgv8t10ejZjCSTg5
kBZ6i84reuV1fDMJzi7fu69nCHqIXDt4ylBbR9zN9nVR5JaCcis=
=nbVj
-----END PGP SIGNATURE-----
Merge tag 'coccinelle-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux
Pull Coccinelle fixes from Julia Lawall:
"These fix a typo and make the coccicheck script more robust by
ensuring that only compatible semantic patches are executed for the
chosen mode"
* tag 'coccinelle-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
Coccinelle: pm_runtime: Fix typo in report message
scripts: coccicheck: filter *.cocci files by MODE
- a quirk for i8042 to better handle another TUXEDO model
- a quirk to atkbd to handle incorcet behavior of HONOR FMB-P internal
keyboard
- a definition for a new ABS_SND_PROFILE event
- fixes to alps and lkkbd drivers to reliably shut down pending work on
removal
- a fix to apple_z2 driver tightening input report parsing
- a fix for "off-by-one" error when validating config in ti_am335x_tsc
driver
- addition of CRKD Guitars device IDs to xpad driver.
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCaUeyQQAKCRBAj56VGEWX
nDlZAQCLkGoaHMX6i6Wi2iQIKexRxlERp386vaa2nA4/La3L2wEA1Ce01Ve72v+k
JyVplQCihOzAxDZ8+c2dGtLSwqR8fQY=
=ycHD
-----END PGP SIGNATURE-----
Merge tag 'input-for-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov:
- a quirk for i8042 to better handle another TUXEDO model
- a quirk to atkbd to handle incorcet behavior of HONOR FMB-P internal
keyboard
- a definition for a new ABS_SND_PROFILE event
- fixes to alps and lkkbd drivers to reliably shut down pending work on
removal
- a fix to apple_z2 driver tightening input report parsing
- a fix for "off-by-one" error when validating config in ti_am335x_tsc
driver
- addition of CRKD Guitars device IDs to xpad driver.
* tag 'input-for-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: ti_am335x_tsc - fix off-by-one error in wire_order validation
Input: xpad - add support for CRKD Guitars
Input: add ABS_SND_PROFILE
Input: apple_z2 - fix reading incorrect reports after exiting sleep
Input: alps - fix use-after-free bugs caused by dev3_register_work
Input: i8042 - add TUXEDO InfinityBook Max Gen10 AMD to i8042 quirk table
Input: atkbd - skip deactivate for HONOR FMB-P's internal keyboard
Input: lkkbd - disable pending work before freeing device
Enhance the coccicheck script to filter *.cocci files based on the
specified MODE (e.g., report, patch). This ensures that only compatible
semantic patch files are executed, preventing errors such as:
"virtual rule report not supported"
This error occurs when a .cocci file does not define a 'virtual <MODE>'
rule, yet is executed in that mode.
For example:
make coccicheck M=drivers/hwtracing/coresight/ MODE=report
In this case, running "secs_to_jiffies.cocci" would trigger the error
because it lacks support for 'report' mode. With this change, such files
are skipped automatically, improving robustness and developer
experience.
Signed-off-by: Songwei Chai <quic_songchai@quicinc.com>
Reviewed-by: Julia Lawall <Julia.Lawall@inria.fr>
- Disable link power management (LPM) for a Seagate drive that is
misbehaving when LPM is enabled.
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQSRPv8tYSvhwAzJdzjdoc3SxdoYdgUCaUeWYwAKCRDdoc3SxdoY
dv/eAQDWzCSlh1Uwa/my/6UeClabi1qT+ZD4vRWK63VK6QUz1QEA9PPORx3CmdLm
2vqlHfpOa4vVYL2dhU/6kwrQBIjFSAY=
=BNcu
-----END PGP SIGNATURE-----
Merge tag 'ata-6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux
Pull ata fix from Damien Le Moal:
- Disable link power management (LPM) for a Seagate drive that is
misbehaving when LPM is enabled
* tag 'ata-6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
ata: libata-core: Disable LPM on ST2000DM008-2FR102
A small collection of fixes for various SPI drivers, plus a relaxation
of constraints in the DT for the DesignWare controller to reflect
hardware that's been seen. There's several fixes for the Cadence
QuadSPI driver since a fix during the last release made some existing
issues with error handling during probe more readily visible.
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmlHKdAACgkQJNaLcl1U
h9BgFwf/e3SwBKZlv+S7Wf3W6vM+7nd60eBGyQ5GL6jfq/w7hToVsJGH/h/XxOzS
0Vwtf2lEIwKz520UO+nyezOafL4LFsVcynnAvr6RtZrEuQv8vtRfi8oGEuioctTC
WruBQtO61q327IaTkJlT6pS0/U2FW1E00rzGCBjBLiZVQBSpGSbnRDqYUq2aw5Sx
gavOEanDIR7hcGk2GO9CJdG69Vg0ql8Zt3bgTbAiTthj8pkwi4n+Omk3Hffc07Ts
qMgSco+8Uc5j1U4q/qoxrok096Uy7mwOx7wIbHeYUhZscjNecCiw/2MTPKgs11AT
eAZ2m8uroPa/keA92Ni37GchvViwcA==
=rBj5
-----END PGP SIGNATURE-----
Merge tag 'spi-fix-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fixes from Mark Brown:
"A small collection of fixes for various SPI drivers, plus a relaxation
of constraints in the DT for the DesignWare controller to reflect
hardware that's been seen.
There's several fixes for the Cadence QuadSPI driver since a fix
during the last release made some existing issues with error handling
during probe more readily visible"
* tag 'spi-fix-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: mt65xx: Use IRQF_ONESHOT with threaded IRQ
spi: dt-bindings: snps,dw-abp-ssi: Allow up to 16 chip-selects
spi: cadence-quadspi: Fix clock disable on probe failure path
spi: cadence-quadspi: Add error logging for DMA request failure
spi: fsl-cpm: Check length parity before switching to 16 bit mode
spi: mpfs: Fix an error handling path in mpfs_spi_probe()
clang is generating very inefficient code for native_save_fl() which is
used for local_irq_save() in critical spots.
Allowing the "pop %0" to use memory:
1) forces the compiler to add annoying stack canaries when
CONFIG_STACKPROTECTOR_STRONG=y in many places.
2) Almost always is followed by an immediate "move memory,register"
One good example is _raw_spin_lock_irqsave, with 8 extra instructions
ffffffff82067a30 <_raw_spin_lock_irqsave>:
ffffffff82067a30: ...
ffffffff82067a39: 53 push %rbx
// Three instructions to ajust the stack, read the per-cpu canary
// and copy it to 8(%rsp)
ffffffff82067a3a: 48 83 ec 10 sub $0x10,%rsp
ffffffff82067a3e: 65 48 8b 05 da 15 45 02 mov %gs:0x24515da(%rip),%rax # <__stack_chk_guard>
ffffffff82067a46: 48 89 44 24 08 mov %rax,0x8(%rsp)
ffffffff82067a4b: 9c pushf
// instead of pop %rbx, compiler uses 2 instructions.
ffffffff82067a4c: 8f 04 24 pop (%rsp)
ffffffff82067a4f: 48 8b 1c 24 mov (%rsp),%rbx
ffffffff82067a53: fa cli
ffffffff82067a54: b9 01 00 00 00 mov $0x1,%ecx
ffffffff82067a59: 31 c0 xor %eax,%eax
ffffffff82067a5b: f0 0f b1 0f lock cmpxchg %ecx,(%rdi)
ffffffff82067a5f: 75 1d jne ffffffff82067a7e <_raw_spin_lock_irqsave+0x4e>
// three instructions to check the stack canary
ffffffff82067a61: 65 48 8b 05 b7 15 45 02 mov %gs:0x24515b7(%rip),%rax # <__stack_chk_guard>
ffffffff82067a69: 48 3b 44 24 08 cmp 0x8(%rsp),%rax
ffffffff82067a6e: 75 17 jne ffffffff82067a87
...
// One extra instruction to adjust the stack.
ffffffff82067a73: 48 83 c4 10 add $0x10,%rsp
...
// One more instruction in case the stack was mangled.
ffffffff82067a87: e8 a4 35 ff ff call ffffffff8205b030 <__stack_chk_fail>
This patch changes nothing for gcc, but for clang saves ~20000 bytes of text
even though more functions are inlined.
$ size vmlinux.gcc.before vmlinux.gcc.after vmlinux.clang.before vmlinux.clang.after
text data bss dec hex filename
45565821 25005462 4704800 75276083 47c9f33 vmlinux.gcc.before
45565821 25005462 4704800 75276083 47c9f33 vmlinux.gcc.after
45121072 24638617 5533040 75292729 47ce039 vmlinux.clang.before
45093887 24638633 5536808 75269328 47c84d0 vmlinux.clang.after
$ scripts/bloat-o-meter -t vmlinux.clang.before vmlinux.clang.after
add/remove: 1/2 grow/shrink: 21/533 up/down: 2250/-22112 (-19862)
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Work around clang problems with "=rm" asm constraint.
clang seems to always chose the memory output, while it is almost
always the worst choice.
Add ASM_OUTPUT_RM so that we can replace "=rm" constraint
where it matters for clang, while not penalizing gcc.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Suggested-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>