Skip to content

x86/cpufeature: Cleanup stuff more

Borislav Petkov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86/cpufeature: Move some of the scattered feature bits to x86_capabilityarch/x86/include/asm/cpufeature.h arch/x86/kernel/cpu/common.c arch/x86/kernel/cpu/scattered.c+37 -420 replies
2/4x86/cpufeature: Cleanup get_cpu_cap()arch/x86/include/asm/cpufeature.h arch/x86/kernel/cpu/centaur.c arch/x86/kernel/cpu/common.c +1 more+45 -280 replies
3/4x86/cpufeature: Remove unused and seldomly used cpu_has_xx macrosarch/x86/crypto/chacha20_glue.c arch/x86/crypto/crc32c-intel_glue.c arch/x86/include/asm/cmpxchg_32.h +21 more+48 -683 replies
3/4x86/cpufeature: Remove unused and seldomly used cpu_has_xx macrosarch/x86/crypto/chacha20_glue.c arch/x86/crypto/crc32c-intel_glue.c arch/x86/include/asm/cmpxchg_32.h +21 more+48 -680 replies
4/4x86/cpu: Provide a config option to disable static_cpu_hasarch/x86/Kconfig arch/x86/include/asm/cpufeature.h+12 -12 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchJosh Triplett
1/4
2/4
3/4
3/4
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] x86/cpufeature: Cleanup stuff more

From: Borislav Petkov <[email protected]>

Hi all,

this is the second submission. Changes from the previous one is that we're much more considerate so that we don't enlarge kernel .text and cause tinyconfig growth. Patch 4 adds a default-off config option which disables static_cpu_has* macros from being built and saves us ~1.6K .text. 0day report for this is:

i386-tinyconfig vmlinux size:

+-------+------+------+-----+---------------------------------------------------------------------------------+
| TOTAL | TEXT | DATA | BSS |                                                                                 |
+-------+------+------+-----+---------------------------------------------------------------------------------+
| -1512 | -352 |    0 |   0 | df63d2e25f80 x86/cpu: Provide a config option to disable static_cpu_has         |
|    +5 |    0 |    0 |   0 | 8b9e9097bf18 Merge remote-tracking branch 'tip/x86/cleanups' into cpufeature-v3 |
| -1507 | -352 |    0 |   0 | ALL COMMITS                                                                     |
+-------+------+------+-----+---------------------------------------------------------------------------------+

The remaining cpu_has_xx uglies will be handled later, in a follow-up patchset.

Thanks.

Changelog:

v0:

so this should take care of cleaning up some aspects of our cpufeatures handling.

Patches should be pretty self-explanatory but let me send them out as an RFC - I might've missed something obvious of the sort "but but, you can't do that..."

Borislav Petkov (4):
x86/cpufeature: Move some of the scattered feature bits to
x86_capability
x86/cpufeature: Cleanup get_cpu_cap()
x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros x86/cpu: Provide a config option to disable static_cpu_has

 arch/x86/Kconfig                            |  11 +++
 arch/x86/crypto/chacha20_glue.c             |   2 +-
 arch/x86/crypto/crc32c-intel_glue.c         |   2 +-
 arch/x86/include/asm/cmpxchg_32.h           |   2 +-
 arch/x86/include/asm/cmpxchg_64.h           |   2 +-
 arch/x86/include/asm/cpufeature.h           | 115 ++++++++++++++--------------
 arch/x86/include/asm/xor_32.h               |   2 +-
 arch/x86/kernel/cpu/amd.c                   |   4 +-
 arch/x86/kernel/cpu/centaur.c               |   2 +-
 arch/x86/kernel/cpu/common.c                |  52 +++++++------
 arch/x86/kernel/cpu/intel.c                 |   3 +-
 arch/x86/kernel/cpu/intel_cacheinfo.c       |   6 +-
 arch/x86/kernel/cpu/mtrr/generic.c          |   2 +-
 arch/x86/kernel/cpu/mtrr/main.c             |   2 +-
 arch/x86/kernel/cpu/perf_event_amd.c        |   4 +-
 arch/x86/kernel/cpu/perf_event_amd_uncore.c |  11 +--
 arch/x86/kernel/cpu/scattered.c             |  20 -----
 arch/x86/kernel/cpu/transmeta.c             |   4 +-
 arch/x86/kernel/fpu/init.c                  |   4 +-
 arch/x86/kernel/hw_breakpoint.c             |   6 +-
 arch/x86/kernel/smpboot.c                   |   2 +-
 arch/x86/kernel/vm86_32.c                   |   4 +-
 arch/x86/mm/setup_nx.c                      |   4 +-
 drivers/char/hw_random/via-rng.c            |   5 +-
 drivers/crypto/padlock-aes.c                |   2 +-
 drivers/crypto/padlock-sha.c                |   2 +-
 drivers/iommu/intel_irq_remapping.c         |   2 +-
 fs/btrfs/disk-io.c                          |   2 +-
 28 files changed, 141 insertions(+), 138 deletions(-)
Signature · 1 line
2.3.5