ia64/xen-unstable

diff xen/include/asm-ia64/xensystem.h @ 9770:ced37bea0647

[IA64] FPH enabling + cleanup

Move contents of switch_to macro from xensystem.h to context_switch function.
Initialize FPU on all processors. FPH is always enabled in Xen.
Speed up context-switch (a little bit!) by not enabling/disabling FPH.
Cleanup (unused function/variablesi/fields, debug printf...)
vmx_ia64_switch_to removed (was unused).

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Tue Apr 25 22:35:41 2006 -0600 (2006-04-25)
parents 7ed6c203efe9
children bf396988059e
line diff
     1.1 --- a/xen/include/asm-ia64/xensystem.h	Tue Apr 25 22:32:14 2006 -0600
     1.2 +++ b/xen/include/asm-ia64/xensystem.h	Tue Apr 25 22:35:41 2006 -0600
     1.3 @@ -25,9 +25,9 @@
     1.4  #define HYPERVISOR_VIRT_START	 0xf000000000000000
     1.5  #define KERNEL_START		 0xf000000004000000
     1.6  #define SHAREDINFO_ADDR		 0xf100000000000000
     1.7 -#define SHARED_ARCHINFO_ADDR	 (SHAREDINFO_ADDR + PAGE_SIZE)
     1.8 +#define XSI_OFS 		 PAGE_SIZE
     1.9 +#define SHARED_ARCHINFO_ADDR	 (SHAREDINFO_ADDR + XSI_OFS)
    1.10  #define PERCPU_ADDR		 (SHAREDINFO_ADDR - PERCPU_PAGE_SIZE)
    1.11 -#define XSI_OFS 		 (SHARED_ARCHINFO_ADDR - SHAREDINFO_ADDR)
    1.12  #define VHPT_ADDR		 0xf200000000000000
    1.13  #ifdef CONFIG_VIRTUAL_FRAME_TABLE
    1.14  #define VIRT_FRAME_TABLE_ADDR	 0xf300000000000000
    1.15 @@ -35,45 +35,8 @@
    1.16  #endif
    1.17  #define XEN_END_ADDR		 0xf400000000000000
    1.18  
    1.19 +#define PAGE_OFFSET	__IA64_UL_CONST(0xf000000000000000)
    1.20 +
    1.21  #define IS_VMM_ADDRESS(addr) ((((addr) >> 60) ^ ((addr) >> 59)) & 1)
    1.22  
    1.23 -#ifndef __ASSEMBLY__
    1.24 -
    1.25 -#define IA64_HAS_EXTRA_STATE(t) 0
    1.26 -
    1.27 -struct vcpu;
    1.28 -extern void ia64_save_extra (struct vcpu *v);
    1.29 -extern void ia64_load_extra (struct vcpu *v);
    1.30 -
    1.31 -extern struct vcpu *vmx_ia64_switch_to (struct vcpu *next_task);
    1.32 -extern struct vcpu *ia64_switch_to (struct vcpu *next_task);
    1.33 -
    1.34 -#define __switch_to(prev,next,last) do {	\
    1.35 -       ia64_save_fpu(prev->arch._thread.fph);	\
    1.36 -       ia64_load_fpu(next->arch._thread.fph);	\
    1.37 -       if (VMX_DOMAIN(prev))                   \
    1.38 -               vmx_save_state(prev);           \
    1.39 -       else {                                  \
    1.40 -               if (IA64_HAS_EXTRA_STATE(prev)) \
    1.41 -                       ia64_save_extra(prev);  \
    1.42 -       }                                       \
    1.43 -       if (VMX_DOMAIN(next))                   \
    1.44 -               vmx_load_state(next);           \
    1.45 -       else {                                  \
    1.46 -               if (IA64_HAS_EXTRA_STATE(next)) \
    1.47 -                       ia64_save_extra(next);  \
    1.48 -       }                                       \
    1.49 -	/*ia64_psr(ia64_task_regs(next))->dfh = !ia64_is_local_fpu_owner(next);*/			 \
    1.50 -       (last) = ia64_switch_to((next));        \
    1.51 -       if (!VMX_DOMAIN(current)){                   \
    1.52 -    	   vcpu_set_next_timer(current);    		\
    1.53 -       }                                       \
    1.54 -} while (0)
    1.55 -
    1.56 -// FIXME SMP... see system.h, does this need to be different?
    1.57 -#define switch_to(prev,next,last)	__switch_to(prev, next, last)
    1.58 -
    1.59 -#define local_irq_is_enabled() (!irqs_disabled())
    1.60 -
    1.61 -#endif // __ASSEMBLY__
    1.62  #endif // _ASM_IA64_XENSYSTEM_H