Skip to content

Commit d748981

Browse files
committed
Merge tag 'x86_cleanups_for_v6.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cleanups from Borislav Petkov: - The mandatory pile of cleanups the cat drags in every merge window * tag 'x86_cleanups_for_v6.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Clean up whitespace in a20.c x86/mm: Delete disabled debug code x86/{boot,mtrr}: Remove unused function declarations x86/percpu: Use BIT_WORD() and BIT_MASK() macros x86/cpufeatures: Correct LKGS feature flag description x86/idtentry: Add missing '*' to kernel-doc lines
2 parents 2ae20d6 + d911fe6 commit d748981

8 files changed

Lines changed: 12 additions & 20 deletions

File tree

arch/x86/boot/a20.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,29 +135,29 @@ int enable_a20(void)
135135
(legacy free, etc.) */
136136
if (a20_test_short())
137137
return 0;
138-
138+
139139
/* Next, try the BIOS (INT 0x15, AX=0x2401) */
140140
enable_a20_bios();
141141
if (a20_test_short())
142142
return 0;
143-
143+
144144
/* Try enabling A20 through the keyboard controller */
145145
kbc_err = empty_8042();
146146

147147
if (a20_test_short())
148148
return 0; /* BIOS worked, but with delayed reaction */
149-
149+
150150
if (!kbc_err) {
151151
enable_a20_kbc();
152152
if (a20_test_long())
153153
return 0;
154154
}
155-
155+
156156
/* Finally, try enabling the "fast A20 gate" */
157157
enable_a20_fast();
158158
if (a20_test_long())
159159
return 0;
160160
}
161-
161+
162162
return -1;
163163
}

arch/x86/boot/boot.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,6 @@ static inline bool heap_free(size_t n)
193193

194194
void copy_to_fs(addr_t dst, void *src, size_t len);
195195
void *copy_from_fs(void *dst, addr_t src, size_t len);
196-
void copy_to_gs(addr_t dst, void *src, size_t len);
197-
void *copy_from_gs(void *dst, addr_t src, size_t len);
198196

199197
/* a20.c */
200198
int enable_a20(void);

arch/x86/include/asm/cpufeatures.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@
320320
#define X86_FEATURE_FSRS (12*32+11) /* Fast short REP STOSB */
321321
#define X86_FEATURE_FSRC (12*32+12) /* Fast short REP {CMPSB,SCASB} */
322322
#define X86_FEATURE_FRED (12*32+17) /* "fred" Flexible Return and Event Delivery */
323-
#define X86_FEATURE_LKGS (12*32+18) /* Load "kernel" (userspace) GS */
323+
#define X86_FEATURE_LKGS (12*32+18) /* Like MOV_GS except MSR_KERNEL_GS_BASE = GS.base */
324324
#define X86_FEATURE_WRMSRNS (12*32+19) /* Non-serializing WRMSR */
325325
#define X86_FEATURE_AMX_FP16 (12*32+21) /* AMX fp16 Support */
326326
#define X86_FEATURE_AVX_IFMA (12*32+23) /* Support for VPMADD52[H,L]UQ */

arch/x86/include/asm/idtentry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ static __always_inline void __##func(struct pt_regs *regs)
393393

394394
/**
395395
* DEFINE_IDTENTRY_VC_KERNEL - Emit code for VMM communication handler
396-
when raised from kernel mode
396+
* when raised from kernel mode
397397
* @func: Function name of the entry point
398398
*
399399
* Maps to DEFINE_IDTENTRY_RAW_ERRORCODE
@@ -403,7 +403,7 @@ static __always_inline void __##func(struct pt_regs *regs)
403403

404404
/**
405405
* DEFINE_IDTENTRY_VC_USER - Emit code for VMM communication handler
406-
when raised from user mode
406+
* when raised from user mode
407407
* @func: Function name of the entry point
408408
*
409409
* Maps to DEFINE_IDTENTRY_RAW_ERRORCODE

arch/x86/include/asm/percpu.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#else /* !__ASSEMBLY__: */
2424

2525
#include <linux/args.h>
26+
#include <linux/bits.h>
2627
#include <linux/build_bug.h>
2728
#include <linux/stringify.h>
2829
#include <asm/asm.h>
@@ -572,9 +573,9 @@ do { \
572573
#define x86_this_cpu_constant_test_bit(_nr, _var) \
573574
({ \
574575
unsigned long __percpu *addr__ = \
575-
(unsigned long __percpu *)&(_var) + ((_nr) / BITS_PER_LONG); \
576+
(unsigned long __percpu *)&(_var) + BIT_WORD(_nr); \
576577
\
577-
!!((1UL << ((_nr) % BITS_PER_LONG)) & raw_cpu_read(*addr__)); \
578+
!!(BIT_MASK(_nr) & raw_cpu_read(*addr__)); \
578579
})
579580

580581
#define x86_this_cpu_variable_test_bit(_nr, _var) \

arch/x86/kernel/cpu/mtrr/mtrr.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ struct set_mtrr_context {
4646
u32 ccr3;
4747
};
4848

49-
void set_mtrr_done(struct set_mtrr_context *ctxt);
50-
void set_mtrr_cache_disable(struct set_mtrr_context *ctxt);
51-
void set_mtrr_prepare_save(struct set_mtrr_context *ctxt);
52-
5349
void fill_mtrr_var_range(unsigned int index,
5450
u32 base_lo, u32 base_hi, u32 mask_lo, u32 mask_hi);
5551
bool get_mtrr_state(void);

arch/x86/mm/init_64.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,6 @@ phys_pte_init(pte_t *pte_page, unsigned long paddr, unsigned long paddr_end,
504504
continue;
505505
}
506506

507-
if (0)
508-
pr_info(" pte=%p addr=%lx pte=%016lx\n", pte, paddr,
509-
pfn_pte(paddr >> PAGE_SHIFT, PAGE_KERNEL).pte);
510507
pages++;
511508
set_pte_init(pte, pfn_pte(paddr >> PAGE_SHIFT, prot), init);
512509
paddr_last = (paddr & PAGE_MASK) + PAGE_SIZE;

tools/arch/x86/include/asm/cpufeatures.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@
320320
#define X86_FEATURE_FSRS (12*32+11) /* Fast short REP STOSB */
321321
#define X86_FEATURE_FSRC (12*32+12) /* Fast short REP {CMPSB,SCASB} */
322322
#define X86_FEATURE_FRED (12*32+17) /* "fred" Flexible Return and Event Delivery */
323-
#define X86_FEATURE_LKGS (12*32+18) /* Load "kernel" (userspace) GS */
323+
#define X86_FEATURE_LKGS (12*32+18) /* Like MOV_GS except MSR_KERNEL_GS_BASE = GS.base */
324324
#define X86_FEATURE_WRMSRNS (12*32+19) /* Non-serializing WRMSR */
325325
#define X86_FEATURE_AMX_FP16 (12*32+21) /* AMX fp16 Support */
326326
#define X86_FEATURE_AVX_IFMA (12*32+23) /* Support for VPMADD52[H,L]UQ */

0 commit comments

Comments
 (0)