WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [PATCH] Fix mca handler so as not to destroy ar(was: Re: [Xen-ia64-d

To: SUZUKI Kazuhiro <kaz@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] Fix mca handler so as not to destroy ar(was: Re: [Xen-ia64-devel] Re: mca handler)
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Mon, 28 Jul 2008 11:38:17 +0900
Cc: yutaka.ezaki@xxxxxxxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 27 Jul 2008 19:38:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20080725.174737.135665615.kaz@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20080717025446.GB25137%yamahata@xxxxxxxxxxxxx> <20080723.111057.45162041.kaz@xxxxxxxxxxxxxxxxxx> <20080725.174737.135665615.kaz@xxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Fri, Jul 25, 2008 at 05:47:37PM +0900, SUZUKI Kazuhiro wrote:
> diff -r 1970781956c7 xen/include/asm-ia64/linux-xen/asm/mca_asm.h
> --- a/xen/include/asm-ia64/linux-xen/asm/mca_asm.h    Wed Jul 23 12:10:20 
> 2008 +0900
> +++ b/xen/include/asm-ia64/linux-xen/asm/mca_asm.h    Thu Jul 24 11:08:11 
> 2008 +0900
> @@ -58,8 +58,35 @@
>  #endif
>  
>  #ifdef XEN
> +/*
> + * void set_per_cpu_data(*ret)
> + * {
> + *   int i;
> + *   for (i = 0; i < 64; i++) {
> + *     if (ia64_mca_tlb_list[i].cr_lid == ia64_getreg(_IA64_REG_CR_LID)) {
> + *       *ret = ia64_mca_tlb_list[i].percpu_paddr;
> + *       return;
> + *     }
> + *   }
> + *   while(1);       // Endless loop on error
> + * }
> + */
> +#define SET_PER_CPU_DATA(reg,_tmp1,_tmp2,_tmp3)      \
> +     LOAD_PHYSICAL(p0,reg,ia64_mca_tlb_list);;\
> +     mov _tmp1 = ar.lc;;                     \
> +     mov ar.lc = NR_CPUS-1;                  \
> +     mov _tmp2 = cr.lid;;                    \
> +10:  ld8 _tmp3 = [reg],16;;                  \
> +     cmp.ne p6, p7 = _tmp3, _tmp2;;          \
> +(p7) br.cond.dpnt 30f;;                      \
> +     br.cloop.sptk.few 10b;;                 \
> +20:  br 20b;;/* Endless loop on error */     \
> +30:  mov ar.lc = _tmp1;                      \
> +     adds reg = IA64_MCA_PERCPU_OFFSET-16, reg;;\
> +     ld8 reg = [reg]
> +
>  #define GET_THIS_PADDR(reg, var)             \
> -     mov     reg = IA64_KR(PER_CPU_DATA);;   \
> +     SET_PER_CPU_DATA(reg,r5,r6,r7);;        \
>       addl    reg = THIS_CPU(var) - PERCPU_ADDR, reg
>  #else
>  #define GET_THIS_PADDR(reg, var)             \

Please do not use magic number 16.
IA64_MCA_TLB_INFO_SIZE?

-- 
yamahata

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel