Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/include/arm32 - For consistency, use cpsr_all i...



details:   https://anonhg.NetBSD.org/src/rev/9cb0daff4145
branches:  trunk
changeset: 555847:9cb0daff4145
user:      scw <scw%NetBSD.org@localhost>
date:      Mon Dec 01 08:48:33 2003 +0000

description:
- For consistency, use cpsr_all instead of cpsr.
 - Make sure IRQs are enabled before handling ASTs.

diffstat:

 sys/arch/arm/include/arm32/frame.h |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r c8f577570dc4 -r 9cb0daff4145 sys/arch/arm/include/arm32/frame.h
--- a/sys/arch/arm/include/arm32/frame.h        Mon Dec 01 08:41:46 2003 +0000
+++ b/sys/arch/arm/include/arm32/frame.h        Mon Dec 01 08:48:33 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: frame.h,v 1.8 2003/11/14 16:57:28 scw Exp $    */
+/*     $NetBSD: frame.h,v 1.9 2003/12/01 08:48:33 scw Exp $    */
 
 /*
  * Copyright (c) 1994-1997 Mark Brinicombe.
@@ -199,11 +199,12 @@
  */
 #define        DO_AST_AND_RESTORE_ALIGNMENT_FAULTS                             \
        ldr     r0, [sp]                /* Get the SPSR from stack */   ;\
-       mrs     r4, cpsr                /* save CPSR */                 ;\
+       mrs     r4, cpsr_all            /* save CPSR */                 ;\
        and     r0, r0, #(PSR_MODE)     /* Returning to USR mode? */    ;\
        teq     r0, #(PSR_USR32_MODE)                                   ;\
        ldreq   r5, .Laflt_astpending                                   ;\
        bne     3f                      /* Nope, get out now */         ;\
+       bic     r4, r4, #(I32_bit)                                      ;\
 1:     orr     r0, r4, #(I32_bit)      /* Disable IRQs */              ;\
        msr     cpsr_all, r0                                            ;\
        ldr     r1, [r5]                /* Pending AST? */              ;\
@@ -238,11 +239,12 @@
 
 #define        DO_AST_AND_RESTORE_ALIGNMENT_FAULTS                             \
        ldr     r0, [sp]                /* Get the SPSR from stack */   ;\
-       mrs     r4, cpsr                /* save CPSR */                 ;\
+       mrs     r4, cpsr_all            /* save CPSR */                 ;\
        and     r0, r0, #(PSR_MODE)     /* Returning to USR mode? */    ;\
        teq     r0, #(PSR_USR32_MODE)                                   ;\
        ldreq   r5, .Laflt_astpending                                   ;\
        bne     2f                      /* Nope, get out now */         ;\
+       bic     r4, r4, #(I32_bit)                                      ;\
 1:     orr     r0, r4, #(I32_bit)      /* Disable IRQs */              ;\
        msr     cpsr_all, r0                                            ;\
        ldr     r1, [r5]                /* Pending AST? */              ;\



Home | Main Index | Thread Index | Old Index