# HG changeset patch # User tristan.gingold@xxxxxxxx # Node ID abc22d71379e41016c30fd3e5d0d9d4727282dc9 # Parent e58ff5fd3550dc48bcaeb7b36bbb5579983e7e55 Every processor call xen_early_setup (required on SMP-guest to set ivt). Only BP set running_on_xen. xensetup.S slightly compacted. Signed-off-by: Tristan Gingold diff -r e58ff5fd3550 -r abc22d71379e linux-2.6-xen-sparse/arch/ia64/kernel/head.S --- a/linux-2.6-xen-sparse/arch/ia64/kernel/head.S Tue Feb 28 20:18:08 2006 +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/head.S Wed Mar 1 08:56:43 2006 @@ -363,6 +363,12 @@ ;; (isBP) st8 [r2]=r28 // save the address of the boot param area passed by the bootloader +#ifdef CONFIG_XEN + // Note: isBP is used by the subprogram. + br.call.sptk.many rp=early_xen_setup + ;; +#endif + #ifdef CONFIG_SMP (isAP) br.call.sptk.many rp=start_secondary .ret0: @@ -371,10 +377,6 @@ // This is executed by the bootstrap processor (bsp) only: -#ifdef CONFIG_XEN - br.call.sptk.many rp=early_xen_setup - ;; -#endif #ifdef CONFIG_IA64_FW_EMU // initialize PAL & SAL emulator: br.call.sptk.many rp=sys_fw_init diff -r e58ff5fd3550 -r abc22d71379e linux-2.6-xen-sparse/arch/ia64/xen/xensetup.S --- a/linux-2.6-xen-sparse/arch/ia64/xen/xensetup.S Tue Feb 28 20:18:08 2006 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xensetup.S Wed Mar 1 08:56:43 2006 @@ -14,13 +14,15 @@ running_on_xen: data4 0 +#define isBP p3 // are we the Bootstrap Processor? + .text GLOBAL_ENTRY(early_xen_setup) - mov r8=cr.dcr;; - extr.u r8=r8,63,1 - movl r9=running_on_xen;; - st4 [r9]=r8;; + mov r8=cr.dcr +(isBP) movl r9=running_on_xen;; + extr.u r8=r8,63,1;; cmp.ne p7,p0=r8,r0;; +(isBP) st4 [r9]=r8 (p7) movl r10=xen_ivt;; (p7) mov cr.iva=r10 br.ret.sptk.many rp;; @@ -28,6 +30,6 @@ GLOBAL_ENTRY(is_running_on_xen) movl r9=running_on_xen;; - ld4 r8=[r9];; + ld4 r8=[r9] br.ret.sptk.many rp;; END(is_running_on_xen)