Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / asm-m32r / assembler.h
index e1dff9d..1a1aa17 100644 (file)
@@ -52,7 +52,7 @@
        or3     \reg, \reg, #low(\x)
        .endm
 
-#if !defined(CONFIG_CHIP_M32102)
+#if !(defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_M32104))
 #define STI(reg) STI_M reg
        .macro STI_M reg
        setpsw  #0x40       ->  nop
@@ -64,7 +64,7 @@
        clrpsw  #0x40       ->  nop
        ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1).
        .endm
-#else  /* CONFIG_CHIP_M32102 */
+#else  /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */
 #define STI(reg) STI_M reg
        .macro STI_M reg
        mvfc    \reg, psw
        push    r13
        mvfachi r13
        push    r13
+       ldi     r13, #0
+       push    r13             ; dummy push acc1h
+       push    r13             ; dummy push acc1l
 #else
 #error unknown isa configuration
 #endif
        pop     r13
        mvtaclo r13, a1
 #elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
+       pop     r13             ; dummy pop acc1h
+       pop     r13             ; dummy pop acc1l
        pop     r13
        mvtachi r13
        pop     r13
        and  \reg, sp
        .endm
 
-#if !defined(CONFIG_CHIP_M32102)
+#if !(defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_M32104))
        .macro  SWITCH_TO_KERNEL_STACK
        ; switch to kernel stack (spi)
        clrpsw  #0x80       ->  nop
        .endm
-#else  /* CONFIG_CHIP_M32102 */
+#else  /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */
        .macro  SWITCH_TO_KERNEL_STACK
        push    r0              ; save r0 for working
        mvfc    r0, psw
        .fillinsn
 2:
        .endm
-#endif /* CONFIG_CHIP_M32102 */
+#endif /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */
 
 #endif /* __ASSEMBLY__ */