Hi Eddie. The attached patches does many things. Could you explain? - convert cover argument in SAVE_MIN_WITH_COVER(_R19) into COVER. This seems correct. I'll take this part.
- convert __COVER argument into COVER. Using conflicting argument is a bad practice. - shuffle instructions of XEN_BSW_1 and xen DO_XEN_MIN(). Is this for producing better bundles? Please ellaborate on this. If so, I'll take as another patch. - churning header file inclusion. I need to rethink to do this with another mail you posted as where to compile. I'll answer it to that mail. I'm now inclined to move ia64/kernel/minstate.h under include/asm-ia64/native/. On Fri, Mar 21, 2008 at 03:17:04PM +0800, Dong, Eddie wrote: > The MACRO parameter COVER in DO_SAVE_MIN won't > be replaced by COVER macro in inst.h since it is already > replaced when compiler extend SAVE_MIN_WITH_COVER > macro etc. > Thanks, eddie > > > > > Fix DO_SAVE_MIN macro typo, and move some > instructions to make bundle compact. > > Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> > > diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S > index d1cebe5..f2306ae 100644 > --- a/arch/ia64/kernel/ivt.S > +++ b/arch/ia64/kernel/ivt.S > @@ -75,7 +75,6 @@ > # define DBG_FAULT(i) > #endif > > -#include "inst_paravirt.h" > #include "minstate.h" > > #define FAULT(n) > \ > diff --git a/arch/ia64/kernel/minstate.h b/arch/ia64/kernel/minstate.h > index 10a412c..9e18fb0 100644 > --- a/arch/ia64/kernel/minstate.h > +++ b/arch/ia64/kernel/minstate.h > @@ -2,6 +2,7 @@ > #include <asm/cache.h> > > #include "entry.h" > +#include "inst_paravirt.h" > > #ifdef __IA64_ASM_PARAVIRTUALIZED_NATIVE > /* > @@ -29,7 +30,7 @@ > * Note that psr.ic is NOT turned on by this macro. This is so that > * we can pass interruption state as arguments to a handler. > */ > -#define DO_SAVE_MIN(__COVER,SAVE_IFS,EXTRA) > \ > +#define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA) > \ > mov r16=IA64_KR(CURRENT); /* M */ > \ > mov r27=ar.rsc; /* M */ > \ > mov r20=r1; /* A */ > \ > @@ -38,7 +39,7 @@ > mov r26=ar.pfs; /* I */ > \ > MOV_FROM_IIP(r28); /* M */ > \ > mov r21=ar.fpsr; /* M */ > \ > - __COVER; /* B;; (or nothing) */ > \ > + COVER; /* B;; (or nothing) */ > \ > ;; > \ > adds r16=IA64_TASK_THREAD_ON_USTACK_OFFSET,r16; > \ > ;; > \ > @@ -194,6 +195,6 @@ > st8 [r25]=r10; /* ar.ssd */ \ > ;; > > -#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov r30=cr.ifs,) > -#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov > r30=cr.ifs, mov r15=r19) > +#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(COVER, mov r30=cr.ifs,) > +#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(COVER, mov > r30=cr.ifs, mov r15=r19) > #define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, ) > diff --git a/arch/ia64/xen/xenivt.S b/arch/ia64/xen/xenivt.S > index 2d509f2..17987af 100644 > --- a/arch/ia64/xen/xenivt.S > +++ b/arch/ia64/xen/xenivt.S > @@ -13,9 +13,8 @@ > #include <asm/kregs.h> > #include <asm/pgtable.h> > > -#include <asm/xen/inst.h> > -#include <asm/xen/minstate.h> > #include "../kernel/minstate.h" > +#include <asm/xen/minstate.h> > > .section .text,"ax" > GLOBAL_ENTRY(xen_event_callback) > diff --git a/include/asm-ia64/xen/inst.h b/include/asm-ia64/xen/inst.h > index a8fb2ac..1e92d02 100644 > --- a/include/asm-ia64/xen/inst.h > +++ b/include/asm-ia64/xen/inst.h > @@ -414,10 +414,10 @@ > movl r30 = XSI_B1NAT; \ > ;; \ > ld8 r30 = [r30]; \ > + mov r31 = 1; \ > ;; \ > mov ar.unat = r30; \ > movl r30 = XSI_BANKNUM; \ > - mov r31 = 1; \ > ;; \ > st4 [r30] = r31; \ > movl r30 = XSI_BANK1_R16; \ > diff --git a/include/asm-ia64/xen/minstate.h > b/include/asm-ia64/xen/minstate.h > index 67bbf79..7cdebc2 100644 > --- a/include/asm-ia64/xen/minstate.h > +++ b/include/asm-ia64/xen/minstate.h > @@ -25,17 +25,16 @@ > * Note that psr.ic is NOT turned on by this macro. This is so that > * we can pass interruption state as arguments to a handler. > */ > -#define DO_SAVE_MIN(__COVER,SAVE_IFS,EXTRA) > \ > +#define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA) > \ > mov r16=IA64_KR(CURRENT); /* M */ > \ > mov r27=ar.rsc; /* M */ > \ > mov r20=r1; /* A */ > \ > mov r25=ar.unat; /* M */ > \ > MOV_FROM_IPSR(r29); /* M */ > \ > - mov r26=ar.pfs; /* I */ > \ > MOV_FROM_IIP(r28); /* M */ > \ > mov r21=ar.fpsr; /* M */ > \ > - __COVER; /* B;; (or nothing) */ > \ > - ;; > \ > + mov r26=ar.pfs; /* I */ > \ > + COVER; /* B;; (or nothing) */ > \ > adds r16=IA64_TASK_THREAD_ON_USTACK_OFFSET,r16; > \ > ;; > \ > ld1 r17=[r16]; /* load > current->thread.on_ustack flag */ \ > @@ -80,17 +79,17 @@ > .mem.offset 8,0; st8.spill [r17]=r9,16; > \ > ;; > \ > .mem.offset 0,0; st8.spill [r16]=r10,24; > \ > + movl r8=XSI_PRECOVER_IFS; > \ > .mem.offset 8,0; st8.spill [r17]=r11,24; > \ > ;; > \ > /* xen special handling for possibly lazy cover */ > \ > /* XXX: SAVE_MIN case in dispatch_ia32_handler: mov r30=r0 */ > \ > - movl r8=XSI_PRECOVER_IFS; > \ > ;; > \ > ld8 r30=[r8]; > \ > - ;; > \ > +(pUStk) sub r18=r18,r22; /* r18=RSE.ndirty*8 */ > \ > st8 [r16]=r28,16; /* save cr.iip */ > \ > + ;; \ > st8 [r17]=r30,16; /* save cr.ifs */ > \ > -(pUStk) sub r18=r18,r22; /* r18=RSE.ndirty*8 */ > \ > mov r8=ar.ccv; > \ > mov r9=ar.csd; > \ > mov r10=ar.ssd; > \ > @@ -131,7 +130,5 @@ > adds r2=IA64_PT_REGS_R16_OFFSET,r1; > \ > ;; > \ > movl r1=__gp; /* establish kernel global pointer */ > \ > - ;; > \ > - /*bsw.1;*/ /* switch back to bank 1 (must be last > in insn group) */ \ > ;; > #endif /* __IA64_ASM_PARAVIRTUALIZED_XEN */ > _______________________________________________ > Xen-ia64-devel mailing list > Xen-ia64-devel@lists.xensource.com > http://lists.xensource.com/xen-ia64-devel -- yamahata _______________________________________________ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel