Skip to content

RFC x86/cpufeature: Cleanups and improvements

Borislav Petkov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5x86/cpufeature: Carve out X86_FEATURE_*Documentation/kernel-parameters.txt arch/x86/boot/cpuflags.h arch/x86/boot/mkcpustr.c +46 more+334 -3274 replies
2/5x86/cpufeature: Remove static_cpu_has()arch/x86/Kconfig.debug arch/x86/include/asm/cpufeature.h arch/x86/include/asm/fpu/internal.h +5 more+21 -1165 replies
3/5x86/cpufeature: Get rid of the non-asm goto variantarch/x86/include/asm/cpufeature.h+1 -371 reply
4/5x86/alternatives: Add an auxilary sectionarch/x86/kernel/vmlinux.lds.S+9 -03 replies
5/5x86/alternatives: Discard dynamic check after initarch/x86/include/asm/cpufeature.h arch/x86/kernel/cpu/common.c+11 -121 reply

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by.

PatchH. Peter Anvin
1/5
2/5
3/5Laughed-at-by
4/5
5/5

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

Read the v1 thread

Cover letter [RFC PATCH 0/5] x86/cpufeature: Cleanups and improvements

From: Borislav Petkov <[email protected]>

So here's the first version of what we talked about. I've ran randbuilds on it for a night because of patch 1 with all the header reorg and we all know how that can be painful. So this version passes all randbuild configs I had generated.

In talking about patch 1, it is a bit big but if you look at the diffstat, it basically is fixing a bunch of includes and the meat of it being the carving out of the X86_FEATURE_* things to a separate file.

Rest of the patches should be pretty self-explanatory, check the respective commit messages.

I haven't tested it functionally yet (booting in kvm doesn't really count) - thus the RFC tag. I thought I should send it out first so that people can doublecheck me on the direction this is going.

Thanks!

Borislav Petkov (4):
x86/cpufeature: Carve out X86_FEATURE_* x86/cpufeature: Remove static_cpu_has() x86/cpufeature: Get rid of the non-asm goto variant x86/alternatives: Add an auxilary section

Brian Gerst (1):
x86/alternatives: Discard dynamic check after init

 Documentation/kernel-parameters.txt      |   2 +-
 arch/x86/Kconfig.debug                   |  10 -
 arch/x86/boot/cpuflags.h                 |   2 +-
 arch/x86/boot/mkcpustr.c                 |   2 +-
 arch/x86/crypto/crc32-pclmul_glue.c      |   2 +-
 arch/x86/crypto/crc32c-intel_glue.c      |   2 +-
 arch/x86/crypto/crct10dif-pclmul_glue.c  |   2 +-
 arch/x86/entry/common.c                  |   1 +
 arch/x86/entry/entry_32.S                |   2 +-
 arch/x86/entry/vdso/vdso32-setup.c       |   1 -
 arch/x86/entry/vdso/vdso32/system_call.S |   2 +-
 arch/x86/entry/vdso/vma.c                |   1 +
 arch/x86/include/asm/alternative.h       |   6 -
 arch/x86/include/asm/apic.h              |   1 -
 arch/x86/include/asm/arch_hweight.h      |   2 +
 arch/x86/include/asm/cpufeature.h        | 431 ++-----------------------------
 arch/x86/include/asm/cpufeatures.h       | 287 ++++++++++++++++++++
 arch/x86/include/asm/fpu/internal.h      |  15 +-
 arch/x86/include/asm/irq_work.h          |   2 +-
 arch/x86/include/asm/mwait.h             |   2 +
 arch/x86/include/asm/processor.h         |   3 +-
 arch/x86/include/asm/smap.h              |   2 +-
 arch/x86/include/asm/smp.h               |   1 -
 arch/x86/include/asm/thread_info.h       |   2 +-
 arch/x86/include/asm/tlbflush.h          |   1 +
 arch/x86/include/asm/uaccess_64.h        |   2 +-
 arch/x86/kernel/apic/apic_numachip.c     |   4 +-
 arch/x86/kernel/cpu/Makefile             |   2 +-
 arch/x86/kernel/cpu/centaur.c            |   2 +-
 arch/x86/kernel/cpu/common.c             |   6 -
 arch/x86/kernel/cpu/cyrix.c              |   1 +
 arch/x86/kernel/cpu/intel.c              |   2 +-
 arch/x86/kernel/cpu/intel_cacheinfo.c    |   2 +-
 arch/x86/kernel/cpu/match.c              |   2 +-
 arch/x86/kernel/cpu/mkcapflags.sh        |   6 +-
 arch/x86/kernel/cpu/mtrr/main.c          |   2 +-
 arch/x86/kernel/cpu/transmeta.c          |   2 +-
 arch/x86/kernel/e820.c                   |   1 +
 arch/x86/kernel/head_32.S                |   2 +-
 arch/x86/kernel/hpet.c                   |   1 +
 arch/x86/kernel/msr.c                    |   2 +-
 arch/x86/kernel/verify_cpu.S             |   2 +-
 arch/x86/kernel/vm86_32.c                |   2 +-
 arch/x86/kernel/vmlinux.lds.S            |   9 +
 arch/x86/lib/clear_page_64.S             |   2 +-
 arch/x86/lib/copy_page_64.S              |   2 +-
 arch/x86/lib/copy_user_64.S              |   2 +-
 arch/x86/lib/memcpy_64.S                 |   2 +-
 arch/x86/lib/memmove_64.S                |   2 +-
 arch/x86/lib/memset_64.S                 |   2 +-
 arch/x86/mm/setup_nx.c                   |   1 +
 arch/x86/oprofile/op_model_amd.c         |   1 -
 arch/x86/um/asm/barrier.h                |   2 +-
 drivers/cpufreq/intel_pstate.c           |   2 +-
 fs/btrfs/disk-io.c                       |   2 +-
 lib/atomic64_test.c                      |   2 +-
 56 files changed, 371 insertions(+), 487 deletions(-)
 create mode 100644 arch/x86/include/asm/cpufeatures.h
Signature · 1 line
2.3.5