]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'xtensa/master'
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 5 Sep 2011 03:15:24 +0000 (13:15 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 5 Sep 2011 03:15:24 +0000 (13:15 +1000)
12 files changed:
arch/xtensa/include/asm/irqflags.h
arch/xtensa/include/asm/regs.h
arch/xtensa/include/asm/timex.h
arch/xtensa/include/asm/uaccess.h
arch/xtensa/kernel/align.S
arch/xtensa/kernel/coprocessor.S
arch/xtensa/kernel/entry.S
arch/xtensa/kernel/head.S
arch/xtensa/kernel/irq.c
arch/xtensa/kernel/traps.c
arch/xtensa/kernel/vectors.S
arch/xtensa/kernel/vmlinux.lds.S

index dae9a8bdcb1725ce6a38db642fdc777403d354e1..6015371be49e27281463556512d8318047a474a1 100644 (file)
@@ -12,6 +12,7 @@
 #define _XTENSA_IRQFLAGS_H
 
 #include <linux/types.h>
+#include <asm/processor.h>
 
 static inline unsigned long arch_local_save_flags(void)
 {
index d4baed246928085507a76a5acff71156537bdb69..f30b8bc59516a43a1dc0ed3a214a254fb873fb51 100644 (file)
 #ifndef _XTENSA_REGS_H
 #define _XTENSA_REGS_H
 
-/*  Special registers.  */
-
-#define LBEG           0
-#define LEND           1
-#define LCOUNT         2
-#define SAR            3
-#define BR             4
-#define SCOMPARE1      12
-#define ACCHI          16
-#define ACCLO          17
-#define MR             32
-#define WINDOWBASE     72
-#define WINDOWSTART    73
-#define PTEVADDR       83
-#define RASID          90
-#define ITLBCFG                91
-#define DTLBCFG                92
-#define IBREAKENABLE   96
-#define DDR            104
-#define IBREAKA                128
-#define DBREAKA                144
-#define DBREAKC                160
-#define EPC            176
-#define EPC_1          177
-#define DEPC           192
-#define EPS            192
-#define EPS_1          193
-#define EXCSAVE                208
-#define EXCSAVE_1      209
-#define INTERRUPT      226
-#define INTENABLE      228
-#define PS             230
-#define THREADPTR      231
-#define EXCCAUSE       232
-#define DEBUGCAUSE     233
-#define CCOUNT         234
-#define PRID           235
-#define ICOUNT         236
-#define ICOUNTLEVEL    237
-#define EXCVADDR       238
-#define CCOMPARE       240
-#define MISC           244
+/* Special register numbers
+ *
+ * LBEG                0
+ * LEND                1
+ * LCOUNT      2
+ * SAR         3
+ * BR          4
+ * SCOMPARE1   12
+ * ACCHI       16
+ * ACCLO       17
+ * MR          32
+ * WINDOWBASE  72
+ * WINDOWSTART 73
+ * PTEVADDR    83
+ * RASID       90
+ * ITLBCFG     91
+ * DTLBCFG     92
+ * IBREAKENABLE        96
+ * DDR         104
+ * IBREAKA     128
+ * DBREAKA     144
+ * DBREAKC     160
+ * EPC         176
+ * EPC1                177
+ * DEPC                192
+ * EPS         192
+ * EPS1                193
+ * EXCSAVE     208
+ * EXCSAVE1    209
+ * INTERRUPT   226
+ * INTENABLE   228
+ * PS          230
+ * THREADPTR   231
+ * EXCCAUSE    232
+ * DEBUGCAUSE  233
+ * CCOUNT      234
+ * PRID                235
+ * ICOUNT      236
+ * ICOUNTLEVEL 237
+ * EXCVADDR    238
+ * CCOMPARE    240
+ * MISC                244
+ */
 
 /*  Special names for read-only and write-only interrupt registers.  */
 
 #define INTSET         226
 #define INTCLEAR       227
 
+#define XTREG_EPS(x)           (192+(x))
+#define XTREG_EPC(x)           (176+(x))
+#define XTREG_EXCSAVE(x)       (208+(x))
+#define XTREG_CCOMPARE(x)      (240+(x))
+#define XTREG_DBREAKC(x)       (160+(x))
+
 /*  EXCCAUSE register fields  */
 
 #define EXCCAUSE_EXCCAUSE_SHIFT        0
index 053bc42721067de7dbdf51fd50ab2b3c75b6dc27..5ec20e13a7746d1d3b334bde59c127f232d58f7f 100644 (file)
@@ -65,8 +65,8 @@ extern cycles_t cacheflush_time;
 
 #define WSR_CCOUNT(r)    asm volatile ("wsr %0,"__stringify(CCOUNT) :: "a" (r))
 #define RSR_CCOUNT(r)    asm volatile ("rsr %0,"__stringify(CCOUNT) : "=a" (r))
-#define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(CCOMPARE)"+"__stringify(x) :: "a"(r))
-#define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(CCOMPARE)"+"__stringify(x) : "=a"(r))
+#define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(XTREG_CCOMPARE(x)) :: "a"(r))
+#define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(XTREG_CCOMPARE(x)) : "=a"(r))
 
 static inline unsigned long get_ccount (void)
 {
index 3fa526fd3c9989a3b279e4720cbb03742739cb16..c9575763c15355e5026cbb1ac47d588ea2e2d506 100644 (file)
@@ -17,7 +17,6 @@
 #define _XTENSA_UACCESS_H
 
 #include <linux/errno.h>
-#include <linux/prefetch.h>
 #include <asm/types.h>
 
 #define VERIFY_READ    0
 #else /* __ASSEMBLY__ not defined */
 
 #include <linux/sched.h>
+#include <linux/prefetch.h>
 
 /*
  * The fs value determines whether argument validity checking should
index 33d6e9d2e83ca10ec0301689457727c27fb58ec7..26bf88337c226b030968b304799be3796cb2d659 100644 (file)
  *   a2:       new stack pointer, original in DEPC
  *   a3:       dispatch table
  *   depc:     a2, original value saved on stack (PT_DEPC)
- *   excsave_1:        a3
+ *   excsave1: a3
  *
  *   PT_DEPC >= VALID_DOUBLE_EXCEPTION_ADDRESS: double exception, DEPC
  *          <  VALID_DOUBLE_EXCEPTION_ADDRESS: regular exception
@@ -171,7 +171,7 @@ ENTRY(fast_unaligned)
        s32i    a8, a2, PT_AREG8
 
        rsr     a0, DEPC
-       xsr     a3, EXCSAVE_1
+       xsr     a3, EXCSAVE1
        s32i    a0, a2, PT_AREG2
        s32i    a3, a2, PT_AREG3
 
@@ -184,7 +184,7 @@ ENTRY(fast_unaligned)
         *
         * The only possible danger of a double exception on the
         * following l32i instructions is kernel code in vmalloc
-        * memory. The processor was just executing at the EPC_1
+        * memory. The processor was just executing at the EPC1
         * address, and indeed, already fetched the instruction.  That
         * guarantees a TLB mapping, which hasn't been replaced by
         * this unaligned exception handler that uses only static TLB
@@ -197,7 +197,7 @@ ENTRY(fast_unaligned)
 
        /* Extract the instruction that caused the unaligned access. */
 
-       rsr     a7, EPC_1       # load exception address
+       rsr     a7, EPC       # load exception address
        movi    a3, ~3
        and     a3, a3, a7      # mask lower bits
 
@@ -284,7 +284,7 @@ ENTRY(fast_unaligned)
        wsr     a5, LCOUNT
 #endif
 
-1:     wsr     a7, EPC_1               # skip load instruction
+1:     wsr     a7, EPC               # skip load instruction
        extui   a4, a4, INSN_T, 4       # extract target register
        movi    a5, .Lload_table
        addx8   a4, a4, a5
@@ -364,7 +364,7 @@ ENTRY(fast_unaligned)
        wsr     a4, LCOUNT
 #endif
 
-1:     wsr     a7, EPC_1               # skip store instruction
+1:     wsr     a7, EPC               # skip store instruction
        movi    a4, ~3
        and     a4, a4, a8              # align memory address
 
@@ -406,7 +406,7 @@ ENTRY(fast_unaligned)
 
 .Lexit:
        movi    a4, 0
-       rsr     a3, EXCSAVE_1
+       rsr     a3, EXCSAVE1
        s32i    a4, a3, EXC_TABLE_FIXUP
 
        /* Restore working register */
index 2bc1e145c0a46d66512826db3bcf41aa65d92491..095082f2555c3e66641619e5992e5f6277335242 100644 (file)
@@ -34,7 +34,7 @@
  *   a2:       new stack pointer, original in DEPC
  *   a3:       dispatch table
  *   depc:     a2, original value saved on stack (PT_DEPC)
- *   excsave_1:        a3
+ *   excsave1: a3
  *
  *   PT_DEPC >= VALID_DOUBLE_EXCEPTION_ADDRESS: double exception, DEPC
  *          <  VALID_DOUBLE_EXCEPTION_ADDRESS: regular exception
@@ -43,7 +43,7 @@
 /* IO protection is currently unsupported. */
 
 ENTRY(fast_io_protect)
-       wsr     a0, EXCSAVE_1
+       wsr     a0, EXCSAVE1
        movi    a0, unrecoverable_exception
        callx0  a0
 
@@ -213,14 +213,14 @@ ENTRY(coprocessor_restore)
  *   a2:       new stack pointer, original in DEPC
  *   a3:       dispatch table
  *   depc:     a2, original value saved on stack (PT_DEPC)
- *   excsave_1:        a3
+ *   excsave1: a3
  *
  *   PT_DEPC >= VALID_DOUBLE_EXCEPTION_ADDRESS: double exception, DEPC
  *          <  VALID_DOUBLE_EXCEPTION_ADDRESS: regular exception
  */
 
 ENTRY(fast_coprocessor_double)
-       wsr     a0, EXCSAVE_1
+       wsr     a0, EXCSAVE1
        movi    a0, unrecoverable_exception
        callx0  a0
 
@@ -229,7 +229,7 @@ ENTRY(fast_coprocessor)
 
        /* Save remaining registers a1-a3 and SAR */
 
-       xsr     a3, EXCSAVE_1
+       xsr     a3, EXCSAVE1
        s32i    a3, a2, PT_AREG3
        rsr     a3, SAR
        s32i    a1, a2, PT_AREG1
index 6223f3346b5c1015621418d7a535ada366478901..b0d23a141fba0757255f623fbad98ae0f3d88b4f 100644 (file)
 
 ENTRY(user_exception)
 
-       /* Save a2, a3, and depc, restore excsave_1 and set SP. */
+       /* Save a2, a3, and depc, restore excsave1 and set SP. */
 
-       xsr     a3, EXCSAVE_1
+       xsr     a3, EXCSAVE1
        rsr     a0, DEPC
        s32i    a1, a2, PT_AREG1
        s32i    a0, a2, PT_AREG2
@@ -234,7 +234,7 @@ _user_exception:
  *   a2:       new stack pointer, original in DEPC
  *   a3:       dispatch table
  *   depc:     a2, original value saved on stack (PT_DEPC)
- *   excsave_1:        a3
+ *   excsave1: a3
  *
  *   PT_DEPC >= VALID_DOUBLE_EXCEPTION_ADDRESS: double exception, DEPC
  *          <  VALID_DOUBLE_EXCEPTION_ADDRESS: regular exception
@@ -252,7 +252,7 @@ ENTRY(kernel_exception)
 
        /* Save a0, a2, a3, DEPC and set SP. */
 
-       xsr     a3, EXCSAVE_1           # restore a3, excsave_1
+       xsr     a3, EXCSAVE1            # restore a3, excsave1
        rsr     a0, DEPC                # get a2
        s32i    a1, a2, PT_AREG1
        s32i    a0, a2, PT_AREG2
@@ -324,7 +324,7 @@ common_exception:
        /* Save some registers, disable loops and clear the syscall flag. */
 
        rsr     a2, DEBUGCAUSE
-       rsr     a3, EPC_1
+       rsr     a3, EPC1
        s32i    a2, a1, PT_DEBUGCAUSE
        s32i    a3, a1, PT_PC
 
@@ -340,7 +340,7 @@ common_exception:
 
        rsr     a0, EXCCAUSE
        movi    a3, 0
-       rsr     a2, EXCSAVE_1
+       rsr     a2, EXCSAVE1
        s32i    a0, a1, PT_EXCCAUSE
        s32i    a3, a2, EXC_TABLE_FIXUP
 
@@ -604,7 +604,7 @@ common_exception_exit:
 
 1:     l32i    a2, a1, PT_PC
        l32i    a3, a1, PT_SAR
-       wsr     a2, EPC_1
+       wsr     a2, EPC1
        wsr     a3, SAR
 
        /* Restore LBEG, LEND, LCOUNT */
@@ -651,14 +651,14 @@ common_exception_exit:
 
 ENTRY(debug_exception)
 
-       rsr     a0, EPS + XCHAL_DEBUGLEVEL
+       rsr     a0, XTREG_EPS(XCHAL_DEBUGLEVEL)
        bbsi.l  a0, PS_EXCM_BIT, 1f     # exception mode
 
-       /* Set EPC_1 and EXCCAUSE */
+       /* Set EPC1 and EXCCAUSE */
 
        wsr     a2, DEPC                # save a2 temporarily
-       rsr     a2, EPC + XCHAL_DEBUGLEVEL
-       wsr     a2, EPC_1
+       rsr     a2, XTREG_EPC(XCHAL_DEBUGLEVEL)
+       wsr     a2, EPC1
 
        movi    a2, EXCCAUSE_MAPPED_DEBUG
        wsr     a2, EXCCAUSE
@@ -669,7 +669,7 @@ ENTRY(debug_exception)
        or      a2, a0, a2
        movi    a0, debug_exception     # restore a3, debug jump vector
        wsr     a2, PS
-       xsr     a0, EXCSAVE + XCHAL_DEBUGLEVEL
+       xsr     a0, XTREG_EXCSAVE(XCHAL_DEBUGLEVEL)
 
        /* Switch to kernel/user stack, restore jump vector, and save a0 */
 
@@ -686,7 +686,7 @@ ENTRY(debug_exception)
        mov     a1, a2
        j       _kernel_exception
 
-2:     rsr     a2, EXCSAVE_1
+2:     rsr     a2, EXCSAVE1
        l32i    a2, a2, EXC_TABLE_KSTK  # load kernel stack pointer
        s32i    a0, a2, PT_AREG0
        movi    a0, 0
@@ -772,7 +772,7 @@ ENTRY(unrecoverable_exception)
  *   a2:       new stack pointer, original in DEPC
  *   a3:       dispatch table
  *   depc:     a2, original value saved on stack (PT_DEPC)
- *   excsave_1:        a3
+ *   excsave1: a3
  *
  *   PT_DEPC >= VALID_DOUBLE_EXCEPTION_ADDRESS: double exception, DEPC
  *          <  VALID_DOUBLE_EXCEPTION_ADDRESS: regular exception
@@ -802,10 +802,10 @@ ENTRY(fast_alloca)
        movi    a0, 0
        s32i    a0, a3, EXC_TABLE_FIXUP
 
-       /* Restore a3, excsave_1 */
+       /* Restore a3, excsave1 */
 
-       xsr     a3, EXCSAVE_1           # make sure excsave_1 is valid for dbl.
-       rsr     a4, EPC_1               # get exception address
+       xsr     a3, EXCSAVE1            # make sure excsave1 is valid for dbl.
+       rsr     a4, EPC               # get exception address
        s32i    a3, a2, PT_AREG3        # save a3 to stack
 
 #ifdef ALLOCA_EXCEPTION_IN_IRAM
@@ -820,7 +820,7 @@ ENTRY(fast_alloca)
        jx      a3
 
 .Lunhandled_double:
-       wsr     a0, EXCSAVE_1
+       wsr     a0, EXCSAVE1
        movi    a0, unrecoverable_exception
        callx0  a0
 
@@ -852,7 +852,7 @@ ENTRY(fast_alloca)
 #endif
        addi    a4, a4, 3               # step over movsp
        _EXTUI_MOVSP_DST(a0)            # extract destination register
-       wsr     a4, EPC_1               # save new epc_1
+       wsr     a4, EPC1                # save new epc1
 
        _bnei   a0, 1, 1f               # no 'movsp a1, ax': jump
 
@@ -946,16 +946,16 @@ ENTRY(fast_alloca)
  *   a2:       new stack pointer, original in DEPC
  *   a3:       dispatch table
  *   depc:     a2, original value saved on stack (PT_DEPC)
- *   excsave_1:        a3
+ *   excsave1: a3
  */
 
 ENTRY(fast_syscall_kernel)
 
        /* Skip syscall. */
 
-       rsr     a0, EPC_1
+       rsr     a0, EPC1
        addi    a0, a0, 3
-       wsr     a0, EPC_1
+       wsr     a0, EPC1
 
        l32i    a0, a2, PT_DEPC
        bgeui   a0, VALID_DOUBLE_EXCEPTION_ADDRESS, fast_syscall_unrecoverable
@@ -970,9 +970,9 @@ ENTRY(fast_syscall_user)
 
        /* Skip syscall. */
 
-       rsr     a0, EPC_1
+       rsr     a0, EPC1
        addi    a0, a0, 3
-       wsr     a0, EPC_1
+       wsr     a0, EPC1
 
        l32i    a0, a2, PT_DEPC
        bgeui   a0, VALID_DOUBLE_EXCEPTION_ADDRESS, fast_syscall_unrecoverable
@@ -989,9 +989,9 @@ ENTRY(fast_syscall_unrecoverable)
 
         l32i    a0, a2, PT_AREG0        # restore a0
         xsr     a2, DEPC                # restore a2, depc
-        rsr     a3, EXCSAVE_1
+        rsr     a3, EXCSAVE1
 
-        wsr     a0, EXCSAVE_1
+        wsr     a0, EXCSAVE1
         movi    a0, unrecoverable_exception
         callx0  a0
 
@@ -1011,10 +1011,10 @@ ENTRY(fast_syscall_unrecoverable)
  *   a0:       a2 (syscall-nr), original value saved on stack (PT_AREG0)
  *   a1:       a1
  *   a2:       new stack pointer, original in a0 and DEPC
- *   a3:       dispatch table, original in excsave_1
+ *   a3:       dispatch table, original in excsave1
  *   a4..a15:  unchanged
  *   depc:     a2, original value saved on stack (PT_DEPC)
- *   excsave_1:        a3
+ *   excsave1: a3
  *
  *   PT_DEPC >= VALID_DOUBLE_EXCEPTION_ADDRESS: double exception, DEPC
  *          <  VALID_DOUBLE_EXCEPTION_ADDRESS: regular exception
@@ -1047,7 +1047,7 @@ ENTRY(fast_syscall_unrecoverable)
 
 ENTRY(fast_syscall_xtensa)
 
-       xsr     a3, EXCSAVE_1           # restore a3, excsave1
+       xsr     a3, EXCSAVE           # restore a3, excsave1
 
        s32i    a7, a2, PT_AREG7        # we need an additional register
        movi    a7, 4                   # sizeof(unsigned int)
@@ -1113,7 +1113,7 @@ CATCH
  *   a2:       new stack pointer, original in DEPC
  *   a3:       dispatch table
  *   depc:     a2, original value saved on stack (PT_DEPC)
- *   excsave_1:        a3
+ *   excsave1: a3
  *
  * Note: We assume the stack pointer is EXC_TABLE_KSTK in the fixup handler.
  */
@@ -1130,7 +1130,7 @@ ENTRY(fast_syscall_spill_registers)
        /* Save a3 and SAR on stack. */
 
        rsr     a0, SAR
-       xsr     a3, EXCSAVE_1           # restore a3 and excsave_1
+       xsr     a3, EXCSAVE1            # restore a3 and excsave1
        s32i    a3, a2, PT_AREG3
        s32i    a4, a2, PT_AREG4
        s32i    a0, a2, PT_AREG5        # store SAR to PT_AREG5
@@ -1182,7 +1182,7 @@ fast_syscall_spill_registers_fixup:
         * in WS, so that the exception handlers save them to the task stack.
         */
 
-       rsr     a3, EXCSAVE_1   # get spill-mask
+       rsr     a3, EXCSAVE   # get spill-mask
        slli    a2, a3, 1       # shift left by one
 
        slli    a3, a2, 32-WSBITS
@@ -1196,9 +1196,9 @@ fast_syscall_spill_registers_fixup:
        /* Return to the original (user task) WINDOWBASE.
         * We leave the following frame behind:
         * a0, a1, a2   same
-        * a3:          trashed (saved in excsave_1)
+        * a3:          trashed (saved in excsave1)
         * depc:        depc (we have to return to that address)
-        * excsave_1:   a3
+        * excsave1:    a3
         */
 
        wsr     a3, WINDOWBASE
@@ -1208,7 +1208,7 @@ fast_syscall_spill_registers_fixup:
         *  a0: return address
         *  a1: used, stack pointer
         *  a2: kernel stack pointer
-        *  a3: available, saved in EXCSAVE_1
+        *  a3: available, saved in EXCSAVE1
         *  depc: exception address
         *  excsave: a3
         * Note: This frame might be the same as above.
@@ -1240,7 +1240,7 @@ fast_syscall_spill_registers_fixup_return:
 
        /* Restore fixup handler. */
 
-       xsr     a3, EXCSAVE_1
+       xsr     a3, EXCSAVE1
        movi    a2, fast_syscall_spill_registers_fixup
        s32i    a2, a3, EXC_TABLE_FIXUP
        rsr     a2, WINDOWBASE
@@ -1257,7 +1257,7 @@ fast_syscall_spill_registers_fixup_return:
        /* Restore a3 and return. */
 
        movi    a3, exc_table
-       xsr     a3, EXCSAVE_1
+       xsr     a3, EXCSAVE1
 
        rfde
 
@@ -1447,7 +1447,7 @@ ENTRY(_spill_registers)
 
        movi    a3, exc_table
        l32i    a1, a3, EXC_TABLE_KSTK
-       wsr     a3, EXCSAVE_1
+       wsr     a3, EXCSAVE1
 
        movi    a4, (1 << PS_WOE_BIT) | 1
        wsr     a4, PS
@@ -1459,7 +1459,7 @@ ENTRY(_spill_registers)
 
 1:     /* Kernel space: PANIC! */
 
-       wsr     a0, EXCSAVE_1
+       wsr     a0, EXCSAVE1
        movi    a0, unrecoverable_exception
        callx0  a0              # should not return
 1:     j       1b
@@ -1489,7 +1489,7 @@ ENTRY(fast_second_level_miss_double_kernel)
  *   a2:       new stack pointer, original in DEPC
  *   a3:       dispatch table
  *   depc:     a2, original value saved on stack (PT_DEPC)
- *   excsave_1:        a3
+ *   excsave1: a3
  *
  *   PT_DEPC >= VALID_DOUBLE_EXCEPTION_ADDRESS: double exception, DEPC
  *          <  VALID_DOUBLE_EXCEPTION_ADDRESS: regular exception
@@ -1583,7 +1583,7 @@ ENTRY(fast_second_level_miss)
        l32i    a0, a2, PT_AREG0
        l32i    a1, a2, PT_AREG1
        l32i    a2, a2, PT_DEPC
-       xsr     a3, EXCSAVE_1
+       xsr     a3, EXCSAVE1
 
        bgeui   a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f
 
@@ -1618,7 +1618,7 @@ ENTRY(fast_second_level_miss)
        /* Make sure the exception originated in the special functions */
 
        movi    a0, __tlbtemp_mapping_start
-       rsr     a3, EPC_1
+       rsr     a3, EPC1
        bltu    a3, a0, 2f
        movi    a0, __tlbtemp_mapping_end
        bgeu    a3, a0, 2f
@@ -1635,7 +1635,7 @@ ENTRY(fast_second_level_miss)
        /* Check if we have to restore an ITLB mapping. */
 
        movi    a1, __tlbtemp_mapping_itlb
-       rsr     a3, EPC_1
+       rsr     a3, EPC1
        sub     a3, a3, a1
 
        /* Calculate VPN */
@@ -1672,7 +1672,7 @@ ENTRY(fast_second_level_miss)
 
        movi    a3, exc_table
        rsr     a1, DEPC
-       xsr     a3, EXCSAVE_1
+       xsr     a3, EXCSAVE1
        s32i    a1, a2, PT_AREG2
        s32i    a3, a2, PT_AREG3
        mov     a1, a2
@@ -1695,7 +1695,7 @@ ENTRY(fast_second_level_miss)
  *   a2:       new stack pointer, original in DEPC
  *   a3:       dispatch table
  *   depc:     a2, original value saved on stack (PT_DEPC)
- *   excsave_1:        a3
+ *   excsave1: a3
  *
  *   PT_DEPC >= VALID_DOUBLE_EXCEPTION_ADDRESS: double exception, DEPC
  *          <  VALID_DOUBLE_EXCEPTION_ADDRESS: regular exception
@@ -1749,7 +1749,7 @@ ENTRY(fast_store_prohibited)
 
        /* Restore excsave1 and a3. */
 
-       xsr     a3, EXCSAVE_1
+       xsr     a3, EXCSAVE1
        bgeui   a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f
 
        rsr     a2, DEPC
@@ -1767,7 +1767,7 @@ ENTRY(fast_store_prohibited)
 2:     /* If there was a problem, handle fault in C */
 
        rsr     a4, DEPC        # still holds a2
-       xsr     a3, EXCSAVE_1
+       xsr     a3, EXCSAVE1
        s32i    a4, a2, PT_AREG2
        s32i    a3, a2, PT_AREG3
        l32i    a4, a2, PT_AREG4
@@ -1902,7 +1902,7 @@ ENTRY(_switch_to)
 
        movi    a14, (1 << PS_EXCM_BIT) | LOCKLEVEL
        xsr     a14, PS
-       rsr     a3, EXCSAVE_1
+       rsr     a3, EXCSAVE1
        rsync
        s32i    a3, a3, EXC_TABLE_FIXUP /* enter critical section */
 
@@ -1924,7 +1924,7 @@ ENTRY(_switch_to)
         *       we return from kernel space.
         */
 
-       rsr     a3, EXCSAVE_1           # exc_table
+       rsr     a3, EXCSAVE           # exc_table
        movi    a6, 0
        addi    a7, a5, PT_REGS_OFFSET
        s32i    a6, a3, EXC_TABLE_FIXUP
index 3ef91a73652d31bb943c4ca00949d05e270a8390..68648c3700fc5c144c6a48ace5ed9d8d5e9c3e33 100644 (file)
@@ -63,9 +63,9 @@ _startup:
        movi    a0, LOCKLEVEL
        wsr     a0, PS
 
-       /* Preserve the pointer to the boot parameter list in EXCSAVE_1 */
+       /* Preserve the pointer to the boot parameter list in EXCSAVE1 */
 
-       wsr     a2, EXCSAVE_1
+       wsr     a2, EXCSAVE1
 
        /* Start with a fresh windowbase and windowstart.  */
 
@@ -89,7 +89,7 @@ _startup:
 
        .set    _index, 0
        .rept   XCHAL_NUM_DBREAK - 1
-       wsr     a0, DBREAKC + _index
+       wsr     a0, XTREG_DBREAKC(_index)
        .set    _index, _index + 1
        .endr
 #endif
@@ -108,7 +108,7 @@ _startup:
 
        .set    _index, 0
        .rept   XCHAL_NUM_TIMERS - 1
-       wsr     a0, CCOMPARE + _index
+       wsr     a0, XTREG_CCOMPARE(_index)
        .set    _index, _index + 1
        .endr
 
@@ -212,12 +212,12 @@ _startup:
        /* Set up EXCSAVE[DEBUGLEVEL] to point to the Debug Exception Handler.*/
 
        movi    a2, debug_exception
-       wsr     a2, EXCSAVE + XCHAL_DEBUGLEVEL
+       wsr     a2, XTREG_EXCSAVE(XCHAL_DEBUGLEVEL)
 
        /* Set up EXCSAVE[1] to point to the exc_table. */
 
        movi    a6, exc_table
-       xsr     a6, EXCSAVE_1
+       xsr     a6, EXCSAVE1
 
        /* init_arch kick-starts the linux kernel */
 
index 4340ee076bd522f88229aae7f474ce4a59493a40..7ddc1af5807a56f3c8073841c04222d7a882f4d9 100644 (file)
 static unsigned int cached_irq_mask;
 
 atomic_t irq_err_count;
+void ack_bad_irq(unsigned int irq)
+{
+        atomic_inc(&irq_err_count);
+        printk(KERN_ERR "IRQ: spurious interrupt %d\n", irq);
+}
 
 /*
  * do_IRQ handles all normal device IRQ's (the special
index e64efac3b9db43e7383127ec56ee31030ec36ff3..14e0b402ecd76f921cae51a2b21284d871f766e0 100644 (file)
@@ -336,10 +336,10 @@ void __init trap_init(void)
                        set_handler (EXC_TABLE_FAST_KERNEL/4 + cause, handler);
        }
 
-       /* Initialize EXCSAVE_1 to hold the address of the exception table. */
+       /* Initialize EXCSAVE1 to hold the address of the exception table. */
 
        i = (unsigned long)exc_table;
-       __asm__ __volatile__("wsr  %0, "__stringify(EXCSAVE_1)"\n" : : "a" (i));
+       __asm__ __volatile__("wsr  %0, EXCSAVE1\n" : : "a" (i));
 }
 
 /*
index 70066e3582d0b878f427832f56d5f983fc5e11bb..5570ccb1d90100f592c5bd67084aac0cfbf3973d 100644 (file)
@@ -30,7 +30,7 @@
  *   a2:       new stack pointer, original value in depc
  *   a3:       dispatch table
  *   depc:     a2, original value saved on stack (PT_DEPC)
- *   excsave_1:        a3
+ *   excsave1: a3
  *
  * The value for PT_DEPC saved to stack also functions as a boolean to
  * indicate that the exception is either a double or a regular exception:
@@ -69,7 +69,7 @@
 
 ENTRY(_UserExceptionVector)
 
-       xsr     a3, EXCSAVE_1           # save a3 and get dispatch table
+       xsr     a3, EXCSAVE           # save a3 and get dispatch table
        wsr     a2, DEPC                # save a2
        l32i    a2, a3, EXC_TABLE_KSTK  # load kernel stack to a2
        s32i    a0, a2, PT_AREG0        # save a0 to ESF
@@ -93,7 +93,7 @@ ENTRY(_UserExceptionVector)
 
 ENTRY(_KernelExceptionVector)
 
-       xsr     a3, EXCSAVE_1           # save a3, and get dispatch table
+       xsr     a3, EXCSAVE           # save a3, and get dispatch table
        wsr     a2, DEPC                # save a2
        addi    a2, a1, -16-PT_SIZE     # adjust stack pointer
        s32i    a0, a2, PT_AREG0        # save a0 to ESF
@@ -126,7 +126,7 @@ ENTRY(_KernelExceptionVector)
  * processing occurs. Also in kernel mode, TLB misses can occur if accessing
  * vmalloc memory, possibly requiring repair in a double exception handler.
  *
- * The variable at TABLE_FIXUP offset from the pointer in EXCSAVE_1 doubles as
+ * The variable at TABLE_FIXUP offset from the pointer in EXCSAVE1 doubles as
  * a boolean variable and a pointer to a fixup routine. If the variable
  * EXC_TABLE_FIXUP is non-zero, this handler jumps to that address. A value of
  * zero indicates to use the default kernel/user exception handler.
@@ -167,7 +167,7 @@ ENTRY(_KernelExceptionVector)
  *     a2:        trashed, original value in EXC_TABLE_DOUBLE_A2
  *     a3:        exctable
  *     depc:      a0
- *     excsave_1: a3
+ *     excsave1: a3
  *
  *  - When the kernel enters the fixup handler, it still assumes it is in a
  *    critical section, so EXC_TABLE_FIXUP variable is set to exc_table.
@@ -189,7 +189,7 @@ ENTRY(_KernelExceptionVector)
  * All registers a0...a15 are unchanged from the last exception, except:
  *
  *     a0:        last address before we jumped to the unrecoverable_exception.
- *     excsave_1: a0
+ *     excsave1: a0
  *
  *
  * See the handle_alloca_user and spill_registers routines for example clients.
@@ -205,7 +205,7 @@ ENTRY(_DoubleExceptionVector)
 
        /* Deliberately destroy excsave (don't assume it's value was valid). */
 
-       wsr     a3, EXCSAVE_1           # save a3
+       wsr     a3, EXCSAVE           # save a3
 
        /* Check for kernel double exception (usually fatal). */
 
@@ -254,7 +254,7 @@ ENTRY(_DoubleExceptionVector)
        xsr     a2, DEPC                # save a2 and get stack pointer
        s32i    a0, a2, PT_AREG0
 
-       wsr     a3, EXCSAVE_1           # save a3
+       wsr     a3, EXCSAVE           # save a3
        movi    a3, exc_table
 
        rsr     a0, EXCCAUSE
@@ -331,8 +331,8 @@ ENTRY(_DoubleExceptionVector)
        xsr     a0, DEPC
 
 .Lunrecoverable:
-       rsr     a3, EXCSAVE_1
-       wsr     a0, EXCSAVE_1
+       rsr     a3, EXCSAVE1
+       wsr     a0, EXCSAVE1
        movi    a0, unrecoverable_exception
        callx0  a0
 
@@ -349,7 +349,7 @@ ENTRY(_DoubleExceptionVector)
        .section .DebugInterruptVector.text, "ax"
 
 ENTRY(_DebugInterruptVector)
-       xsr     a0, EXCSAVE + XCHAL_DEBUGLEVEL
+       xsr     a0, XTREG_EXCSAVE(XCHAL_DEBUGLEVEL)
        jx      a0
 
 
index 88ecea3facb4e8c81f507a667ed55feda6cfcb1a..6de5ec450862a2747be69d2e5a0eb4d9ce6e1782 100644 (file)
@@ -113,6 +113,7 @@ SECTIONS
   /* Data section */
 
   _fdata = .;
+  _sdata = .;
   RW_DATA_SECTION(XCHAL_ICACHE_LINESIZE, PAGE_SIZE, THREAD_SIZE)
   _edata = .;