diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2018-11-27 19:27:47 -0500 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2018-12-04 17:08:11 -0500 |
commit | cad6fade6e78030e60188da3f18090577daa9243 (patch) | |
tree | 4e2a429c4ba70161706227a3b195832201617ffd | |
parent | c066cc8af9de8f749d29f75ad8c1c37d565f32b7 (diff) |
xtensa: clean up WSR*/RSR*/get_sr/set_sr
WSR and RSR are too generic and collide with other macro definitions in
the kernel causing warnings in allmodconfig builds. Drop WSR and RSR
macros and WSR_* and RSR_* variants. Change get_sr and set_sr to
xtensa_get_sr and xtensa_set_sr. Fix up users.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
-rw-r--r-- | arch/xtensa/include/asm/coprocessor.h | 20 | ||||
-rw-r--r-- | arch/xtensa/include/asm/irqflags.h | 1 | ||||
-rw-r--r-- | arch/xtensa/include/asm/processor.h | 18 | ||||
-rw-r--r-- | arch/xtensa/include/asm/thread_info.h | 1 | ||||
-rw-r--r-- | arch/xtensa/include/asm/timex.h | 18 | ||||
-rw-r--r-- | arch/xtensa/kernel/hw_breakpoint.c | 21 | ||||
-rw-r--r-- | arch/xtensa/kernel/process.c | 8 | ||||
-rw-r--r-- | arch/xtensa/kernel/setup.c | 8 | ||||
-rw-r--r-- | arch/xtensa/kernel/traps.c | 8 | ||||
-rw-r--r-- | drivers/irqchip/irq-xtensa-mx.c | 10 | ||||
-rw-r--r-- | drivers/irqchip/irq-xtensa-pic.c | 8 |
11 files changed, 51 insertions, 70 deletions
diff --git a/arch/xtensa/include/asm/coprocessor.h b/arch/xtensa/include/asm/coprocessor.h index eafe986a0246..6712929a27c9 100644 --- a/arch/xtensa/include/asm/coprocessor.h +++ b/arch/xtensa/include/asm/coprocessor.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #ifndef _XTENSA_COPROCESSOR_H | 12 | #ifndef _XTENSA_COPROCESSOR_H |
13 | #define _XTENSA_COPROCESSOR_H | 13 | #define _XTENSA_COPROCESSOR_H |
14 | 14 | ||
15 | #include <linux/stringify.h> | ||
16 | #include <variant/core.h> | 15 | #include <variant/core.h> |
17 | #include <variant/tie.h> | 16 | #include <variant/tie.h> |
18 | #include <asm/types.h> | 17 | #include <asm/types.h> |
@@ -90,19 +89,6 @@ | |||
90 | 89 | ||
91 | #ifndef __ASSEMBLY__ | 90 | #ifndef __ASSEMBLY__ |
92 | 91 | ||
93 | |||
94 | #if XCHAL_HAVE_CP | ||
95 | |||
96 | #define RSR_CPENABLE(x) do { \ | ||
97 | __asm__ __volatile__("rsr %0, cpenable" : "=a" (x)); \ | ||
98 | } while(0); | ||
99 | #define WSR_CPENABLE(x) do { \ | ||
100 | __asm__ __volatile__("wsr %0, cpenable; rsync" :: "a" (x)); \ | ||
101 | } while(0); | ||
102 | |||
103 | #endif /* XCHAL_HAVE_CP */ | ||
104 | |||
105 | |||
106 | /* | 92 | /* |
107 | * Additional registers. | 93 | * Additional registers. |
108 | * We define three types of additional registers: | 94 | * We define three types of additional registers: |
@@ -162,12 +148,6 @@ extern void coprocessor_flush(struct thread_info*, int); | |||
162 | extern void coprocessor_release_all(struct thread_info*); | 148 | extern void coprocessor_release_all(struct thread_info*); |
163 | extern void coprocessor_flush_all(struct thread_info*); | 149 | extern void coprocessor_flush_all(struct thread_info*); |
164 | 150 | ||
165 | static inline void coprocessor_clear_cpenable(void) | ||
166 | { | ||
167 | unsigned long i = 0; | ||
168 | WSR_CPENABLE(i); | ||
169 | } | ||
170 | |||
171 | #endif /* XTENSA_HAVE_COPROCESSORS */ | 151 | #endif /* XTENSA_HAVE_COPROCESSORS */ |
172 | 152 | ||
173 | #endif /* !__ASSEMBLY__ */ | 153 | #endif /* !__ASSEMBLY__ */ |
diff --git a/arch/xtensa/include/asm/irqflags.h b/arch/xtensa/include/asm/irqflags.h index 407606e576f8..9b5e8526afe5 100644 --- a/arch/xtensa/include/asm/irqflags.h +++ b/arch/xtensa/include/asm/irqflags.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef _XTENSA_IRQFLAGS_H | 12 | #ifndef _XTENSA_IRQFLAGS_H |
13 | #define _XTENSA_IRQFLAGS_H | 13 | #define _XTENSA_IRQFLAGS_H |
14 | 14 | ||
15 | #include <linux/stringify.h> | ||
15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
16 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
17 | 18 | ||
diff --git a/arch/xtensa/include/asm/processor.h b/arch/xtensa/include/asm/processor.h index 34a23016dd14..f7dd895b2353 100644 --- a/arch/xtensa/include/asm/processor.h +++ b/arch/xtensa/include/asm/processor.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <variant/core.h> | 13 | #include <variant/core.h> |
14 | 14 | ||
15 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
16 | #include <linux/stringify.h> | ||
16 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
17 | #include <asm/types.h> | 18 | #include <asm/types.h> |
18 | #include <asm/regs.h> | 19 | #include <asm/regs.h> |
@@ -212,11 +213,18 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
212 | 213 | ||
213 | /* Special register access. */ | 214 | /* Special register access. */ |
214 | 215 | ||
215 | #define WSR(v,sr) __asm__ __volatile__ ("wsr %0,"__stringify(sr) :: "a"(v)); | 216 | #define xtensa_set_sr(x, sr) \ |
216 | #define RSR(v,sr) __asm__ __volatile__ ("rsr %0,"__stringify(sr) : "=a"(v)); | 217 | ({ \ |
217 | 218 | unsigned int v = (unsigned int)(x); \ | |
218 | #define set_sr(x,sr) ({unsigned int v=(unsigned int)x; WSR(v,sr);}) | 219 | __asm__ __volatile__ ("wsr %0, "__stringify(sr) :: "a"(v)); \ |
219 | #define get_sr(sr) ({unsigned int v; RSR(v,sr); v; }) | 220 | }) |
221 | |||
222 | #define xtensa_get_sr(sr) \ | ||
223 | ({ \ | ||
224 | unsigned int v; \ | ||
225 | __asm__ __volatile__ ("rsr %0, "__stringify(sr) : "=a"(v)); \ | ||
226 | v; \ | ||
227 | }) | ||
220 | 228 | ||
221 | #ifndef XCHAL_HAVE_EXTERN_REGS | 229 | #ifndef XCHAL_HAVE_EXTERN_REGS |
222 | #define XCHAL_HAVE_EXTERN_REGS 0 | 230 | #define XCHAL_HAVE_EXTERN_REGS 0 |
diff --git a/arch/xtensa/include/asm/thread_info.h b/arch/xtensa/include/asm/thread_info.h index 2bd19ae61e47..49aa7879afde 100644 --- a/arch/xtensa/include/asm/thread_info.h +++ b/arch/xtensa/include/asm/thread_info.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #ifndef _XTENSA_THREAD_INFO_H | 11 | #ifndef _XTENSA_THREAD_INFO_H |
12 | #define _XTENSA_THREAD_INFO_H | 12 | #define _XTENSA_THREAD_INFO_H |
13 | 13 | ||
14 | #include <linux/stringify.h> | ||
14 | #include <asm/kmem_layout.h> | 15 | #include <asm/kmem_layout.h> |
15 | 16 | ||
16 | #define CURRENT_SHIFT KERNEL_STACK_SHIFT | 17 | #define CURRENT_SHIFT KERNEL_STACK_SHIFT |
diff --git a/arch/xtensa/include/asm/timex.h b/arch/xtensa/include/asm/timex.h index f9b389d4e973..233ec75e60c6 100644 --- a/arch/xtensa/include/asm/timex.h +++ b/arch/xtensa/include/asm/timex.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #define _XTENSA_TIMEX_H | 10 | #define _XTENSA_TIMEX_H |
11 | 11 | ||
12 | #include <asm/processor.h> | 12 | #include <asm/processor.h> |
13 | #include <linux/stringify.h> | ||
14 | 13 | ||
15 | #if XCHAL_NUM_TIMERS > 0 && \ | 14 | #if XCHAL_NUM_TIMERS > 0 && \ |
16 | XTENSA_INT_LEVEL(XCHAL_TIMER0_INTERRUPT) <= XCHAL_EXCM_LEVEL | 15 | XTENSA_INT_LEVEL(XCHAL_TIMER0_INTERRUPT) <= XCHAL_EXCM_LEVEL |
@@ -40,33 +39,24 @@ void local_timer_setup(unsigned cpu); | |||
40 | * Register access. | 39 | * Register access. |
41 | */ | 40 | */ |
42 | 41 | ||
43 | #define WSR_CCOUNT(r) asm volatile ("wsr %0, ccount" :: "a" (r)) | ||
44 | #define RSR_CCOUNT(r) asm volatile ("rsr %0, ccount" : "=a" (r)) | ||
45 | #define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(SREG_CCOMPARE)"+"__stringify(x) :: "a"(r)) | ||
46 | #define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(SREG_CCOMPARE)"+"__stringify(x) : "=a"(r)) | ||
47 | |||
48 | static inline unsigned long get_ccount (void) | 42 | static inline unsigned long get_ccount (void) |
49 | { | 43 | { |
50 | unsigned long ccount; | 44 | return xtensa_get_sr(ccount); |
51 | RSR_CCOUNT(ccount); | ||
52 | return ccount; | ||
53 | } | 45 | } |
54 | 46 | ||
55 | static inline void set_ccount (unsigned long ccount) | 47 | static inline void set_ccount (unsigned long ccount) |
56 | { | 48 | { |
57 | WSR_CCOUNT(ccount); | 49 | xtensa_set_sr(ccount, ccount); |
58 | } | 50 | } |
59 | 51 | ||
60 | static inline unsigned long get_linux_timer (void) | 52 | static inline unsigned long get_linux_timer (void) |
61 | { | 53 | { |
62 | unsigned ccompare; | 54 | return xtensa_get_sr(SREG_CCOMPARE + LINUX_TIMER); |
63 | RSR_CCOMPARE(LINUX_TIMER, ccompare); | ||
64 | return ccompare; | ||
65 | } | 55 | } |
66 | 56 | ||
67 | static inline void set_linux_timer (unsigned long ccompare) | 57 | static inline void set_linux_timer (unsigned long ccompare) |
68 | { | 58 | { |
69 | WSR_CCOMPARE(LINUX_TIMER, ccompare); | 59 | xtensa_set_sr(ccompare, SREG_CCOMPARE + LINUX_TIMER); |
70 | } | 60 | } |
71 | 61 | ||
72 | #endif /* _XTENSA_TIMEX_H */ | 62 | #endif /* _XTENSA_TIMEX_H */ |
diff --git a/arch/xtensa/kernel/hw_breakpoint.c b/arch/xtensa/kernel/hw_breakpoint.c index c2e387c19cda..4f20416061fb 100644 --- a/arch/xtensa/kernel/hw_breakpoint.c +++ b/arch/xtensa/kernel/hw_breakpoint.c | |||
@@ -101,30 +101,30 @@ static void xtensa_wsr(unsigned long v, u8 sr) | |||
101 | switch (sr) { | 101 | switch (sr) { |
102 | #if XCHAL_NUM_IBREAK > 0 | 102 | #if XCHAL_NUM_IBREAK > 0 |
103 | case SREG_IBREAKA + 0: | 103 | case SREG_IBREAKA + 0: |
104 | WSR(v, SREG_IBREAKA + 0); | 104 | xtensa_set_sr(v, SREG_IBREAKA + 0); |
105 | break; | 105 | break; |
106 | #endif | 106 | #endif |
107 | #if XCHAL_NUM_IBREAK > 1 | 107 | #if XCHAL_NUM_IBREAK > 1 |
108 | case SREG_IBREAKA + 1: | 108 | case SREG_IBREAKA + 1: |
109 | WSR(v, SREG_IBREAKA + 1); | 109 | xtensa_set_sr(v, SREG_IBREAKA + 1); |
110 | break; | 110 | break; |
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | #if XCHAL_NUM_DBREAK > 0 | 113 | #if XCHAL_NUM_DBREAK > 0 |
114 | case SREG_DBREAKA + 0: | 114 | case SREG_DBREAKA + 0: |
115 | WSR(v, SREG_DBREAKA + 0); | 115 | xtensa_set_sr(v, SREG_DBREAKA + 0); |
116 | break; | 116 | break; |
117 | case SREG_DBREAKC + 0: | 117 | case SREG_DBREAKC + 0: |
118 | WSR(v, SREG_DBREAKC + 0); | 118 | xtensa_set_sr(v, SREG_DBREAKC + 0); |
119 | break; | 119 | break; |
120 | #endif | 120 | #endif |
121 | #if XCHAL_NUM_DBREAK > 1 | 121 | #if XCHAL_NUM_DBREAK > 1 |
122 | case SREG_DBREAKA + 1: | 122 | case SREG_DBREAKA + 1: |
123 | WSR(v, SREG_DBREAKA + 1); | 123 | xtensa_set_sr(v, SREG_DBREAKA + 1); |
124 | break; | 124 | break; |
125 | 125 | ||
126 | case SREG_DBREAKC + 1: | 126 | case SREG_DBREAKC + 1: |
127 | WSR(v, SREG_DBREAKC + 1); | 127 | xtensa_set_sr(v, SREG_DBREAKC + 1); |
128 | break; | 128 | break; |
129 | #endif | 129 | #endif |
130 | } | 130 | } |
@@ -150,8 +150,8 @@ static void set_ibreak_regs(int reg, struct perf_event *bp) | |||
150 | unsigned long ibreakenable; | 150 | unsigned long ibreakenable; |
151 | 151 | ||
152 | xtensa_wsr(info->address, SREG_IBREAKA + reg); | 152 | xtensa_wsr(info->address, SREG_IBREAKA + reg); |
153 | RSR(ibreakenable, SREG_IBREAKENABLE); | 153 | ibreakenable = xtensa_get_sr(SREG_IBREAKENABLE); |
154 | WSR(ibreakenable | (1 << reg), SREG_IBREAKENABLE); | 154 | xtensa_set_sr(ibreakenable | (1 << reg), SREG_IBREAKENABLE); |
155 | } | 155 | } |
156 | 156 | ||
157 | static void set_dbreak_regs(int reg, struct perf_event *bp) | 157 | static void set_dbreak_regs(int reg, struct perf_event *bp) |
@@ -214,8 +214,9 @@ void arch_uninstall_hw_breakpoint(struct perf_event *bp) | |||
214 | /* Breakpoint */ | 214 | /* Breakpoint */ |
215 | i = free_slot(this_cpu_ptr(bp_on_reg), XCHAL_NUM_IBREAK, bp); | 215 | i = free_slot(this_cpu_ptr(bp_on_reg), XCHAL_NUM_IBREAK, bp); |
216 | if (i >= 0) { | 216 | if (i >= 0) { |
217 | RSR(ibreakenable, SREG_IBREAKENABLE); | 217 | ibreakenable = xtensa_get_sr(SREG_IBREAKENABLE); |
218 | WSR(ibreakenable & ~(1 << i), SREG_IBREAKENABLE); | 218 | xtensa_set_sr(ibreakenable & ~(1 << i), |
219 | SREG_IBREAKENABLE); | ||
219 | } | 220 | } |
220 | } else { | 221 | } else { |
221 | /* Watchpoint */ | 222 | /* Watchpoint */ |
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index 4bb68133a72a..be9e0c3df9d2 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -87,7 +87,7 @@ void coprocessor_release_all(struct thread_info *ti) | |||
87 | } | 87 | } |
88 | 88 | ||
89 | ti->cpenable = cpenable; | 89 | ti->cpenable = cpenable; |
90 | coprocessor_clear_cpenable(); | 90 | xtensa_set_sr(0, cpenable); |
91 | 91 | ||
92 | preempt_enable(); | 92 | preempt_enable(); |
93 | } | 93 | } |
@@ -99,16 +99,16 @@ void coprocessor_flush_all(struct thread_info *ti) | |||
99 | 99 | ||
100 | preempt_disable(); | 100 | preempt_disable(); |
101 | 101 | ||
102 | RSR_CPENABLE(old_cpenable); | 102 | old_cpenable = xtensa_get_sr(cpenable); |
103 | cpenable = ti->cpenable; | 103 | cpenable = ti->cpenable; |
104 | WSR_CPENABLE(cpenable); | 104 | xtensa_set_sr(cpenable, cpenable); |
105 | 105 | ||
106 | for (i = 0; i < XCHAL_CP_MAX; i++) { | 106 | for (i = 0; i < XCHAL_CP_MAX; i++) { |
107 | if ((cpenable & 1) != 0 && coprocessor_owner[i] == ti) | 107 | if ((cpenable & 1) != 0 && coprocessor_owner[i] == ti) |
108 | coprocessor_flush(ti, i); | 108 | coprocessor_flush(ti, i); |
109 | cpenable >>= 1; | 109 | cpenable >>= 1; |
110 | } | 110 | } |
111 | WSR_CPENABLE(old_cpenable); | 111 | xtensa_set_sr(old_cpenable, cpenable); |
112 | 112 | ||
113 | preempt_enable(); | 113 | preempt_enable(); |
114 | } | 114 | } |
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 351283b60df6..4ec6fbb696bf 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c | |||
@@ -318,9 +318,9 @@ static inline int mem_reserve(unsigned long start, unsigned long end) | |||
318 | void __init setup_arch(char **cmdline_p) | 318 | void __init setup_arch(char **cmdline_p) |
319 | { | 319 | { |
320 | pr_info("config ID: %08x:%08x\n", | 320 | pr_info("config ID: %08x:%08x\n", |
321 | get_sr(SREG_EPC), get_sr(SREG_EXCSAVE)); | 321 | xtensa_get_sr(SREG_EPC), xtensa_get_sr(SREG_EXCSAVE)); |
322 | if (get_sr(SREG_EPC) != XCHAL_HW_CONFIGID0 || | 322 | if (xtensa_get_sr(SREG_EPC) != XCHAL_HW_CONFIGID0 || |
323 | get_sr(SREG_EXCSAVE) != XCHAL_HW_CONFIGID1) | 323 | xtensa_get_sr(SREG_EXCSAVE) != XCHAL_HW_CONFIGID1) |
324 | pr_info("built for config ID: %08x:%08x\n", | 324 | pr_info("built for config ID: %08x:%08x\n", |
325 | XCHAL_HW_CONFIGID0, XCHAL_HW_CONFIGID1); | 325 | XCHAL_HW_CONFIGID0, XCHAL_HW_CONFIGID1); |
326 | 326 | ||
@@ -596,7 +596,7 @@ c_show(struct seq_file *f, void *slot) | |||
596 | num_online_cpus(), | 596 | num_online_cpus(), |
597 | cpumask_pr_args(cpu_online_mask), | 597 | cpumask_pr_args(cpu_online_mask), |
598 | XCHAL_BUILD_UNIQUE_ID, | 598 | XCHAL_BUILD_UNIQUE_ID, |
599 | get_sr(SREG_EPC), get_sr(SREG_EXCSAVE), | 599 | xtensa_get_sr(SREG_EPC), xtensa_get_sr(SREG_EXCSAVE), |
600 | XCHAL_HAVE_BE ? "big" : "little", | 600 | XCHAL_HAVE_BE ? "big" : "little", |
601 | ccount_freq/1000000, | 601 | ccount_freq/1000000, |
602 | (ccount_freq/10000) % 100, | 602 | (ccount_freq/10000) % 100, |
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index 238399e22cdc..e6fa55aa1ccb 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c | |||
@@ -213,8 +213,8 @@ extern void do_IRQ(int, struct pt_regs *); | |||
213 | 213 | ||
214 | static inline void check_valid_nmi(void) | 214 | static inline void check_valid_nmi(void) |
215 | { | 215 | { |
216 | unsigned intread = get_sr(interrupt); | 216 | unsigned intread = xtensa_get_sr(interrupt); |
217 | unsigned intenable = get_sr(intenable); | 217 | unsigned intenable = xtensa_get_sr(intenable); |
218 | 218 | ||
219 | BUG_ON(intread & intenable & | 219 | BUG_ON(intread & intenable & |
220 | ~(XTENSA_INTLEVEL_ANDBELOW_MASK(PROFILING_INTLEVEL) ^ | 220 | ~(XTENSA_INTLEVEL_ANDBELOW_MASK(PROFILING_INTLEVEL) ^ |
@@ -271,8 +271,8 @@ void do_interrupt(struct pt_regs *regs) | |||
271 | irq_enter(); | 271 | irq_enter(); |
272 | 272 | ||
273 | for (;;) { | 273 | for (;;) { |
274 | unsigned intread = get_sr(interrupt); | 274 | unsigned intread = xtensa_get_sr(interrupt); |
275 | unsigned intenable = get_sr(intenable); | 275 | unsigned intenable = xtensa_get_sr(intenable); |
276 | unsigned int_at_level = intread & intenable; | 276 | unsigned int_at_level = intread & intenable; |
277 | unsigned level; | 277 | unsigned level; |
278 | 278 | ||
diff --git a/drivers/irqchip/irq-xtensa-mx.c b/drivers/irqchip/irq-xtensa-mx.c index e539500752d4..5385f5768345 100644 --- a/drivers/irqchip/irq-xtensa-mx.c +++ b/drivers/irqchip/irq-xtensa-mx.c | |||
@@ -62,7 +62,7 @@ void secondary_init_irq(void) | |||
62 | __this_cpu_write(cached_irq_mask, | 62 | __this_cpu_write(cached_irq_mask, |
63 | XCHAL_INTTYPE_MASK_EXTERN_EDGE | | 63 | XCHAL_INTTYPE_MASK_EXTERN_EDGE | |
64 | XCHAL_INTTYPE_MASK_EXTERN_LEVEL); | 64 | XCHAL_INTTYPE_MASK_EXTERN_LEVEL); |
65 | set_sr(XCHAL_INTTYPE_MASK_EXTERN_EDGE | | 65 | xtensa_set_sr(XCHAL_INTTYPE_MASK_EXTERN_EDGE | |
66 | XCHAL_INTTYPE_MASK_EXTERN_LEVEL, intenable); | 66 | XCHAL_INTTYPE_MASK_EXTERN_LEVEL, intenable); |
67 | } | 67 | } |
68 | 68 | ||
@@ -77,7 +77,7 @@ static void xtensa_mx_irq_mask(struct irq_data *d) | |||
77 | } else { | 77 | } else { |
78 | mask = __this_cpu_read(cached_irq_mask) & ~mask; | 78 | mask = __this_cpu_read(cached_irq_mask) & ~mask; |
79 | __this_cpu_write(cached_irq_mask, mask); | 79 | __this_cpu_write(cached_irq_mask, mask); |
80 | set_sr(mask, intenable); | 80 | xtensa_set_sr(mask, intenable); |
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
@@ -92,7 +92,7 @@ static void xtensa_mx_irq_unmask(struct irq_data *d) | |||
92 | } else { | 92 | } else { |
93 | mask |= __this_cpu_read(cached_irq_mask); | 93 | mask |= __this_cpu_read(cached_irq_mask); |
94 | __this_cpu_write(cached_irq_mask, mask); | 94 | __this_cpu_write(cached_irq_mask, mask); |
95 | set_sr(mask, intenable); | 95 | xtensa_set_sr(mask, intenable); |
96 | } | 96 | } |
97 | } | 97 | } |
98 | 98 | ||
@@ -108,12 +108,12 @@ static void xtensa_mx_irq_disable(struct irq_data *d) | |||
108 | 108 | ||
109 | static void xtensa_mx_irq_ack(struct irq_data *d) | 109 | static void xtensa_mx_irq_ack(struct irq_data *d) |
110 | { | 110 | { |
111 | set_sr(1 << d->hwirq, intclear); | 111 | xtensa_set_sr(1 << d->hwirq, intclear); |
112 | } | 112 | } |
113 | 113 | ||
114 | static int xtensa_mx_irq_retrigger(struct irq_data *d) | 114 | static int xtensa_mx_irq_retrigger(struct irq_data *d) |
115 | { | 115 | { |
116 | set_sr(1 << d->hwirq, intset); | 116 | xtensa_set_sr(1 << d->hwirq, intset); |
117 | return 1; | 117 | return 1; |
118 | } | 118 | } |
119 | 119 | ||
diff --git a/drivers/irqchip/irq-xtensa-pic.c b/drivers/irqchip/irq-xtensa-pic.c index 000cb5462bcf..c200234dd2c9 100644 --- a/drivers/irqchip/irq-xtensa-pic.c +++ b/drivers/irqchip/irq-xtensa-pic.c | |||
@@ -44,13 +44,13 @@ static const struct irq_domain_ops xtensa_irq_domain_ops = { | |||
44 | static void xtensa_irq_mask(struct irq_data *d) | 44 | static void xtensa_irq_mask(struct irq_data *d) |
45 | { | 45 | { |
46 | cached_irq_mask &= ~(1 << d->hwirq); | 46 | cached_irq_mask &= ~(1 << d->hwirq); |
47 | set_sr(cached_irq_mask, intenable); | 47 | xtensa_set_sr(cached_irq_mask, intenable); |
48 | } | 48 | } |
49 | 49 | ||
50 | static void xtensa_irq_unmask(struct irq_data *d) | 50 | static void xtensa_irq_unmask(struct irq_data *d) |
51 | { | 51 | { |
52 | cached_irq_mask |= 1 << d->hwirq; | 52 | cached_irq_mask |= 1 << d->hwirq; |
53 | set_sr(cached_irq_mask, intenable); | 53 | xtensa_set_sr(cached_irq_mask, intenable); |
54 | } | 54 | } |
55 | 55 | ||
56 | static void xtensa_irq_enable(struct irq_data *d) | 56 | static void xtensa_irq_enable(struct irq_data *d) |
@@ -65,12 +65,12 @@ static void xtensa_irq_disable(struct irq_data *d) | |||
65 | 65 | ||
66 | static void xtensa_irq_ack(struct irq_data *d) | 66 | static void xtensa_irq_ack(struct irq_data *d) |
67 | { | 67 | { |
68 | set_sr(1 << d->hwirq, intclear); | 68 | xtensa_set_sr(1 << d->hwirq, intclear); |
69 | } | 69 | } |
70 | 70 | ||
71 | static int xtensa_irq_retrigger(struct irq_data *d) | 71 | static int xtensa_irq_retrigger(struct irq_data *d) |
72 | { | 72 | { |
73 | set_sr(1 << d->hwirq, intset); | 73 | xtensa_set_sr(1 << d->hwirq, intset); |
74 | return 1; | 74 | return 1; |
75 | } | 75 | } |
76 | 76 | ||