Skip to content

Commit

Permalink
x86: also define AT_VECTOR_SIZE_ARCH
Browse files Browse the repository at this point in the history
The patch introducing this left out x86-64, despite it also having
extra entries.

[ mingo@elte.hu: re-merged this to after the unification patches. ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Jan Beulich authored and Ingo Molnar committed Jan 30, 2008
1 parent e942710 commit ded9aa0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions include/asm-x86/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@
#include <linux/kernel.h>
#include <linux/irqflags.h>

/* entries in ARCH_DLINFO: */
#ifdef CONFIG_IA32_EMULATION
# define AT_VECTOR_SIZE_ARCH 2
#else
# define AT_VECTOR_SIZE_ARCH 1
#endif

#ifdef CONFIG_X86_32
#define AT_VECTOR_SIZE_ARCH 2 /* entries in ARCH_DLINFO */

struct task_struct; /* one of the stranger aspects of C forward declarations */
extern struct task_struct *FASTCALL(__switch_to(struct task_struct *prev,
Expand Down Expand Up @@ -56,7 +62,7 @@ extern struct task_struct *FASTCALL(__switch_to(struct task_struct *prev,

/* Save restore flags to clear handle leaking NT */
#define switch_to(prev, next, last) \
asm volatile(SAVE_CONTEXT \
asm volatile(SAVE_CONTEXT \
"movq %%rsp,%P[threadrsp](%[prev])\n\t" /* save RSP */ \
"movq %P[threadrsp](%[next]),%%rsp\n\t" /* restore RSP */ \
"call __switch_to\n\t" \
Expand Down

0 comments on commit ded9aa0

Please sign in to comment.