Skip to content

Commit a78c942

Browse files
arch/tile: parameterize system PLs to support KVM port
While not a port to KVM (yet), this change modifies the kernel to be able to build either at PL1 or at PL2 with a suitable config switch. Pushing up this change avoids handling branch merge issues going forward with the KVM work. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
1 parent bf65e44 commit a78c942

23 files changed

Lines changed: 338 additions & 132 deletions

‎arch/tile/Kconfig‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ config HVC_TILE
9696

9797
config TILE
9898
def_bool y
99+
select HAVE_KVM if !TILEGX
99100
select GENERIC_FIND_FIRST_BIT
100101
select GENERIC_FIND_NEXT_BIT
101102
select USE_GENERIC_SMP_HELPERS
@@ -314,6 +315,15 @@ config HARDWALL
314315
bool "Hardwall support to allow access to user dynamic network"
315316
default y
316317

318+
config KERNEL_PL
319+
int "Processor protection level for kernel"
320+
range 1 2
321+
default "1"
322+
---help---
323+
This setting determines the processor protection level the
324+
kernel will be built to run at. Generally you should use
325+
the default value here.
326+
317327
endmenu # Tilera-specific configuration
318328

319329
menu "Bus options"
@@ -354,3 +364,5 @@ source "security/Kconfig"
354364
source "crypto/Kconfig"
355365

356366
source "lib/Kconfig"
367+
368+
source "arch/tile/kvm/Kconfig"

‎arch/tile/Makefile‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ libs-y += $(LIBGCC_PATH)
5353
# See arch/tile/Kbuild for content of core part of the kernel
5454
core-y += arch/tile/
5555

56+
core-$(CONFIG_KVM) += arch/tile/kvm/
57+
5658
ifdef TILERA_ROOT
5759
INSTALL_PATH ?= $(TILERA_ROOT)/tile/boot
5860
endif

‎arch/tile/include/arch/spr_def.h‎

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,93 @@
1212
* more details.
1313
*/
1414

15+
/*
16+
* In addition to including the proper base SPR definition file, depending
17+
* on machine architecture, this file defines several macros which allow
18+
* kernel code to use protection-level dependent SPRs without worrying
19+
* about which PL it's running at. In these macros, the PL that the SPR
20+
* or interrupt number applies to is replaced by K.
21+
*/
22+
23+
#if CONFIG_KERNEL_PL != 1 && CONFIG_KERNEL_PL != 2
24+
#error CONFIG_KERNEL_PL must be 1 or 2
25+
#endif
26+
27+
/* Concatenate 4 strings. */
28+
#define __concat4(a, b, c, d) a ## b ## c ## d
29+
#define _concat4(a, b, c, d) __concat4(a, b, c, d)
30+
1531
#ifdef __tilegx__
1632
#include <arch/spr_def_64.h>
33+
34+
/* TILE-Gx dependent, protection-level dependent SPRs. */
35+
36+
#define SPR_INTERRUPT_MASK_K \
37+
_concat4(SPR_INTERRUPT_MASK_, CONFIG_KERNEL_PL,,)
38+
#define SPR_INTERRUPT_MASK_SET_K \
39+
_concat4(SPR_INTERRUPT_MASK_SET_, CONFIG_KERNEL_PL,,)
40+
#define SPR_INTERRUPT_MASK_RESET_K \
41+
_concat4(SPR_INTERRUPT_MASK_RESET_, CONFIG_KERNEL_PL,,)
42+
#define SPR_INTERRUPT_VECTOR_BASE_K \
43+
_concat4(SPR_INTERRUPT_VECTOR_BASE_, CONFIG_KERNEL_PL,,)
44+
45+
#define SPR_IPI_MASK_K \
46+
_concat4(SPR_IPI_MASK_, CONFIG_KERNEL_PL,,)
47+
#define SPR_IPI_MASK_RESET_K \
48+
_concat4(SPR_IPI_MASK_RESET_, CONFIG_KERNEL_PL,,)
49+
#define SPR_IPI_MASK_SET_K \
50+
_concat4(SPR_IPI_MASK_SET_, CONFIG_KERNEL_PL,,)
51+
#define SPR_IPI_EVENT_K \
52+
_concat4(SPR_IPI_EVENT_, CONFIG_KERNEL_PL,,)
53+
#define SPR_IPI_EVENT_RESET_K \
54+
_concat4(SPR_IPI_EVENT_RESET_, CONFIG_KERNEL_PL,,)
55+
#define SPR_IPI_MASK_SET_K \
56+
_concat4(SPR_IPI_MASK_SET_, CONFIG_KERNEL_PL,,)
57+
#define INT_IPI_K \
58+
_concat4(INT_IPI_, CONFIG_KERNEL_PL,,)
59+
60+
#define SPR_SINGLE_STEP_CONTROL_K \
61+
_concat4(SPR_SINGLE_STEP_CONTROL_, CONFIG_KERNEL_PL,,)
62+
#define SPR_SINGLE_STEP_EN_K_K \
63+
_concat4(SPR_SINGLE_STEP_EN_, CONFIG_KERNEL_PL, _, CONFIG_KERNEL_PL)
64+
#define INT_SINGLE_STEP_K \
65+
_concat4(INT_SINGLE_STEP_, CONFIG_KERNEL_PL,,)
66+
1767
#else
1868
#include <arch/spr_def_32.h>
69+
70+
/* TILEPro dependent, protection-level dependent SPRs. */
71+
72+
#define SPR_INTERRUPT_MASK_K_0 \
73+
_concat4(SPR_INTERRUPT_MASK_, CONFIG_KERNEL_PL, _0,)
74+
#define SPR_INTERRUPT_MASK_K_1 \
75+
_concat4(SPR_INTERRUPT_MASK_, CONFIG_KERNEL_PL, _1,)
76+
#define SPR_INTERRUPT_MASK_SET_K_0 \
77+
_concat4(SPR_INTERRUPT_MASK_SET_, CONFIG_KERNEL_PL, _0,)
78+
#define SPR_INTERRUPT_MASK_SET_K_1 \
79+
_concat4(SPR_INTERRUPT_MASK_SET_, CONFIG_KERNEL_PL, _1,)
80+
#define SPR_INTERRUPT_MASK_RESET_K_0 \
81+
_concat4(SPR_INTERRUPT_MASK_RESET_, CONFIG_KERNEL_PL, _0,)
82+
#define SPR_INTERRUPT_MASK_RESET_K_1 \
83+
_concat4(SPR_INTERRUPT_MASK_RESET_, CONFIG_KERNEL_PL, _1,)
84+
1985
#endif
86+
87+
/* Generic protection-level dependent SPRs. */
88+
89+
#define SPR_SYSTEM_SAVE_K_0 \
90+
_concat4(SPR_SYSTEM_SAVE_, CONFIG_KERNEL_PL, _0,)
91+
#define SPR_SYSTEM_SAVE_K_1 \
92+
_concat4(SPR_SYSTEM_SAVE_, CONFIG_KERNEL_PL, _1,)
93+
#define SPR_SYSTEM_SAVE_K_2 \
94+
_concat4(SPR_SYSTEM_SAVE_, CONFIG_KERNEL_PL, _2,)
95+
#define SPR_SYSTEM_SAVE_K_3 \
96+
_concat4(SPR_SYSTEM_SAVE_, CONFIG_KERNEL_PL, _3,)
97+
#define SPR_EX_CONTEXT_K_0 \
98+
_concat4(SPR_EX_CONTEXT_, CONFIG_KERNEL_PL, _0,)
99+
#define SPR_EX_CONTEXT_K_1 \
100+
_concat4(SPR_EX_CONTEXT_, CONFIG_KERNEL_PL, _1,)
101+
#define SPR_INTCTRL_K_STATUS \
102+
_concat4(SPR_INTCTRL_, CONFIG_KERNEL_PL, _STATUS,)
103+
#define INT_INTCTRL_K \
104+
_concat4(INT_INTCTRL_, CONFIG_KERNEL_PL,,)

‎arch/tile/include/arch/spr_def_32.h‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,58 +56,93 @@
5656
#define SPR_EX_CONTEXT_1_1__ICS_SHIFT 2
5757
#define SPR_EX_CONTEXT_1_1__ICS_RMASK 0x1
5858
#define SPR_EX_CONTEXT_1_1__ICS_MASK 0x4
59+
#define SPR_EX_CONTEXT_2_0 0x4605
60+
#define SPR_EX_CONTEXT_2_1 0x4606
61+
#define SPR_EX_CONTEXT_2_1__PL_SHIFT 0
62+
#define SPR_EX_CONTEXT_2_1__PL_RMASK 0x3
63+
#define SPR_EX_CONTEXT_2_1__PL_MASK 0x3
64+
#define SPR_EX_CONTEXT_2_1__ICS_SHIFT 2
65+
#define SPR_EX_CONTEXT_2_1__ICS_RMASK 0x1
66+
#define SPR_EX_CONTEXT_2_1__ICS_MASK 0x4
5967
#define SPR_FAIL 0x4e09
6068
#define SPR_INTCTRL_0_STATUS 0x4a07
6169
#define SPR_INTCTRL_1_STATUS 0x4807
70+
#define SPR_INTCTRL_2_STATUS 0x4607
6271
#define SPR_INTERRUPT_CRITICAL_SECTION 0x4e0a
6372
#define SPR_INTERRUPT_MASK_0_0 0x4a08
6473
#define SPR_INTERRUPT_MASK_0_1 0x4a09
6574
#define SPR_INTERRUPT_MASK_1_0 0x4809
6675
#define SPR_INTERRUPT_MASK_1_1 0x480a
76+
#define SPR_INTERRUPT_MASK_2_0 0x4608
77+
#define SPR_INTERRUPT_MASK_2_1 0x4609
6778
#define SPR_INTERRUPT_MASK_RESET_0_0 0x4a0a
6879
#define SPR_INTERRUPT_MASK_RESET_0_1 0x4a0b
6980
#define SPR_INTERRUPT_MASK_RESET_1_0 0x480b
7081
#define SPR_INTERRUPT_MASK_RESET_1_1 0x480c
82+
#define SPR_INTERRUPT_MASK_RESET_2_0 0x460a
83+
#define SPR_INTERRUPT_MASK_RESET_2_1 0x460b
7184
#define SPR_INTERRUPT_MASK_SET_0_0 0x4a0c
7285
#define SPR_INTERRUPT_MASK_SET_0_1 0x4a0d
7386
#define SPR_INTERRUPT_MASK_SET_1_0 0x480d
7487
#define SPR_INTERRUPT_MASK_SET_1_1 0x480e
88+
#define SPR_INTERRUPT_MASK_SET_2_0 0x460c
89+
#define SPR_INTERRUPT_MASK_SET_2_1 0x460d
7590
#define SPR_MPL_DMA_CPL_SET_0 0x5800
7691
#define SPR_MPL_DMA_CPL_SET_1 0x5801
92+
#define SPR_MPL_DMA_CPL_SET_2 0x5802
7793
#define SPR_MPL_DMA_NOTIFY_SET_0 0x3800
7894
#define SPR_MPL_DMA_NOTIFY_SET_1 0x3801
95+
#define SPR_MPL_DMA_NOTIFY_SET_2 0x3802
7996
#define SPR_MPL_INTCTRL_0_SET_0 0x4a00
8097
#define SPR_MPL_INTCTRL_0_SET_1 0x4a01
98+
#define SPR_MPL_INTCTRL_0_SET_2 0x4a02
8199
#define SPR_MPL_INTCTRL_1_SET_0 0x4800
82100
#define SPR_MPL_INTCTRL_1_SET_1 0x4801
101+
#define SPR_MPL_INTCTRL_1_SET_2 0x4802
102+
#define SPR_MPL_INTCTRL_2_SET_0 0x4600
103+
#define SPR_MPL_INTCTRL_2_SET_1 0x4601
104+
#define SPR_MPL_INTCTRL_2_SET_2 0x4602
83105
#define SPR_MPL_SN_ACCESS_SET_0 0x0800
84106
#define SPR_MPL_SN_ACCESS_SET_1 0x0801
107+
#define SPR_MPL_SN_ACCESS_SET_2 0x0802
85108
#define SPR_MPL_SN_CPL_SET_0 0x5a00
86109
#define SPR_MPL_SN_CPL_SET_1 0x5a01
110+
#define SPR_MPL_SN_CPL_SET_2 0x5a02
87111
#define SPR_MPL_SN_FIREWALL_SET_0 0x2c00
88112
#define SPR_MPL_SN_FIREWALL_SET_1 0x2c01
113+
#define SPR_MPL_SN_FIREWALL_SET_2 0x2c02
89114
#define SPR_MPL_SN_NOTIFY_SET_0 0x2a00
90115
#define SPR_MPL_SN_NOTIFY_SET_1 0x2a01
116+
#define SPR_MPL_SN_NOTIFY_SET_2 0x2a02
91117
#define SPR_MPL_UDN_ACCESS_SET_0 0x0c00
92118
#define SPR_MPL_UDN_ACCESS_SET_1 0x0c01
119+
#define SPR_MPL_UDN_ACCESS_SET_2 0x0c02
93120
#define SPR_MPL_UDN_AVAIL_SET_0 0x4000
94121
#define SPR_MPL_UDN_AVAIL_SET_1 0x4001
122+
#define SPR_MPL_UDN_AVAIL_SET_2 0x4002
95123
#define SPR_MPL_UDN_CA_SET_0 0x3c00
96124
#define SPR_MPL_UDN_CA_SET_1 0x3c01
125+
#define SPR_MPL_UDN_CA_SET_2 0x3c02
97126
#define SPR_MPL_UDN_COMPLETE_SET_0 0x1400
98127
#define SPR_MPL_UDN_COMPLETE_SET_1 0x1401
128+
#define SPR_MPL_UDN_COMPLETE_SET_2 0x1402
99129
#define SPR_MPL_UDN_FIREWALL_SET_0 0x3000
100130
#define SPR_MPL_UDN_FIREWALL_SET_1 0x3001
131+
#define SPR_MPL_UDN_FIREWALL_SET_2 0x3002
101132
#define SPR_MPL_UDN_REFILL_SET_0 0x1000
102133
#define SPR_MPL_UDN_REFILL_SET_1 0x1001
134+
#define SPR_MPL_UDN_REFILL_SET_2 0x1002
103135
#define SPR_MPL_UDN_TIMER_SET_0 0x3600
104136
#define SPR_MPL_UDN_TIMER_SET_1 0x3601
137+
#define SPR_MPL_UDN_TIMER_SET_2 0x3602
105138
#define SPR_MPL_WORLD_ACCESS_SET_0 0x4e00
106139
#define SPR_MPL_WORLD_ACCESS_SET_1 0x4e01
140+
#define SPR_MPL_WORLD_ACCESS_SET_2 0x4e02
107141
#define SPR_PASS 0x4e0b
108142
#define SPR_PERF_COUNT_0 0x4205
109143
#define SPR_PERF_COUNT_1 0x4206
110144
#define SPR_PERF_COUNT_CTL 0x4207
145+
#define SPR_PERF_COUNT_DN_CTL 0x4210
111146
#define SPR_PERF_COUNT_STS 0x4208
112147
#define SPR_PROC_STATUS 0x4f00
113148
#define SPR_SIM_CONTROL 0x4e0c
@@ -124,6 +159,10 @@
124159
#define SPR_SYSTEM_SAVE_1_1 0x4901
125160
#define SPR_SYSTEM_SAVE_1_2 0x4902
126161
#define SPR_SYSTEM_SAVE_1_3 0x4903
162+
#define SPR_SYSTEM_SAVE_2_0 0x4700
163+
#define SPR_SYSTEM_SAVE_2_1 0x4701
164+
#define SPR_SYSTEM_SAVE_2_2 0x4702
165+
#define SPR_SYSTEM_SAVE_2_3 0x4703
127166
#define SPR_TILE_COORD 0x4c17
128167
#define SPR_TILE_RTF_HWM 0x4e10
129168
#define SPR_TILE_TIMER_CONTROL 0x3205

‎arch/tile/include/asm/irqflags.h‎

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -47,53 +47,53 @@
4747
int __n = (n); \
4848
int __mask = 1 << (__n & 0x1f); \
4949
if (__n < 32) \
50-
__insn_mtspr(SPR_INTERRUPT_MASK_SET_1_0, __mask); \
50+
__insn_mtspr(SPR_INTERRUPT_MASK_SET_K_0, __mask); \
5151
else \
52-
__insn_mtspr(SPR_INTERRUPT_MASK_SET_1_1, __mask); \
52+
__insn_mtspr(SPR_INTERRUPT_MASK_SET_K_1, __mask); \
5353
} while (0)
5454
#define interrupt_mask_reset(n) do { \
5555
int __n = (n); \
5656
int __mask = 1 << (__n & 0x1f); \
5757
if (__n < 32) \
58-
__insn_mtspr(SPR_INTERRUPT_MASK_RESET_1_0, __mask); \
58+
__insn_mtspr(SPR_INTERRUPT_MASK_RESET_K_0, __mask); \
5959
else \
60-
__insn_mtspr(SPR_INTERRUPT_MASK_RESET_1_1, __mask); \
60+
__insn_mtspr(SPR_INTERRUPT_MASK_RESET_K_1, __mask); \
6161
} while (0)
6262
#define interrupt_mask_check(n) ({ \
6363
int __n = (n); \
6464
(((__n < 32) ? \
65-
__insn_mfspr(SPR_INTERRUPT_MASK_1_0) : \
66-
__insn_mfspr(SPR_INTERRUPT_MASK_1_1)) \
65+
__insn_mfspr(SPR_INTERRUPT_MASK_K_0) : \
66+
__insn_mfspr(SPR_INTERRUPT_MASK_K_1)) \
6767
>> (__n & 0x1f)) & 1; \
6868
})
6969
#define interrupt_mask_set_mask(mask) do { \
7070
unsigned long long __m = (mask); \
71-
__insn_mtspr(SPR_INTERRUPT_MASK_SET_1_0, (unsigned long)(__m)); \
72-
__insn_mtspr(SPR_INTERRUPT_MASK_SET_1_1, (unsigned long)(__m>>32)); \
71+
__insn_mtspr(SPR_INTERRUPT_MASK_SET_K_0, (unsigned long)(__m)); \
72+
__insn_mtspr(SPR_INTERRUPT_MASK_SET_K_1, (unsigned long)(__m>>32)); \
7373
} while (0)
7474
#define interrupt_mask_reset_mask(mask) do { \
7575
unsigned long long __m = (mask); \
76-
__insn_mtspr(SPR_INTERRUPT_MASK_RESET_1_0, (unsigned long)(__m)); \
77-
__insn_mtspr(SPR_INTERRUPT_MASK_RESET_1_1, (unsigned long)(__m>>32)); \
76+
__insn_mtspr(SPR_INTERRUPT_MASK_RESET_K_0, (unsigned long)(__m)); \
77+
__insn_mtspr(SPR_INTERRUPT_MASK_RESET_K_1, (unsigned long)(__m>>32)); \
7878
} while (0)
7979
#else
8080
#define interrupt_mask_set(n) \
81-
__insn_mtspr(SPR_INTERRUPT_MASK_SET_1, (1UL << (n)))
81+
__insn_mtspr(SPR_INTERRUPT_MASK_SET_K, (1UL << (n)))
8282
#define interrupt_mask_reset(n) \
83-
__insn_mtspr(SPR_INTERRUPT_MASK_RESET_1, (1UL << (n)))
83+
__insn_mtspr(SPR_INTERRUPT_MASK_RESET_K, (1UL << (n)))
8484
#define interrupt_mask_check(n) \
85-
((__insn_mfspr(SPR_INTERRUPT_MASK_1) >> (n)) & 1)
85+
((__insn_mfspr(SPR_INTERRUPT_MASK_K) >> (n)) & 1)
8686
#define interrupt_mask_set_mask(mask) \
87-
__insn_mtspr(SPR_INTERRUPT_MASK_SET_1, (mask))
87+
__insn_mtspr(SPR_INTERRUPT_MASK_SET_K, (mask))
8888
#define interrupt_mask_reset_mask(mask) \
89-
__insn_mtspr(SPR_INTERRUPT_MASK_RESET_1, (mask))
89+
__insn_mtspr(SPR_INTERRUPT_MASK_RESET_K, (mask))
9090
#endif
9191

9292
/*
9393
* The set of interrupts we want active if irqs are enabled.
9494
* Note that in particular, the tile timer interrupt comes and goes
9595
* from this set, since we have no other way to turn off the timer.
96-
* Likewise, INTCTRL_1 is removed and re-added during device
96+
* Likewise, INTCTRL_K is removed and re-added during device
9797
* interrupts, as is the the hardwall UDN_FIREWALL interrupt.
9898
* We use a low bit (MEM_ERROR) as our sentinel value and make sure it
9999
* is always claimed as an "active interrupt" so we can query that bit
@@ -168,33 +168,33 @@ DECLARE_PER_CPU(unsigned long long, interrupts_enabled_mask);
168168

169169
/* Return 0 or 1 to indicate whether interrupts are currently disabled. */
170170
#define IRQS_DISABLED(tmp) \
171-
mfspr tmp, INTERRUPT_MASK_1; \
171+
mfspr tmp, SPR_INTERRUPT_MASK_K; \
172172
andi tmp, tmp, 1
173173

174174
/* Load up a pointer to &interrupts_enabled_mask. */
175175
#define GET_INTERRUPTS_ENABLED_MASK_PTR(reg) \
176-
moveli reg, hw2_last(interrupts_enabled_mask); \
177-
shl16insli reg, reg, hw1(interrupts_enabled_mask); \
178-
shl16insli reg, reg, hw0(interrupts_enabled_mask); \
176+
moveli reg, hw2_last(interrupts_enabled_mask); \
177+
shl16insli reg, reg, hw1(interrupts_enabled_mask); \
178+
shl16insli reg, reg, hw0(interrupts_enabled_mask); \
179179
add reg, reg, tp
180180

181181
/* Disable interrupts. */
182182
#define IRQ_DISABLE(tmp0, tmp1) \
183183
moveli tmp0, hw2_last(LINUX_MASKABLE_INTERRUPTS); \
184184
shl16insli tmp0, tmp0, hw1(LINUX_MASKABLE_INTERRUPTS); \
185185
shl16insli tmp0, tmp0, hw0(LINUX_MASKABLE_INTERRUPTS); \
186-
mtspr INTERRUPT_MASK_SET_1, tmp0
186+
mtspr SPR_INTERRUPT_MASK_SET_K, tmp0
187187

188188
/* Disable ALL synchronous interrupts (used by NMI entry). */
189189
#define IRQ_DISABLE_ALL(tmp) \
190190
movei tmp, -1; \
191-
mtspr INTERRUPT_MASK_SET_1, tmp
191+
mtspr SPR_INTERRUPT_MASK_SET_K, tmp
192192

193193
/* Enable interrupts. */
194194
#define IRQ_ENABLE(tmp0, tmp1) \
195195
GET_INTERRUPTS_ENABLED_MASK_PTR(tmp0); \
196196
ld tmp0, tmp0; \
197-
mtspr INTERRUPT_MASK_RESET_1, tmp0
197+
mtspr SPR_INTERRUPT_MASK_RESET_K, tmp0
198198

199199
#else /* !__tilegx__ */
200200

@@ -208,14 +208,14 @@ DECLARE_PER_CPU(unsigned long long, interrupts_enabled_mask);
208208
* (making the original code's write of the "high" mask word idempotent).
209209
*/
210210
#define IRQS_DISABLED(tmp) \
211-
mfspr tmp, INTERRUPT_MASK_1_0; \
211+
mfspr tmp, SPR_INTERRUPT_MASK_K_0; \
212212
shri tmp, tmp, INT_MEM_ERROR; \
213213
andi tmp, tmp, 1
214214

215215
/* Load up a pointer to &interrupts_enabled_mask. */
216216
#define GET_INTERRUPTS_ENABLED_MASK_PTR(reg) \
217-
moveli reg, lo16(interrupts_enabled_mask); \
218-
auli reg, reg, ha16(interrupts_enabled_mask);\
217+
moveli reg, lo16(interrupts_enabled_mask); \
218+
auli reg, reg, ha16(interrupts_enabled_mask); \
219219
add reg, reg, tp
220220

221221
/* Disable interrupts. */
@@ -225,16 +225,16 @@ DECLARE_PER_CPU(unsigned long long, interrupts_enabled_mask);
225225
moveli tmp1, lo16(LINUX_MASKABLE_INTERRUPTS) \
226226
}; \
227227
{ \
228-
mtspr INTERRUPT_MASK_SET_1_0, tmp0; \
228+
mtspr SPR_INTERRUPT_MASK_SET_K_0, tmp0; \
229229
auli tmp1, tmp1, ha16(LINUX_MASKABLE_INTERRUPTS) \
230230
}; \
231-
mtspr INTERRUPT_MASK_SET_1_1, tmp1
231+
mtspr SPR_INTERRUPT_MASK_SET_K_1, tmp1
232232

233233
/* Disable ALL synchronous interrupts (used by NMI entry). */
234234
#define IRQ_DISABLE_ALL(tmp) \
235235
movei tmp, -1; \
236-
mtspr INTERRUPT_MASK_SET_1_0, tmp; \
237-
mtspr INTERRUPT_MASK_SET_1_1, tmp
236+
mtspr SPR_INTERRUPT_MASK_SET_K_0, tmp; \
237+
mtspr SPR_INTERRUPT_MASK_SET_K_1, tmp
238238

239239
/* Enable interrupts. */
240240
#define IRQ_ENABLE(tmp0, tmp1) \
@@ -244,8 +244,8 @@ DECLARE_PER_CPU(unsigned long long, interrupts_enabled_mask);
244244
addi tmp1, tmp0, 4 \
245245
}; \
246246
lw tmp1, tmp1; \
247-
mtspr INTERRUPT_MASK_RESET_1_0, tmp0; \
248-
mtspr INTERRUPT_MASK_RESET_1_1, tmp1
247+
mtspr SPR_INTERRUPT_MASK_RESET_K_0, tmp0; \
248+
mtspr SPR_INTERRUPT_MASK_RESET_K_1, tmp1
249249
#endif
250250

251251
/*

0 commit comments

Comments
 (0)