Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aab02f0a authored by Jaswinder Singh's avatar Jaswinder Singh Committed by Ingo Molnar
Browse files

x86: process_64.c declare __switch_to() and sys_arch_prctl before they get used



Impact: cleanup

In asm/system.h moved out __switch_to from CONFIG_X86_32 as it is common for
both 32 and 64 bit.

In asm/pctl.h defined sys_arch_prctl
Signed-off-by: default avatarJaswinder Singh <jaswinder@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent d6be89ad
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -6,5 +6,8 @@
#define ARCH_GET_FS 0x1003
#define ARCH_GET_FS 0x1003
#define ARCH_GET_GS 0x1004
#define ARCH_GET_GS 0x1004


#ifdef CONFIG_X86_64
extern long sys_arch_prctl(int, unsigned long);
#endif /* CONFIG_X86_64 */


#endif /* _ASM_X86_PRCTL_H */
#endif /* _ASM_X86_PRCTL_H */
+2 −2
Original line number Original line Diff line number Diff line
@@ -17,12 +17,12 @@
# define AT_VECTOR_SIZE_ARCH 1
# define AT_VECTOR_SIZE_ARCH 1
#endif
#endif


#ifdef CONFIG_X86_32

struct task_struct; /* one of the stranger aspects of C forward declarations */
struct task_struct; /* one of the stranger aspects of C forward declarations */
struct task_struct *__switch_to(struct task_struct *prev,
struct task_struct *__switch_to(struct task_struct *prev,
				struct task_struct *next);
				struct task_struct *next);


#ifdef CONFIG_X86_32

/*
/*
 * Saving eflags is important. It switches not only IOPL between tasks,
 * Saving eflags is important. It switches not only IOPL between tasks,
 * it also protects other tasks from NT leaking through sysenter etc.
 * it also protects other tasks from NT leaking through sysenter etc.