Skip to content

Commit a925128

Browse files
committed
Merge tag 'x86-cleanups-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cleanups from Thomas Gleixner: "A set of small x86 cleanups: - Remove unused headers in the IDT code - Kconfig indendation and comment fixes - Fix all 'the the' typos in one go instead of waiting for bots to fix one at a time" * tag 'x86-cleanups-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Fix all occurences of the "the the" typo x86/idt: Remove unused headers x86/Kconfig: Fix indentation of arch/x86/Kconfig.debug x86/Kconfig: Fix indentation and add endif comments to arch/x86/Kconfig
2 parents 1fd9f4c + f708183 commit a925128

File tree

5 files changed

+66
-71
lines changed

5 files changed

+66
-71
lines changed

arch/x86/Kconfig

Lines changed: 49 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ config FORCE_DYNAMIC_FTRACE
4141
depends on FUNCTION_TRACER
4242
select DYNAMIC_FTRACE
4343
help
44-
We keep the static function tracing (!DYNAMIC_FTRACE) around
45-
in order to test the non static function tracing in the
46-
generic code, as other architectures still use it. But we
47-
only need to keep it around for x86_64. No need to keep it
48-
for x86_32. For x86_32, force DYNAMIC_FTRACE.
44+
We keep the static function tracing (!DYNAMIC_FTRACE) around
45+
in order to test the non static function tracing in the
46+
generic code, as other architectures still use it. But we
47+
only need to keep it around for x86_64. No need to keep it
48+
for x86_32. For x86_32, force DYNAMIC_FTRACE.
4949
#
5050
# Arch settings
5151
#
@@ -394,9 +394,9 @@ config CC_HAS_SANE_STACKPROTECTOR
394394
default $(success,$(srctree)/scripts/gcc-x86_64-has-stack-protector.sh $(CC)) if 64BIT
395395
default $(success,$(srctree)/scripts/gcc-x86_32-has-stack-protector.sh $(CC))
396396
help
397-
We have to make sure stack protector is unconditionally disabled if
398-
the compiler produces broken code or if it does not let us control
399-
the segment on 32-bit kernels.
397+
We have to make sure stack protector is unconditionally disabled if
398+
the compiler produces broken code or if it does not let us control
399+
the segment on 32-bit kernels.
400400

401401
menu "Processor type and features"
402402

@@ -532,7 +532,7 @@ config X86_EXTENDED_PLATFORM
532532

533533
If you have one of these systems, or if you want to build a
534534
generic distribution kernel, say Y here - otherwise say N.
535-
endif
535+
endif # X86_32
536536

537537
if X86_64
538538
config X86_EXTENDED_PLATFORM
@@ -551,7 +551,7 @@ config X86_EXTENDED_PLATFORM
551551

552552
If you have one of these systems, or if you want to build a
553553
generic distribution kernel, say Y here - otherwise say N.
554-
endif
554+
endif # X86_64
555555
# This is an alphabetically sorted list of 64 bit extended platforms
556556
# Please maintain the alphabetic order if and when there are additions
557557
config X86_NUMACHIP
@@ -599,9 +599,9 @@ config X86_GOLDFISH
599599
bool "Goldfish (Virtual Platform)"
600600
depends on X86_EXTENDED_PLATFORM
601601
help
602-
Enable support for the Goldfish virtual platform used primarily
603-
for Android development. Unless you are building for the Android
604-
Goldfish emulator say N here.
602+
Enable support for the Goldfish virtual platform used primarily
603+
for Android development. Unless you are building for the Android
604+
Goldfish emulator say N here.
605605

606606
config X86_INTEL_CE
607607
bool "CE4100 TV platform"
@@ -900,7 +900,7 @@ config INTEL_TDX_GUEST
900900
memory contents and CPU state. TDX guests are protected from
901901
some attacks from the VMM.
902902

903-
endif #HYPERVISOR_GUEST
903+
endif # HYPERVISOR_GUEST
904904

905905
source "arch/x86/Kconfig.cpu"
906906

@@ -1167,16 +1167,16 @@ config X86_MCE_INTEL
11671167
prompt "Intel MCE features"
11681168
depends on X86_MCE && X86_LOCAL_APIC
11691169
help
1170-
Additional support for intel specific MCE features such as
1171-
the thermal monitor.
1170+
Additional support for intel specific MCE features such as
1171+
the thermal monitor.
11721172

11731173
config X86_MCE_AMD
11741174
def_bool y
11751175
prompt "AMD MCE features"
11761176
depends on X86_MCE && X86_LOCAL_APIC && AMD_NB
11771177
help
1178-
Additional support for AMD specific MCE features such as
1179-
the DRAM Error Threshold.
1178+
Additional support for AMD specific MCE features such as
1179+
the DRAM Error Threshold.
11801180

11811181
config X86_ANCIENT_MCE
11821182
bool "Support for old Pentium 5 / WinChip machine checks"
@@ -1254,18 +1254,18 @@ config X86_VSYSCALL_EMULATION
12541254
default y
12551255
depends on X86_64
12561256
help
1257-
This enables emulation of the legacy vsyscall page. Disabling
1258-
it is roughly equivalent to booting with vsyscall=none, except
1259-
that it will also disable the helpful warning if a program
1260-
tries to use a vsyscall. With this option set to N, offending
1261-
programs will just segfault, citing addresses of the form
1262-
0xffffffffff600?00.
1257+
This enables emulation of the legacy vsyscall page. Disabling
1258+
it is roughly equivalent to booting with vsyscall=none, except
1259+
that it will also disable the helpful warning if a program
1260+
tries to use a vsyscall. With this option set to N, offending
1261+
programs will just segfault, citing addresses of the form
1262+
0xffffffffff600?00.
12631263

1264-
This option is required by many programs built before 2013, and
1265-
care should be used even with newer programs if set to N.
1264+
This option is required by many programs built before 2013, and
1265+
care should be used even with newer programs if set to N.
12661266

1267-
Disabling this option saves about 7K of kernel size and
1268-
possibly 4K of additional runtime pagetable memory.
1267+
Disabling this option saves about 7K of kernel size and
1268+
possibly 4K of additional runtime pagetable memory.
12691269

12701270
config X86_IOPL_IOPERM
12711271
bool "IOPERM and IOPL Emulation"
@@ -2002,15 +2002,15 @@ config EFI_MIXED
20022002
bool "EFI mixed-mode support"
20032003
depends on EFI_STUB && X86_64
20042004
help
2005-
Enabling this feature allows a 64-bit kernel to be booted
2006-
on a 32-bit firmware, provided that your CPU supports 64-bit
2007-
mode.
2005+
Enabling this feature allows a 64-bit kernel to be booted
2006+
on a 32-bit firmware, provided that your CPU supports 64-bit
2007+
mode.
20082008

2009-
Note that it is not possible to boot a mixed-mode enabled
2010-
kernel via the EFI boot stub - a bootloader that supports
2011-
the EFI handover protocol must be used.
2009+
Note that it is not possible to boot a mixed-mode enabled
2010+
kernel via the EFI boot stub - a bootloader that supports
2011+
the EFI handover protocol must be used.
20122012

2013-
If unsure, say N.
2013+
If unsure, say N.
20142014

20152015
source "kernel/Kconfig.hz"
20162016

@@ -2235,16 +2235,16 @@ config RANDOMIZE_MEMORY
22352235
select DYNAMIC_MEMORY_LAYOUT
22362236
default RANDOMIZE_BASE
22372237
help
2238-
Randomizes the base virtual address of kernel memory sections
2239-
(physical memory mapping, vmalloc & vmemmap). This security feature
2240-
makes exploits relying on predictable memory locations less reliable.
2238+
Randomizes the base virtual address of kernel memory sections
2239+
(physical memory mapping, vmalloc & vmemmap). This security feature
2240+
makes exploits relying on predictable memory locations less reliable.
22412241

2242-
The order of allocations remains unchanged. Entropy is generated in
2243-
the same way as RANDOMIZE_BASE. Current implementation in the optimal
2244-
configuration have in average 30,000 different possible virtual
2245-
addresses for each memory section.
2242+
The order of allocations remains unchanged. Entropy is generated in
2243+
the same way as RANDOMIZE_BASE. Current implementation in the optimal
2244+
configuration have in average 30,000 different possible virtual
2245+
addresses for each memory section.
22462246

2247-
If unsure, say Y.
2247+
If unsure, say Y.
22482248

22492249
config RANDOMIZE_MEMORY_PHYSICAL_PADDING
22502250
hex "Physical memory mapping padding" if EXPERT
@@ -2254,12 +2254,12 @@ config RANDOMIZE_MEMORY_PHYSICAL_PADDING
22542254
range 0x1 0x40 if MEMORY_HOTPLUG
22552255
range 0x0 0x40
22562256
help
2257-
Define the padding in terabytes added to the existing physical
2258-
memory size during kernel memory randomization. It is useful
2259-
for memory hotplug support but reduces the entropy available for
2260-
address randomization.
2257+
Define the padding in terabytes added to the existing physical
2258+
memory size during kernel memory randomization. It is useful
2259+
for memory hotplug support but reduces the entropy available for
2260+
address randomization.
22612261

2262-
If unsure, leave at the default value.
2262+
If unsure, leave at the default value.
22632263

22642264
config HOTPLUG_CPU
22652265
def_bool y
@@ -2606,7 +2606,6 @@ source "drivers/idle/Kconfig"
26062606

26072607
endmenu
26082608

2609-
26102609
menu "Bus options (PCI etc.)"
26112610

26122611
choice
@@ -2830,7 +2829,6 @@ config AMD_NB
28302829

28312830
endmenu
28322831

2833-
28342832
menu "Binary Emulations"
28352833

28362834
config IA32_EMULATION
@@ -2868,14 +2866,12 @@ config COMPAT
28682866
def_bool y
28692867
depends on IA32_EMULATION || X86_X32_ABI
28702868

2871-
if COMPAT
28722869
config COMPAT_FOR_U64_ALIGNMENT
28732870
def_bool y
2874-
endif
2871+
depends on COMPAT
28752872

28762873
endmenu
28772874

2878-
28792875
config HAVE_ATOMIC_IOMAP
28802876
def_bool y
28812877
depends on X86_32

arch/x86/Kconfig.debug

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,19 @@ config DEBUG_TLBFLUSH
7373
bool "Set upper limit of TLB entries to flush one-by-one"
7474
depends on DEBUG_KERNEL
7575
help
76+
X86-only for now.
7677

77-
X86-only for now.
78+
This option allows the user to tune the amount of TLB entries the
79+
kernel flushes one-by-one instead of doing a full TLB flush. In
80+
certain situations, the former is cheaper. This is controlled by the
81+
tlb_flushall_shift knob under /sys/kernel/debug/x86. If you set it
82+
to -1, the code flushes the whole TLB unconditionally. Otherwise,
83+
for positive values of it, the kernel will use single TLB entry
84+
invalidating instructions according to the following formula:
7885

79-
This option allows the user to tune the amount of TLB entries the
80-
kernel flushes one-by-one instead of doing a full TLB flush. In
81-
certain situations, the former is cheaper. This is controlled by the
82-
tlb_flushall_shift knob under /sys/kernel/debug/x86. If you set it
83-
to -1, the code flushes the whole TLB unconditionally. Otherwise,
84-
for positive values of it, the kernel will use single TLB entry
85-
invalidating instructions according to the following formula:
86+
flush_entries <= active_tlb_entries / 2^tlb_flushall_shift
8687

87-
flush_entries <= active_tlb_entries / 2^tlb_flushall_shift
88-
89-
If in doubt, say "N".
88+
If in doubt, say "N".
9089

9190
config IOMMU_DEBUG
9291
bool "Enable IOMMU debugging"
@@ -119,10 +118,10 @@ config X86_DECODER_SELFTEST
119118
depends on DEBUG_KERNEL && INSTRUCTION_DECODER
120119
depends on !COMPILE_TEST
121120
help
122-
Perform x86 instruction decoder selftests at build time.
123-
This option is useful for checking the sanity of x86 instruction
124-
decoder code.
125-
If unsure, say "N".
121+
Perform x86 instruction decoder selftests at build time.
122+
This option is useful for checking the sanity of x86 instruction
123+
decoder code.
124+
If unsure, say "N".
126125

127126
choice
128127
prompt "IO delay type"

arch/x86/kvm/vmx/vmx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6219,7 +6219,7 @@ static noinstr void vmx_l1d_flush(struct kvm_vcpu *vcpu)
62196219
int size = PAGE_SIZE << L1D_CACHE_ORDER;
62206220

62216221
/*
6222-
* This code is only executed when the the flush mode is 'cond' or
6222+
* This code is only executed when the flush mode is 'cond' or
62236223
* 'always'
62246224
*/
62256225
if (static_branch_likely(&vmx_l1d_flush_cond)) {

arch/x86/kvm/x86.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11937,7 +11937,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
1193711937
if (current->mm == kvm->mm) {
1193811938
/*
1193911939
* Free memory regions allocated on behalf of userspace,
11940-
* unless the the memory map has changed due to process exit
11940+
* unless the memory map has changed due to process exit
1194111941
* or fd copying.
1194211942
*/
1194311943
mutex_lock(&kvm->slots_lock);

arch/x86/platform/efi/efi_thunk_64.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* The below thunking functions are only used after ExitBootServices()
99
* has been called. This simplifies things considerably as compared with
1010
* the early EFI thunking because we can leave all the kernel state
11-
* intact (GDT, IDT, etc) and simply invoke the the 32-bit EFI runtime
11+
* intact (GDT, IDT, etc) and simply invoke the 32-bit EFI runtime
1212
* services from __KERNEL32_CS. This means we can continue to service
1313
* interrupts across an EFI mixed mode call.
1414
*

0 commit comments

Comments
 (0)