Skip to content

Commit bf60333

Browse files
committed
Merge branch 'x86/asm' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into for-next/asm
As agreed with Boris, merge in the 'x86/asm' branch from -tip so that we can select the new 'ARCH_USE_SYM_ANNOTATIONS' Kconfig symbol, which is required by the BTI kernel patches. * 'x86/asm' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/asm: Provide a Kconfig symbol for disabling old assembly annotations x86/32: Remove CONFIG_DOUBLEFAULT
2 parents 6a8b55e + 2ce0d7f commit bf60333

File tree

12 files changed

+11
-31
lines changed

12 files changed

+11
-31
lines changed

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ config X86
9191
select ARCH_USE_BUILTIN_BSWAP
9292
select ARCH_USE_QUEUED_RWLOCKS
9393
select ARCH_USE_QUEUED_SPINLOCKS
94+
select ARCH_USE_SYM_ANNOTATIONS
9495
select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
9596
select ARCH_WANT_DEFAULT_BPF_JIT if X86_64
9697
select ARCH_WANTS_DYNAMIC_TASK_STRUCT

arch/x86/Kconfig.debug

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,6 @@ config DEBUG_WX
9999

100100
If in doubt, say "Y".
101101

102-
config DOUBLEFAULT
103-
default y
104-
bool "Enable doublefault exception handler" if EXPERT && X86_32
105-
---help---
106-
This option allows trapping of rare doublefault exceptions that
107-
would otherwise cause a system to silently reboot. Disabling this
108-
option saves about 4k and might cause you much additional grey
109-
hair.
110-
111102
config DEBUG_TLBFLUSH
112103
bool "Set upper limit of TLB entries to flush one-by-one"
113104
depends on DEBUG_KERNEL

arch/x86/entry/entry_32.S

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,6 @@ SYM_CODE_START(debug)
15361536
jmp common_exception
15371537
SYM_CODE_END(debug)
15381538

1539-
#ifdef CONFIG_DOUBLEFAULT
15401539
SYM_CODE_START(double_fault)
15411540
1:
15421541
/*
@@ -1576,7 +1575,6 @@ SYM_CODE_START(double_fault)
15761575
hlt
15771576
jmp 1b
15781577
SYM_CODE_END(double_fault)
1579-
#endif
15801578

15811579
/*
15821580
* NMI is doubly nasty. It can happen on the first instruction of

arch/x86/include/asm/doublefault.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ifndef _ASM_X86_DOUBLEFAULT_H
33
#define _ASM_X86_DOUBLEFAULT_H
44

5-
#if defined(CONFIG_X86_32) && defined(CONFIG_DOUBLEFAULT)
5+
#ifdef CONFIG_X86_32
66
extern void doublefault_init_cpu_tss(void);
77
#else
88
static inline void doublefault_init_cpu_tss(void)

arch/x86/include/asm/traps.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ dotraplinkage void do_overflow(struct pt_regs *regs, long error_code);
6969
dotraplinkage void do_bounds(struct pt_regs *regs, long error_code);
7070
dotraplinkage void do_invalid_op(struct pt_regs *regs, long error_code);
7171
dotraplinkage void do_device_not_available(struct pt_regs *regs, long error_code);
72-
#if defined(CONFIG_X86_64) || defined(CONFIG_DOUBLEFAULT)
7372
dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code, unsigned long cr2);
74-
#endif
7573
dotraplinkage void do_coprocessor_segment_overrun(struct pt_regs *regs, long error_code);
7674
dotraplinkage void do_invalid_TSS(struct pt_regs *regs, long error_code);
7775
dotraplinkage void do_segment_not_present(struct pt_regs *regs, long error_code);

arch/x86/kernel/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,7 @@ obj-$(CONFIG_KEXEC_FILE) += kexec-bzimage64.o
102102
obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o
103103
obj-y += kprobes/
104104
obj-$(CONFIG_MODULES) += module.o
105-
ifeq ($(CONFIG_X86_32),y)
106-
obj-$(CONFIG_DOUBLEFAULT) += doublefault_32.o
107-
endif
105+
obj-$(CONFIG_X86_32) += doublefault_32.o
108106
obj-$(CONFIG_KGDB) += kgdb.o
109107
obj-$(CONFIG_VM86) += vm86_32.o
110108
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o

arch/x86/kernel/dumpstack_32.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ static bool in_softirq_stack(unsigned long *stack, struct stack_info *info)
8787

8888
static bool in_doublefault_stack(unsigned long *stack, struct stack_info *info)
8989
{
90-
#ifdef CONFIG_DOUBLEFAULT
9190
struct cpu_entry_area *cea = get_cpu_entry_area(raw_smp_processor_id());
9291
struct doublefault_stack *ss = &cea->doublefault_stack;
9392

@@ -103,9 +102,6 @@ static bool in_doublefault_stack(unsigned long *stack, struct stack_info *info)
103102
info->next_sp = (unsigned long *)this_cpu_read(cpu_tss_rw.x86_tss.sp);
104103

105104
return true;
106-
#else
107-
return false;
108-
#endif
109105
}
110106

111107

arch/x86/kernel/traps.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ __visible void __noreturn handle_stack_overflow(const char *message,
326326
}
327327
#endif
328328

329-
#if defined(CONFIG_X86_64) || defined(CONFIG_DOUBLEFAULT)
330329
/*
331330
* Runs on an IST stack for x86_64 and on a special task stack for x86_32.
332331
*
@@ -450,7 +449,6 @@ dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code, unsign
450449
die("double fault", regs, error_code);
451450
panic("Machine halted.");
452451
}
453-
#endif
454452

455453
dotraplinkage void do_bounds(struct pt_regs *regs, long error_code)
456454
{

arch/x86/mm/cpu_entry_area.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static DEFINE_PER_CPU_PAGE_ALIGNED(struct exception_stacks, exception_stacks);
1717
DEFINE_PER_CPU(struct cea_exception_stacks*, cea_exception_stacks);
1818
#endif
1919

20-
#if defined(CONFIG_X86_32) && defined(CONFIG_DOUBLEFAULT)
20+
#ifdef CONFIG_X86_32
2121
DECLARE_PER_CPU_PAGE_ALIGNED(struct doublefault_stack, doublefault_stack);
2222
#endif
2323

@@ -114,12 +114,10 @@ static void __init percpu_setup_exception_stacks(unsigned int cpu)
114114
#else
115115
static inline void percpu_setup_exception_stacks(unsigned int cpu)
116116
{
117-
#ifdef CONFIG_DOUBLEFAULT
118117
struct cpu_entry_area *cea = get_cpu_entry_area(cpu);
119118

120119
cea_map_percpu_pages(&cea->doublefault_stack,
121120
&per_cpu(doublefault_stack, cpu), 1, PAGE_KERNEL);
122-
#endif
123121
}
124122
#endif
125123

include/linux/linkage.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105

106106
/* === DEPRECATED annotations === */
107107

108-
#ifndef CONFIG_X86
108+
#ifndef CONFIG_ARCH_USE_SYM_ANNOTATIONS
109109
#ifndef GLOBAL
110110
/* deprecated, use SYM_DATA*, SYM_ENTRY, or similar */
111111
#define GLOBAL(name) \
@@ -118,10 +118,10 @@
118118
#define ENTRY(name) \
119119
SYM_FUNC_START(name)
120120
#endif
121-
#endif /* CONFIG_X86 */
121+
#endif /* CONFIG_ARCH_USE_SYM_ANNOTATIONS */
122122
#endif /* LINKER_SCRIPT */
123123

124-
#ifndef CONFIG_X86
124+
#ifndef CONFIG_ARCH_USE_SYM_ANNOTATIONS
125125
#ifndef WEAK
126126
/* deprecated, use SYM_FUNC_START_WEAK* */
127127
#define WEAK(name) \
@@ -143,7 +143,7 @@
143143
#define ENDPROC(name) \
144144
SYM_FUNC_END(name)
145145
#endif
146-
#endif /* CONFIG_X86 */
146+
#endif /* CONFIG_ARCH_USE_SYM_ANNOTATIONS */
147147

148148
/* === generic annotations === */
149149

0 commit comments

Comments
 (0)