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-ppc-devel

Re: [XenPPC] [pushed][ppc] Must check softirq conditions on return from

To: jimix@xxxxxxxxxxxxxx
Subject: Re: [XenPPC] [pushed][ppc] Must check softirq conditions on return from hcall.
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Wed, 29 Mar 2006 12:37:31 -0500
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 29 Mar 2006 17:38:44 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <E1FOeZF-0008I0-Qk@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
References: <E1FOeZF-0008I0-Qk@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
This patch simply repeats the code sequence for the hdec handler.
Some Janitorial work on this file will be necessary soon.
-JX
On Mar 29, 2006, at 12:34 PM, jimix@xxxxxxxxxxxxxx wrote:

changeset:   9667:910d71f2bf1b
tag:         tip
user:        jimix@xxxxxxxxxxxxxxxxxxxxx
date:        Wed Mar 29 12:33:40 2006 -0500
summary:     [ppc] Must check softirq conditions on return from hcall.

diff -r 06bc81089a95 -r 910d71f2bf1b xen/arch/ppc/ppc64/exceptions.S
--- a/xen/arch/ppc/ppc64/exceptions.S   Wed Mar 29 12:32:25 2006 -0500
+++ b/xen/arch/ppc/ppc64/exceptions.S   Wed Mar 29 12:33:40 2006 -0500
@@ -365,9 +365,33 @@ ex_hcall_continued:
mr r3, r1 /* pass pointer to cpu_user_regs */ subi r1, r1, STACK_FRAME_OVERHEAD /* make a "caller" stack frame */
     CALL_CFUNC r12
-
+ /* test for pending softirqs, and loop until there are no more. */
+hcall_test_all_events:
+    ld r3, PAREA_vcpu(r13)
+    lwz r3, VCPU_processor(r3)
+    LOADADDR r4, irq_stat
+    sldi r3, r3, IRQSTAT_shift
+    add r4, r3, r4
+    ld r5, IRQSTAT_pending(r4)
+    cmpldi r5, 0
+    beq hcall_out
+
+ /* we could use nonvolatile GPRs across do_softirq calls, but those are
+     * volatile across exceptions :( */
+    LOADADDR r6, ppc_do_softirq
+ mfmsr r3 /* we pass this MSR to _do_softirq so + * it can give it to us back without
+                                         * having to save it */
+    ori r8, r3, MSR_EE
+
+    mtmsrd r8                           /* enable interrupts */
+ CALL_CFUNC r6 /* process softirqs returns r3 */
+    mtmsrd r3                           /* disable interrupts */
+    b hcall_test_all_events                   /* look for more */
+hcall_out:     
addi r1, r1, STACK_FRAME_OVERHEAD /* restore stack to cpu_user_regs */
     b fast_resume
+

 ex_dec_continued:
     EXCEPTION_SAVE_STATE r1



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


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