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

[Xen-ia64-devel] Fix the misaddressing issue in PERCPU DATA

To: "Magenheimer, Dan \(HP Labs Fort Collins\)" <dan.magenheimer@xxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] Fix the misaddressing issue in PERCPU DATA
From: "Dong, Eddie" <eddie.dong@xxxxxxxxx>
Date: Tue, 16 Aug 2005 13:54:42 +0800
Delivery-date: Tue, 16 Aug 2005 05:53:02 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcWiJv9u9L8NGJ+GR3WbMOPz8wSaRg==
Thread-topic: Fix the misaddressing issue in PERCPU DATA
Dan:
        Following patch is to fix the potential issue in low level code
addressing for PERCPU DATA. It is fortunately to be ok now as cpu_info
layout is in the beginning of PERCPU data.
        If you agree, I will put it into staging tree.
Eddie



# HG changeset patch
# User ydong@xxxxxxxxxxxxxxxxxxxxx
# Node ID 90c6abbd4a59fd90718f3b798c0ce75ba4d7445c
# Parent  8bd2dc2c653de47bd9ab07a748ed6cb60f112701
Remove misaddressing of cpu_info in PERCPU data

signed-off-by Eddie dong <eddie.dong@xxxxxxxxx>

diff -r 8bd2dc2c653d -r 90c6abbd4a59 xen/arch/ia64/hyperprivop.S
--- a/xen/arch/ia64/hyperprivop.S       Thu Aug 11 09:47:31 2005
+++ b/xen/arch/ia64/hyperprivop.S       Fri Aug 12 03:16:25 2005
@@ -306,7 +306,7 @@
        mov r28=IA64_TIMER_VECTOR;;
        cmp.ne p6,p0=r28,r30
 (p6)   br.cond.spnt.few rp;;
-       movl r20=(PERCPU_ADDR)+IA64_CPUINFO_ITM_NEXT_OFFSET;;
+       movl r20=THIS_CPU(cpu_info)+IA64_CPUINFO_ITM_NEXT_OFFSET;;
        ld8 r26=[r20];;
        mov r27=ar.itc;;
        adds r27=200,r27;;      // safety margin
@@ -1305,7 +1305,7 @@
        adds r21=1,r21;;
        st8 [r20]=r21;;
 #endif
-       movl r20=(PERCPU_ADDR)+IA64_CPUINFO_ITM_NEXT_OFFSET;;
+       movl r20=THIS_CPU(cpu_info)+IA64_CPUINFO_ITM_NEXT_OFFSET;;
        ld8 r21=[r20];;
        mov r20=IA64_KR(CURRENT);;
        adds r20=IA64_VCPU_DOMAIN_ITM_OFFSET,r20;;
diff -r 8bd2dc2c653d -r 90c6abbd4a59 xen/arch/ia64/ivt.S
--- a/xen/arch/ia64/ivt.S       Thu Aug 11 09:47:31 2005
+++ b/xen/arch/ia64/ivt.S       Fri Aug 12 03:16:25 2005
@@ -934,7 +934,7 @@
        // FIXME: this is a hack... use cpuinfo.ksoftirqd because its
        // not used anywhere else and we need a place to stash ivr and
        // there's no registers available unused by SAVE_MIN/REST
-       movl r29=(PERCPU_ADDR)+IA64_CPUINFO_KSOFTIRQD_OFFSET;;
+       movl r29=THIS_CPU(cpu_info)+IA64_CPUINFO_KSOFTIRQD_OFFSET;;
        st8 [r29]=r30;;
        movl r28=slow_interrupt;;
        mov r29=rp;;
@@ -954,7 +954,7 @@
        ;;
        alloc r14=ar.pfs,0,0,2,0 // must be first in an insn group
 #ifdef XEN
-       movl out0=(PERCPU_ADDR)+IA64_CPUINFO_KSOFTIRQD_OFFSET;;
+       movl out0=THIS_CPU(cpu_info)+IA64_CPUINFO_KSOFTIRQD_OFFSET;;
        ld8 out0=[out0];;
 #else
        mov out0=cr.ivr         // pass cr.ivr as first arg

Attachment: remove_kr_pre.patch
Description: remove_kr_pre.patch

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] Fix the misaddressing issue in PERCPU DATA, Dong, Eddie <=