aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/rcu.h12
-rw-r--r--arch/x86/kernel/entry_64.S9
2 files changed, 17 insertions, 4 deletions
diff --git a/arch/x86/include/asm/rcu.h b/arch/x86/include/asm/rcu.h
index 439815b35ced..d1ac07a23979 100644
--- a/arch/x86/include/asm/rcu.h
+++ b/arch/x86/include/asm/rcu.h
@@ -1,6 +1,8 @@
1#ifndef _ASM_X86_RCU_H 1#ifndef _ASM_X86_RCU_H
2#define _ASM_X86_RCU_H 2#define _ASM_X86_RCU_H
3 3
4#ifndef __ASSEMBLY__
5
4#include <linux/rcupdate.h> 6#include <linux/rcupdate.h>
5#include <asm/ptrace.h> 7#include <asm/ptrace.h>
6 8
@@ -17,4 +19,14 @@ static inline void exception_exit(struct pt_regs *regs)
17#endif 19#endif
18} 20}
19 21
22#else /* __ASSEMBLY__ */
23
24#ifdef CONFIG_RCU_USER_QS
25# define SCHEDULE_USER call schedule_user
26#else
27# define SCHEDULE_USER call schedule
28#endif
29
30#endif /* !__ASSEMBLY__ */
31
20#endif 32#endif
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 69babd8c834f..1a8f3cbb6ee3 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -56,6 +56,7 @@
56#include <asm/ftrace.h> 56#include <asm/ftrace.h>
57#include <asm/percpu.h> 57#include <asm/percpu.h>
58#include <asm/asm.h> 58#include <asm/asm.h>
59#include <asm/rcu.h>
59#include <linux/err.h> 60#include <linux/err.h>
60 61
61/* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */ 62/* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */
@@ -565,7 +566,7 @@ sysret_careful:
565 TRACE_IRQS_ON 566 TRACE_IRQS_ON
566 ENABLE_INTERRUPTS(CLBR_NONE) 567 ENABLE_INTERRUPTS(CLBR_NONE)
567 pushq_cfi %rdi 568 pushq_cfi %rdi
568 call schedule 569 SCHEDULE_USER
569 popq_cfi %rdi 570 popq_cfi %rdi
570 jmp sysret_check 571 jmp sysret_check
571 572
@@ -678,7 +679,7 @@ int_careful:
678 TRACE_IRQS_ON 679 TRACE_IRQS_ON
679 ENABLE_INTERRUPTS(CLBR_NONE) 680 ENABLE_INTERRUPTS(CLBR_NONE)
680 pushq_cfi %rdi 681 pushq_cfi %rdi
681 call schedule 682 SCHEDULE_USER
682 popq_cfi %rdi 683 popq_cfi %rdi
683 DISABLE_INTERRUPTS(CLBR_NONE) 684 DISABLE_INTERRUPTS(CLBR_NONE)
684 TRACE_IRQS_OFF 685 TRACE_IRQS_OFF
@@ -974,7 +975,7 @@ retint_careful:
974 TRACE_IRQS_ON 975 TRACE_IRQS_ON
975 ENABLE_INTERRUPTS(CLBR_NONE) 976 ENABLE_INTERRUPTS(CLBR_NONE)
976 pushq_cfi %rdi 977 pushq_cfi %rdi
977 call schedule 978 SCHEDULE_USER
978 popq_cfi %rdi 979 popq_cfi %rdi
979 GET_THREAD_INFO(%rcx) 980 GET_THREAD_INFO(%rcx)
980 DISABLE_INTERRUPTS(CLBR_NONE) 981 DISABLE_INTERRUPTS(CLBR_NONE)
@@ -1449,7 +1450,7 @@ paranoid_userspace:
1449paranoid_schedule: 1450paranoid_schedule:
1450 TRACE_IRQS_ON 1451 TRACE_IRQS_ON
1451 ENABLE_INTERRUPTS(CLBR_ANY) 1452 ENABLE_INTERRUPTS(CLBR_ANY)
1452 call schedule 1453 SCHEDULE_USER
1453 DISABLE_INTERRUPTS(CLBR_ANY) 1454 DISABLE_INTERRUPTS(CLBR_ANY)
1454 TRACE_IRQS_OFF 1455 TRACE_IRQS_OFF
1455 jmp paranoid_userspace 1456 jmp paranoid_userspace