hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/arc/include/asm/entry-compact.h
....@@ -1,10 +1,7 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2014-15 Synopsys, Inc. (www.synopsys.com)
34 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 as
7
- * published by the Free Software Foundation.
85 *
96 * Vineetg: March 2009 (Supporting 2 levels of Interrupts)
107 * Stack switching code can no longer reliably rely on the fact that
....@@ -35,10 +32,6 @@
3532 #include <asm/asm-offsets.h>
3633 #include <asm/irqflags-compact.h>
3734 #include <asm/thread_info.h> /* For THREAD_SIZE */
38
-
39
-#ifdef CONFIG_ARC_PLAT_EZNPS
40
-#include <plat/ctop.h>
41
-#endif
4235
4336 /*--------------------------------------------------------------
4437 * Switch to Kernel Mode stack if SP points to User Mode stack
....@@ -133,7 +126,7 @@
133126 * to be saved again on kernel mode stack, as part of pt_regs.
134127 *-------------------------------------------------------------*/
135128 .macro PROLOG_FREEUP_REG reg, mem
136
-#ifdef CONFIG_SMP
129
+#ifndef ARC_USE_SCRATCH_REG
137130 sr \reg, [ARC_REG_SCRATCH_DATA0]
138131 #else
139132 st \reg, [\mem]
....@@ -141,7 +134,7 @@
141134 .endm
142135
143136 .macro PROLOG_RESTORE_REG reg, mem
144
-#ifdef CONFIG_SMP
137
+#ifndef ARC_USE_SCRATCH_REG
145138 lr \reg, [ARC_REG_SCRATCH_DATA0]
146139 #else
147140 ld \reg, [\mem]
....@@ -192,14 +185,8 @@
192185 PUSHAX lp_start
193186 PUSHAX erbta
194187
195
-#ifdef CONFIG_ARC_PLAT_EZNPS
196
- .word CTOP_INST_SCHD_RW
197
- PUSHAX CTOP_AUX_GPA1
198
- PUSHAX CTOP_AUX_EFLAGS
199
-#endif
200
-
201
- lr r9, [ecr]
202
- st r9, [sp, PT_event] /* EV_Trap expects r9 to have ECR */
188
+ lr r10, [ecr]
189
+ st r10, [sp, PT_event] /* EV_Trap expects r10 to have ECR */
203190 .endm
204191
205192 /*--------------------------------------------------------------
....@@ -214,11 +201,6 @@
214201 * by hardware and that is not good.
215202 *-------------------------------------------------------------*/
216203 .macro EXCEPTION_EPILOGUE
217
-#ifdef CONFIG_ARC_PLAT_EZNPS
218
- .word CTOP_INST_SCHD_RW
219
- POPAX CTOP_AUX_EFLAGS
220
- POPAX CTOP_AUX_GPA1
221
-#endif
222204
223205 POPAX erbta
224206 POPAX lp_start
....@@ -281,11 +263,6 @@
281263 PUSHAX lp_start
282264 PUSHAX bta_l\LVL\()
283265
284
-#ifdef CONFIG_ARC_PLAT_EZNPS
285
- .word CTOP_INST_SCHD_RW
286
- PUSHAX CTOP_AUX_GPA1
287
- PUSHAX CTOP_AUX_EFLAGS
288
-#endif
289266 .endm
290267
291268 /*--------------------------------------------------------------
....@@ -298,11 +275,6 @@
298275 * by hardware and that is not good.
299276 *-------------------------------------------------------------*/
300277 .macro INTERRUPT_EPILOGUE LVL
301
-#ifdef CONFIG_ARC_PLAT_EZNPS
302
- .word CTOP_INST_SCHD_RW
303
- POPAX CTOP_AUX_EFLAGS
304
- POPAX CTOP_AUX_GPA1
305
-#endif
306278
307279 POPAX bta_l\LVL\()
308280 POPAX lp_start
....@@ -330,13 +302,11 @@
330302 bic \reg, sp, (THREAD_SIZE - 1)
331303 .endm
332304
333
-#ifndef CONFIG_ARC_PLAT_EZNPS
334305 /* Get CPU-ID of this core */
335306 .macro GET_CPU_ID reg
336307 lr \reg, [identity]
337308 lsr \reg, \reg, 8
338309 bmsk \reg, \reg, 7
339310 .endm
340
-#endif
341311
342312 #endif /* __ASM_ARC_ENTRY_COMPACT_H */