diff options
Diffstat (limited to 'arch/x86/include')
| -rw-r--r-- | arch/x86/include/asm/Kbuild | 3 | ||||
| -rw-r--r-- | arch/x86/include/asm/fpu-internal.h | 15 | ||||
| -rw-r--r-- | arch/x86/include/asm/ptrace.h | 15 | ||||
| -rw-r--r-- | arch/x86/include/asm/xen/hypercall.h | 21 | ||||
| -rw-r--r-- | arch/x86/include/asm/xen/hypervisor.h | 1 | 
5 files changed, 23 insertions, 32 deletions
diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild index 66e5f0ef052..79fd8a3418f 100644 --- a/arch/x86/include/asm/Kbuild +++ b/arch/x86/include/asm/Kbuild @@ -12,6 +12,7 @@ header-y += mce.h  header-y += msr-index.h  header-y += msr.h  header-y += mtrr.h +header-y += perf_regs.h  header-y += posix_types_32.h  header-y += posix_types_64.h  header-y += posix_types_x32.h @@ -19,8 +20,10 @@ header-y += prctl.h  header-y += processor-flags.h  header-y += ptrace-abi.h  header-y += sigcontext32.h +header-y += svm.h  header-y += ucontext.h  header-y += vm86.h +header-y += vmx.h  header-y += vsyscall.h  genhdr-y += unistd_32.h diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h index 831dbb9c6c0..41ab26ea656 100644 --- a/arch/x86/include/asm/fpu-internal.h +++ b/arch/x86/include/asm/fpu-internal.h @@ -399,14 +399,17 @@ static inline void drop_init_fpu(struct task_struct *tsk)  typedef struct { int preload; } fpu_switch_t;  /* - * FIXME! We could do a totally lazy restore, but we need to - * add a per-cpu "this was the task that last touched the FPU - * on this CPU" variable, and the task needs to have a "I last - * touched the FPU on this CPU" and check them. + * Must be run with preemption disabled: this clears the fpu_owner_task, + * on this CPU.   * - * We don't do that yet, so "fpu_lazy_restore()" always returns - * false, but some day.. + * This will disable any lazy FPU state restore of the current FPU state, + * but if the current thread owns the FPU, it will still be saved by.   */ +static inline void __cpu_disable_lazy_restore(unsigned int cpu) +{ +	per_cpu(fpu_owner_task, cpu) = NULL; +} +  static inline int fpu_lazy_restore(struct task_struct *new, unsigned int cpu)  {  	return new == this_cpu_read_stable(fpu_owner_task) && diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h index dcfde52979c..19f16ebaf4f 100644 --- a/arch/x86/include/asm/ptrace.h +++ b/arch/x86/include/asm/ptrace.h @@ -205,21 +205,14 @@ static inline bool user_64bit_mode(struct pt_regs *regs)  }  #endif -/* - * X86_32 CPUs don't save ss and esp if the CPU is already in kernel mode - * when it traps.  The previous stack will be directly underneath the saved - * registers, and 'sp/ss' won't even have been saved. Thus the '®s->sp'. - * - * This is valid only for kernel mode traps. - */ -static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) -{  #ifdef CONFIG_X86_32 -	return (unsigned long)(®s->sp); +extern unsigned long kernel_stack_pointer(struct pt_regs *regs);  #else +static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) +{  	return regs->sp; -#endif  } +#endif  #define GET_IP(regs) ((regs)->ip)  #define GET_FP(regs) ((regs)->bp) diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h index 59c226d120c..c20d1ce62dc 100644 --- a/arch/x86/include/asm/xen/hypercall.h +++ b/arch/x86/include/asm/xen/hypercall.h @@ -359,18 +359,14 @@ HYPERVISOR_update_va_mapping(unsigned long va, pte_t new_val,  		return _hypercall4(int, update_va_mapping, va,  				   new_val.pte, new_val.pte >> 32, flags);  } +extern int __must_check xen_event_channel_op_compat(int, void *);  static inline int  HYPERVISOR_event_channel_op(int cmd, void *arg)  {  	int rc = _hypercall2(int, event_channel_op, cmd, arg); -	if (unlikely(rc == -ENOSYS)) { -		struct evtchn_op op; -		op.cmd = cmd; -		memcpy(&op.u, arg, sizeof(op.u)); -		rc = _hypercall1(int, event_channel_op_compat, &op); -		memcpy(arg, &op.u, sizeof(op.u)); -	} +	if (unlikely(rc == -ENOSYS)) +		rc = xen_event_channel_op_compat(cmd, arg);  	return rc;  } @@ -386,17 +382,14 @@ HYPERVISOR_console_io(int cmd, int count, char *str)  	return _hypercall3(int, console_io, cmd, count, str);  } +extern int __must_check HYPERVISOR_physdev_op_compat(int, void *); +  static inline int  HYPERVISOR_physdev_op(int cmd, void *arg)  {  	int rc = _hypercall2(int, physdev_op, cmd, arg); -	if (unlikely(rc == -ENOSYS)) { -		struct physdev_op op; -		op.cmd = cmd; -		memcpy(&op.u, arg, sizeof(op.u)); -		rc = _hypercall1(int, physdev_op_compat, &op); -		memcpy(arg, &op.u, sizeof(op.u)); -	} +	if (unlikely(rc == -ENOSYS)) +		rc = HYPERVISOR_physdev_op_compat(cmd, arg);  	return rc;  } diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h index 66d0fff1ee8..125f344f06a 100644 --- a/arch/x86/include/asm/xen/hypervisor.h +++ b/arch/x86/include/asm/xen/hypervisor.h @@ -33,7 +33,6 @@  #ifndef _ASM_X86_XEN_HYPERVISOR_H  #define _ASM_X86_XEN_HYPERVISOR_H -/* arch/i386/kernel/setup.c */  extern struct shared_info *HYPERVISOR_shared_info;  extern struct start_info *xen_start_info;  |