Skip to content

Commit c4273a6

Browse files
committed
Merge tag 'x86-cleanups-2024-05-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cleanups from Ingo Molnar: - Fix function prototypes to address clang function type cast warnings in the math-emu code - Reorder definitions in <asm/msr-index.h> - Remove unused code - Fix typos - Simplify #include sections * tag 'x86-cleanups-2024-05-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/pci/ce4100: Remove unused 'struct sim_reg_op' x86/msr: Move ARCH_CAP_XAPIC_DISABLE bit definition to its rightful place x86/math-emu: Fix function cast warnings x86/extable: Remove unused fixup type EX_TYPE_COPY x86/rtc: Remove unused intel-mid.h x86/32: Remove unused IA32_STACK_TOP and two externs x86/head: Simplify relative include path to xen-head.S x86/fred: Fix typo in Kconfig description x86/syscall/compat: Remove ia32_unistd.h x86/syscall/compat: Remove unused macro __SYSCALL_ia32_NR x86/virt/tdx: Remove duplicate include x86/xen: Remove duplicate #include
2 parents d71ec0e + ad3bd76 commit c4273a6

File tree

20 files changed

+26
-65
lines changed

20 files changed

+26
-65
lines changed

arch/x86/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ config X86_FRED
501501
When enabled, try to use Flexible Return and Event Delivery
502502
instead of the legacy SYSCALL/SYSENTER/IDT architecture for
503503
ring transitions and exception/interrupt handling if the
504-
system supports.
504+
system supports it.
505505

506506
config X86_BIGSMP
507507
bool "Support for big SMP systems with more than 8 CPUs"

arch/x86/entry/entry_64_compat.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <asm/asm-offsets.h>
88
#include <asm/current.h>
99
#include <asm/errno.h>
10-
#include <asm/ia32_unistd.h>
1110
#include <asm/thread_info.h>
1211
#include <asm/segment.h>
1312
#include <asm/irqflags.h>

arch/x86/include/asm/asm.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,6 @@ register unsigned long current_stack_pointer asm(_ASM_SP);
229229
#define _ASM_EXTABLE_UA(from, to) \
230230
_ASM_EXTABLE_TYPE(from, to, EX_TYPE_UACCESS)
231231

232-
#define _ASM_EXTABLE_CPY(from, to) \
233-
_ASM_EXTABLE_TYPE(from, to, EX_TYPE_COPY)
234-
235232
#define _ASM_EXTABLE_FAULT(from, to) \
236233
_ASM_EXTABLE_TYPE(from, to, EX_TYPE_FAULT)
237234

arch/x86/include/asm/extable_fixup_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define EX_TYPE_DEFAULT 1
3737
#define EX_TYPE_FAULT 2
3838
#define EX_TYPE_UACCESS 3
39-
#define EX_TYPE_COPY 4
39+
/* unused, was: #define EX_TYPE_COPY 4 */
4040
#define EX_TYPE_CLEAR_FS 5
4141
#define EX_TYPE_FPU_RESTORE 6
4242
#define EX_TYPE_BPF 7

arch/x86/include/asm/ia32.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,6 @@ struct stat64 {
5656
unsigned long long st_ino;
5757
} __attribute__((packed));
5858

59-
#define IA32_STACK_TOP IA32_PAGE_OFFSET
60-
61-
#ifdef __KERNEL__
62-
struct linux_binprm;
63-
extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
64-
unsigned long stack_top, int exec_stack);
65-
struct mm_struct;
66-
extern void ia32_pick_mmap_layout(struct mm_struct *mm);
67-
68-
#endif
69-
7059
extern bool __ia32_enabled;
7160

7261
static __always_inline bool ia32_enabled(void)

arch/x86/include/asm/ia32_unistd.h

Lines changed: 0 additions & 12 deletions
This file was deleted.

arch/x86/include/asm/msr-index.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@
170170
* CPU is not affected by Branch
171171
* History Injection.
172172
*/
173+
#define ARCH_CAP_XAPIC_DISABLE BIT(21) /*
174+
* IA32_XAPIC_DISABLE_STATUS MSR
175+
* supported
176+
*/
173177
#define ARCH_CAP_PBRSB_NO BIT(24) /*
174178
* Not susceptible to Post-Barrier
175179
* Return Stack Buffer Predictions.
@@ -192,11 +196,6 @@
192196
* File.
193197
*/
194198

195-
#define ARCH_CAP_XAPIC_DISABLE BIT(21) /*
196-
* IA32_XAPIC_DISABLE_STATUS MSR
197-
* supported
198-
*/
199-
200199
#define MSR_IA32_FLUSH_CMD 0x0000010b
201200
#define L1D_FLUSH BIT(0) /*
202201
* Writeback and invalidate the

arch/x86/include/asm/seccomp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#endif
1010

1111
#ifdef CONFIG_COMPAT
12-
#include <asm/ia32_unistd.h>
12+
#include <asm/unistd_32_ia32.h>
1313
#define __NR_seccomp_read_32 __NR_ia32_read
1414
#define __NR_seccomp_write_32 __NR_ia32_write
1515
#define __NR_seccomp_exit_32 __NR_ia32_exit

arch/x86/kernel/cpu/mce/severity.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ static noinstr int error_context(struct mce *m, struct pt_regs *regs)
290290

291291
switch (fixup_type) {
292292
case EX_TYPE_UACCESS:
293-
case EX_TYPE_COPY:
294293
if (!copy_user)
295294
return IN_KERNEL;
296295
m->kflags |= MCE_IN_KERNEL_COPYIN;

arch/x86/kernel/head_32.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ __INITRODATA
491491
int_msg:
492492
.asciz "Unknown interrupt or fault at: %p %p %p\n"
493493

494-
#include "../../x86/xen/xen-head.S"
494+
#include "../xen/xen-head.S"
495495

496496
/*
497497
* The IDT and GDT 'descriptors' are a strange 48-bit object

0 commit comments

Comments
 (0)