diff options
author | Ahmed S. Darwish <darwi@linutronix.de> | 2025-03-24 14:33:14 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-03-25 10:23:00 +0100 |
commit | 543904cdfe1eb53ff4267f561a4d59cb1fe6ceb7 (patch) | |
tree | 505996c66574fb1adfc82941a16b8fcdfcdb4fb3 /scripts/lib/kdoc/kdoc_re.py | |
parent | e1e6b57146554a321d0ed1e76d2839ac24117f26 (diff) |
x86/cpu: Use enums for TLB descriptor types
The leaf 0x2 one-byte TLB descriptor types:
TLB_INST_4K
TLB_INST_4M
TLB_INST_2M_4M
...
are just discriminators to be used within the intel_tlb_table[] mapping.
Their specific values are irrelevant.
Use enums for such types.
Make the enum packed and static assert that its values remain within a
single byte so that the intel_tlb_table[] size do not go out of hand.
Use a __CHECKER__ guard for the static_assert(sizeof(enum) == 1) line as
sparse ignores the __packed annotation on enums.
This is similar to:
fe3944fb245a ("fs: Move enum rw_hint into a new header file")
for the core SCSI code.
Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/Z9rsTirs9lLfEPD9@lx-t490
Link: https://lore.kernel.org/r/20250324133324.23458-20-darwi@linutronix.de
Diffstat (limited to 'scripts/lib/kdoc/kdoc_re.py')
0 files changed, 0 insertions, 0 deletions