ia64/xen-unstable

view linux-2.6-xen-sparse/arch/ia64/xen/xensetup.S @ 10692:306d7857928c

[IA64] Save & restore.

xc_ia64_linux_save.c and xc_ia64_linux_restore.c added.
vcpu context has more registers and states (eg: tr registers).
Per cpu irqs are deallocated when cpu is switched off.
#if/#endif added in reboot.c for ia64.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Tue Jul 11 12:51:18 2006 -0600 (2006-07-11)
parents bf396988059e
children 92bd25c46f27
line source
1 /*
2 * Support routines for Xen
3 *
4 * Copyright (C) 2005 Dan Magenheimer <dan.magenheimer@hp.com>
5 */
7 #include <linux/config.h>
8 #include <asm/processor.h>
9 #include <asm/asmmacro.h>
11 #define isBP p3 // are we the Bootstrap Processor?
13 .text
14 GLOBAL_ENTRY(early_xen_setup)
15 mov r8=ar.rsc // Initialized in head.S
16 (isBP) movl r9=running_on_xen;;
17 extr.u r8=r8,2,2;; // Extract pl fields
18 cmp.eq p7,p0=r8,r0 // p7: !running on xen
19 mov r8=1 // booleanize.
20 (p7) br.ret.sptk.many rp;;
21 (isBP) st4 [r9]=r8
22 movl r10=xen_ivt;;
24 mov cr.iva=r10
26 #if XSI_BASE != 0xf100000000000000UL
27 /* Backward compatibility. */
28 (isBP) mov r2=0x600
29 (isBP) movl r28=XSI_BASE;;
30 (isBP) break 0x1000;;
31 #endif
33 br.ret.sptk.many rp
34 ;;
35 END(early_xen_setup)
37 #include <xen/interface/xen.h>
39 /* Stub for suspend.
40 Just force the stacked registers to be written in memory. */
41 GLOBAL_ENTRY(HYPERVISOR_suspend)
42 alloc r20=ar.pfs,0,0,0,0
43 mov r14=2
44 mov r15=r12
45 ;;
46 /* We don't want to deal with RSE. */
47 flushrs
48 mov r2=__HYPERVISOR_sched_op
49 st4 [r12]=r14
50 ;;
51 break 0x1000
52 ;;
53 mov ar.pfs=r20
54 br.ret.sptk.many b0
55 END(HYPERVISOR_suspend)