diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2025-02-07 15:48:56 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2025-03-04 17:18:05 +0100 |
commit | b7e81efc2436c553ca29eae5f069480de3d9f975 (patch) | |
tree | 26b31206db6b9854df1c06a76d75f055d0d517d4 /scripts/lib/kdoc/kdoc_output.py | |
parent | 949b73c9902613bddb789d9375981afbffe596fc (diff) |
s390: Static branches for machine features infrastructure
Provide infrastructure which allows to generate machine_has_<feature>()
functions, which are replacing the existing MACHINE_HAS_<feature> macros.
Such function usages generate a static branch depending on <feature>. The
static branch is patched using an alternative.
Each <feature> correlates with a bit set in the machine_features bit
field. If the corresponding bit is set, the branch will be patched. In
order to have any effect on branch patching feature bits must be set with
set_machine_features() in the decompressor before alternatives patching of
the kernel image.
It is possible to use clear_machine_feature() and test_machine_feature()
for machine features which cannot be completely detected within the
decompressor, e.g. if common code command line parameters allow to enable
or disable certain features. In such cases test_machine_feature() instead
of machine_has_feature() must be used within the kernel. This results in a
runtime check and not a static branch.
Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_output.py')
0 files changed, 0 insertions, 0 deletions