diff options
author | Hirokazu Takata <takata@linux-m32r.org> | 2007-08-20 07:53:50 -0400 |
---|---|---|
committer | Hirokazu Takata <takata@linux-m32r.org> | 2007-09-05 22:10:56 -0400 |
commit | 7071b2914a540b43dfcad17f6892a8c115799d50 (patch) | |
tree | eeb059350e481a1cfab731cf1c7dc2dbb2743532 | |
parent | 33205613cd603fa4d80bb81464e60b909b7047e1 (diff) |
m32r: Rename STI/CLI macros
The names of STI and CLI macros were derived from i386 arch historically,
but their name are incomprehensible.
So, for easy to understand, rename these macros to ENABLE_INTERRUPTS
and DISABLE_INTERRUPTS, respectively.
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
-rw-r--r-- | arch/m32r/kernel/entry.S | 16 | ||||
-rw-r--r-- | include/asm-m32r/assembler.h | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index 42b08bfd46fe..d4eaa2fd1818 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S | |||
@@ -112,7 +112,7 @@ | |||
112 | #define nr_syscalls ((syscall_table_size)/4) | 112 | #define nr_syscalls ((syscall_table_size)/4) |
113 | 113 | ||
114 | #ifdef CONFIG_PREEMPT | 114 | #ifdef CONFIG_PREEMPT |
115 | #define preempt_stop(x) CLI(x) | 115 | #define preempt_stop(x) DISABLE_INTERRUPTS(x) |
116 | #else | 116 | #else |
117 | #define preempt_stop(x) | 117 | #define preempt_stop(x) |
118 | #define resume_kernel restore_all | 118 | #define resume_kernel restore_all |
@@ -144,7 +144,7 @@ ret_from_intr: | |||
144 | #endif | 144 | #endif |
145 | beqz r4, resume_kernel | 145 | beqz r4, resume_kernel |
146 | ENTRY(resume_userspace) | 146 | ENTRY(resume_userspace) |
147 | CLI(r4) ; make sure we don't miss an interrupt | 147 | DISABLE_INTERRUPTS(r4) ; make sure we don't miss an interrupt |
148 | ; setting need_resched or sigpending | 148 | ; setting need_resched or sigpending |
149 | ; between sampling and the iret | 149 | ; between sampling and the iret |
150 | GET_THREAD_INFO(r8) | 150 | GET_THREAD_INFO(r8) |
@@ -168,11 +168,11 @@ need_resched: | |||
168 | beqz r4, restore_all | 168 | beqz r4, restore_all |
169 | LDIMM (r4, PREEMPT_ACTIVE) | 169 | LDIMM (r4, PREEMPT_ACTIVE) |
170 | st r4, @(TI_PRE_COUNT, r8) | 170 | st r4, @(TI_PRE_COUNT, r8) |
171 | STI(r4) | 171 | ENABLE_INTERRUPTS(r4) |
172 | bl schedule | 172 | bl schedule |
173 | ldi r4, #0 | 173 | ldi r4, #0 |
174 | st r4, @(TI_PRE_COUNT, r8) | 174 | st r4, @(TI_PRE_COUNT, r8) |
175 | CLI(r4) | 175 | DISABLE_INTERRUPTS(r4) |
176 | bra need_resched | 176 | bra need_resched |
177 | #endif | 177 | #endif |
178 | 178 | ||
@@ -180,7 +180,7 @@ need_resched: | |||
180 | ENTRY(system_call) | 180 | ENTRY(system_call) |
181 | SWITCH_TO_KERNEL_STACK | 181 | SWITCH_TO_KERNEL_STACK |
182 | SAVE_ALL | 182 | SAVE_ALL |
183 | STI(r4) ; Enable interrupt | 183 | ENABLE_INTERRUPTS(r4) ; Enable interrupt |
184 | st sp, PTREGS(sp) ; implicit pt_regs parameter | 184 | st sp, PTREGS(sp) ; implicit pt_regs parameter |
185 | cmpui r7, #NR_syscalls | 185 | cmpui r7, #NR_syscalls |
186 | bnc syscall_badsys | 186 | bnc syscall_badsys |
@@ -198,7 +198,7 @@ syscall_call: | |||
198 | jl r7 ; execute system call | 198 | jl r7 ; execute system call |
199 | st r0, R0(sp) ; save the return value | 199 | st r0, R0(sp) ; save the return value |
200 | syscall_exit: | 200 | syscall_exit: |
201 | CLI(r4) ; make sure we don't miss an interrupt | 201 | DISABLE_INTERRUPTS(r4) ; make sure we don't miss an interrupt |
202 | ; setting need_resched or sigpending | 202 | ; setting need_resched or sigpending |
203 | ; between sampling and the iret | 203 | ; between sampling and the iret |
204 | ld r9, @(TI_FLAGS, r8) | 204 | ld r9, @(TI_FLAGS, r8) |
@@ -215,7 +215,7 @@ work_pending: | |||
215 | beqz r4, work_notifysig | 215 | beqz r4, work_notifysig |
216 | work_resched: | 216 | work_resched: |
217 | bl schedule | 217 | bl schedule |
218 | CLI(r4) ; make sure we don't miss an interrupt | 218 | DISABLE_INTERRUPTS(r4) ; make sure we don't miss an interrupt |
219 | ; setting need_resched or sigpending | 219 | ; setting need_resched or sigpending |
220 | ; between sampling and the iret | 220 | ; between sampling and the iret |
221 | ld r9, @(TI_FLAGS, r8) | 221 | ld r9, @(TI_FLAGS, r8) |
@@ -257,7 +257,7 @@ syscall_exit_work: | |||
257 | ld r9, @(TI_FLAGS, r8) | 257 | ld r9, @(TI_FLAGS, r8) |
258 | and3 r4, r9, #_TIF_SYSCALL_TRACE | 258 | and3 r4, r9, #_TIF_SYSCALL_TRACE |
259 | beqz r4, work_pending | 259 | beqz r4, work_pending |
260 | STI(r4) ; could let do_syscall_trace() call | 260 | ENABLE_INTERRUPTS(r4) ; could let do_syscall_trace() call |
261 | ; schedule() instead | 261 | ; schedule() instead |
262 | bl do_syscall_trace | 262 | bl do_syscall_trace |
263 | bra resume_userspace | 263 | bra resume_userspace |
diff --git a/include/asm-m32r/assembler.h b/include/asm-m32r/assembler.h index 47041d19d4a8..26351539b5ff 100644 --- a/include/asm-m32r/assembler.h +++ b/include/asm-m32r/assembler.h | |||
@@ -52,27 +52,27 @@ | |||
52 | .endm | 52 | .endm |
53 | 53 | ||
54 | #if !(defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_M32104)) | 54 | #if !(defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_M32104)) |
55 | #define STI(reg) STI_M reg | 55 | #define ENABLE_INTERRUPTS(reg) ENABLE_INTERRUPTS reg |
56 | .macro STI_M reg | 56 | .macro ENABLE_INTERRUPTS reg |
57 | setpsw #0x40 -> nop | 57 | setpsw #0x40 -> nop |
58 | ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1). | 58 | ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1). |
59 | .endm | 59 | .endm |
60 | 60 | ||
61 | #define CLI(reg) CLI_M reg | 61 | #define DISABLE_INTERRUPTS(reg) DISABLE_INTERRUPTS reg |
62 | .macro CLI_M reg | 62 | .macro DISABLE_INTERRUPTS reg |
63 | clrpsw #0x40 -> nop | 63 | clrpsw #0x40 -> nop |
64 | ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1). | 64 | ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1). |
65 | .endm | 65 | .endm |
66 | #else /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */ | 66 | #else /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */ |
67 | #define STI(reg) STI_M reg | 67 | #define ENABLE_INTERRUPTS(reg) ENABLE_INTERRUPTS reg |
68 | .macro STI_M reg | 68 | .macro ENABLE_INTERRUPTS reg |
69 | mvfc \reg, psw | 69 | mvfc \reg, psw |
70 | or3 \reg, \reg, #0x0040 | 70 | or3 \reg, \reg, #0x0040 |
71 | mvtc \reg, psw | 71 | mvtc \reg, psw |
72 | .endm | 72 | .endm |
73 | 73 | ||
74 | #define CLI(reg) CLI_M reg | 74 | #define DISABLE_INTERRUPTS(reg) DISABLE_INTERRUPTS reg |
75 | .macro CLI_M reg | 75 | .macro DISABLE_INTERRUPTS reg |
76 | mvfc \reg, psw | 76 | mvfc \reg, psw |
77 | and3 \reg, \reg, #0xffbf | 77 | and3 \reg, \reg, #0xffbf |
78 | mvtc \reg, psw | 78 | mvtc \reg, psw |