aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-06 11:28:54 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-06 11:28:54 -0500
commitdbf3b7ddbaaf65c7da9b99a686b25fd06fd75073 (patch)
tree42436f3c16b02d8980da77b101928cd73e082bfe
parent9d82f5eb3376cbae96ad36a063a9390de1694546 (diff)
parent1b6af71a8f50f59a96f65ad90e4d20612d2a2526 (diff)
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS fixes from Ralf Baechle: "The pending MIPS fixes for 3.19. All across the field and nothing particularly severe or dramatic" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (23 commits) IRQCHIP: mips-gic: Avoid rerouting timer IRQs for smp-cmp MIPS: Fix syscall_get_nr for the syscall exit tracing. MIPS: elf2ecoff: Ignore PT_MIPS_ABIFLAGS program headers. MIPS: elf2ecoff: Rewrite main processing loop to switch. MIPS: fork: Fix MSA/FPU/DSP context duplication race MIPS: Fix C0_Pagegrain[IEC] support. MIPS: traps: Fix inline asm ctc1 missing .set hardfloat MIPS: mipsregs.h: Add write_32bit_cp1_register() MIPS: Fix kernel lockup or crash after CPU offline/online MIPS: OCTEON: fix kernel crash when offlining a CPU MIPS: ARC: Fix build error. MIPS: IRQ: Fix disable_irq on CPU IRQs MIPS: smp-mt,smp-cmp: Enable all HW IRQs on secondary CPUs MIPS: Fix restart of indirect syscalls MIPS: ELF: fix loading o32 binaries on 64-bit kernels MIPS: mips-cm: Fix sparse warnings MIPS: Kconfig: Fix recursive dependency. MIPS: Compat: Fix build error if CONFIG_MIPS32_COMPAT but no compat ABI. MIPS: JZ4740: Fixup #include's (sparse) MIPS: Wire up execveat(2). ...
-rw-r--r--arch/mips/Kconfig23
-rw-r--r--arch/mips/boot/elf2ecoff.c64
-rw-r--r--arch/mips/cavium-octeon/smp.c2
-rw-r--r--arch/mips/configs/malta_defconfig16
-rw-r--r--arch/mips/include/asm/fpu.h43
-rw-r--r--arch/mips/include/asm/fw/arc/hinv.h6
-rw-r--r--arch/mips/include/asm/mips-cm.h4
-rw-r--r--arch/mips/include/asm/mipsregs.h15
-rw-r--r--arch/mips/include/asm/syscall.h8
-rw-r--r--arch/mips/include/asm/thread_info.h1
-rw-r--r--arch/mips/include/uapi/asm/unistd.h15
-rw-r--r--arch/mips/jz4740/irq.c3
-rw-r--r--arch/mips/kernel/elf.c8
-rw-r--r--arch/mips/kernel/irq_cpu.c4
-rw-r--r--arch/mips/kernel/process.c36
-rw-r--r--arch/mips/kernel/ptrace.c2
-rw-r--r--arch/mips/kernel/scall32-o32.S2
-rw-r--r--arch/mips/kernel/scall64-64.S1
-rw-r--r--arch/mips/kernel/scall64-n32.S1
-rw-r--r--arch/mips/kernel/scall64-o32.S2
-rw-r--r--arch/mips/kernel/smp-cmp.c4
-rw-r--r--arch/mips/kernel/smp-mt.c3
-rw-r--r--arch/mips/kernel/smp.c2
-rw-r--r--arch/mips/kernel/traps.c3
-rw-r--r--arch/mips/mm/tlb-r4k.c2
-rw-r--r--drivers/irqchip/irq-mips-gic.c27
26 files changed, 186 insertions, 111 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 3289969ee423..843713c05b79 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2656,27 +2656,21 @@ config TRAD_SIGNALS
2656 bool 2656 bool
2657 2657
2658config MIPS32_COMPAT 2658config MIPS32_COMPAT
2659 bool "Kernel support for Linux/MIPS 32-bit binary compatibility" 2659 bool
2660 depends on 64BIT
2661 help
2662 Select this option if you want Linux/MIPS 32-bit binary
2663 compatibility. Since all software available for Linux/MIPS is
2664 currently 32-bit you should say Y here.
2665 2660
2666config COMPAT 2661config COMPAT
2667 bool 2662 bool
2668 depends on MIPS32_COMPAT
2669 select ARCH_WANT_OLD_COMPAT_IPC
2670 default y
2671 2663
2672config SYSVIPC_COMPAT 2664config SYSVIPC_COMPAT
2673 bool 2665 bool
2674 depends on COMPAT && SYSVIPC
2675 default y
2676 2666
2677config MIPS32_O32 2667config MIPS32_O32
2678 bool "Kernel support for o32 binaries" 2668 bool "Kernel support for o32 binaries"
2679 depends on MIPS32_COMPAT 2669 depends on 64BIT
2670 select ARCH_WANT_OLD_COMPAT_IPC
2671 select COMPAT
2672 select MIPS32_COMPAT
2673 select SYSVIPC_COMPAT if SYSVIPC
2680 help 2674 help
2681 Select this option if you want to run o32 binaries. These are pure 2675 Select this option if you want to run o32 binaries. These are pure
2682 32-bit binaries as used by the 32-bit Linux/MIPS port. Most of 2676 32-bit binaries as used by the 32-bit Linux/MIPS port. Most of
@@ -2686,7 +2680,10 @@ config MIPS32_O32
2686 2680
2687config MIPS32_N32 2681config MIPS32_N32
2688 bool "Kernel support for n32 binaries" 2682 bool "Kernel support for n32 binaries"
2689 depends on MIPS32_COMPAT 2683 depends on 64BIT
2684 select COMPAT
2685 select MIPS32_COMPAT
2686 select SYSVIPC_COMPAT if SYSVIPC
2690 help 2687 help
2691 Select this option if you want to run n32 binaries. These are 2688 Select this option if you want to run n32 binaries. These are
2692 64-bit binaries using 32-bit quantities for addressing and certain 2689 64-bit binaries using 32-bit quantities for addressing and certain
diff --git a/arch/mips/boot/elf2ecoff.c b/arch/mips/boot/elf2ecoff.c
index 8585078ae50e..2a4c52e27f41 100644
--- a/arch/mips/boot/elf2ecoff.c
+++ b/arch/mips/boot/elf2ecoff.c
@@ -49,7 +49,8 @@
49/* 49/*
50 * Some extra ELF definitions 50 * Some extra ELF definitions
51 */ 51 */
52#define PT_MIPS_REGINFO 0x70000000 /* Register usage information */ 52#define PT_MIPS_REGINFO 0x70000000 /* Register usage information */
53#define PT_MIPS_ABIFLAGS 0x70000003 /* Records ABI related flags */
53 54
54/* -------------------------------------------------------------------- */ 55/* -------------------------------------------------------------------- */
55 56
@@ -349,39 +350,46 @@ int main(int argc, char *argv[])
349 350
350 for (i = 0; i < ex.e_phnum; i++) { 351 for (i = 0; i < ex.e_phnum; i++) {
351 /* Section types we can ignore... */ 352 /* Section types we can ignore... */
352 if (ph[i].p_type == PT_NULL || ph[i].p_type == PT_NOTE || 353 switch (ph[i].p_type) {
353 ph[i].p_type == PT_PHDR 354 case PT_NULL:
354 || ph[i].p_type == PT_MIPS_REGINFO) 355 case PT_NOTE:
356 case PT_PHDR:
357 case PT_MIPS_REGINFO:
358 case PT_MIPS_ABIFLAGS:
355 continue; 359 continue;
356 /* Section types we can't handle... */
357 else if (ph[i].p_type != PT_LOAD) {
358 fprintf(stderr,
359 "Program header %d type %d can't be converted.\n",
360 ex.e_phnum, ph[i].p_type);
361 exit(1);
362 }
363 /* Writable (data) segment? */
364 if (ph[i].p_flags & PF_W) {
365 struct sect ndata, nbss;
366 360
367 ndata.vaddr = ph[i].p_vaddr; 361 case PT_LOAD:
368 ndata.len = ph[i].p_filesz; 362 /* Writable (data) segment? */
369 nbss.vaddr = ph[i].p_vaddr + ph[i].p_filesz; 363 if (ph[i].p_flags & PF_W) {
370 nbss.len = ph[i].p_memsz - ph[i].p_filesz; 364 struct sect ndata, nbss;
365
366 ndata.vaddr = ph[i].p_vaddr;
367 ndata.len = ph[i].p_filesz;
368 nbss.vaddr = ph[i].p_vaddr + ph[i].p_filesz;
369 nbss.len = ph[i].p_memsz - ph[i].p_filesz;
371 370
372 combine(&data, &ndata, 0); 371 combine(&data, &ndata, 0);
373 combine(&bss, &nbss, 1); 372 combine(&bss, &nbss, 1);
374 } else { 373 } else {
375 struct sect ntxt; 374 struct sect ntxt;
376 375
377 ntxt.vaddr = ph[i].p_vaddr; 376 ntxt.vaddr = ph[i].p_vaddr;
378 ntxt.len = ph[i].p_filesz; 377 ntxt.len = ph[i].p_filesz;
379 378
380 combine(&text, &ntxt, 0); 379 combine(&text, &ntxt, 0);
380 }
381 /* Remember the lowest segment start address. */
382 if (ph[i].p_vaddr < cur_vma)
383 cur_vma = ph[i].p_vaddr;
384 break;
385
386 default:
387 /* Section types we can't handle... */
388 fprintf(stderr,
389 "Program header %d type %d can't be converted.\n",
390 ex.e_phnum, ph[i].p_type);
391 exit(1);
381 } 392 }
382 /* Remember the lowest segment start address. */
383 if (ph[i].p_vaddr < cur_vma)
384 cur_vma = ph[i].p_vaddr;
385 } 393 }
386 394
387 /* Sections must be in order to be converted... */ 395 /* Sections must be in order to be converted... */
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
index ecd903dd1c45..8b1eeffa12ed 100644
--- a/arch/mips/cavium-octeon/smp.c
+++ b/arch/mips/cavium-octeon/smp.c
@@ -240,9 +240,7 @@ static int octeon_cpu_disable(void)
240 240
241 set_cpu_online(cpu, false); 241 set_cpu_online(cpu, false);
242 cpu_clear(cpu, cpu_callin_map); 242 cpu_clear(cpu, cpu_callin_map);
243 local_irq_disable();
244 octeon_fixup_irqs(); 243 octeon_fixup_irqs();
245 local_irq_enable();
246 244
247 flush_cache_all(); 245 flush_cache_all();
248 local_flush_tlb_all(); 246 local_flush_tlb_all();
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index f57b96dcf7df..61a4460d67d3 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -132,7 +132,6 @@ CONFIG_IP_NF_MATCH_ECN=m
132CONFIG_IP_NF_MATCH_TTL=m 132CONFIG_IP_NF_MATCH_TTL=m
133CONFIG_IP_NF_FILTER=m 133CONFIG_IP_NF_FILTER=m
134CONFIG_IP_NF_TARGET_REJECT=m 134CONFIG_IP_NF_TARGET_REJECT=m
135CONFIG_IP_NF_TARGET_ULOG=m
136CONFIG_IP_NF_MANGLE=m 135CONFIG_IP_NF_MANGLE=m
137CONFIG_IP_NF_TARGET_CLUSTERIP=m 136CONFIG_IP_NF_TARGET_CLUSTERIP=m
138CONFIG_IP_NF_TARGET_ECN=m 137CONFIG_IP_NF_TARGET_ECN=m
@@ -175,7 +174,6 @@ CONFIG_BRIDGE_EBT_MARK_T=m
175CONFIG_BRIDGE_EBT_REDIRECT=m 174CONFIG_BRIDGE_EBT_REDIRECT=m
176CONFIG_BRIDGE_EBT_SNAT=m 175CONFIG_BRIDGE_EBT_SNAT=m
177CONFIG_BRIDGE_EBT_LOG=m 176CONFIG_BRIDGE_EBT_LOG=m
178CONFIG_BRIDGE_EBT_ULOG=m
179CONFIG_BRIDGE_EBT_NFLOG=m 177CONFIG_BRIDGE_EBT_NFLOG=m
180CONFIG_IP_SCTP=m 178CONFIG_IP_SCTP=m
181CONFIG_BRIDGE=m 179CONFIG_BRIDGE=m
@@ -220,8 +218,6 @@ CONFIG_NET_ACT_SKBEDIT=m
220CONFIG_NET_CLS_IND=y 218CONFIG_NET_CLS_IND=y
221CONFIG_CFG80211=m 219CONFIG_CFG80211=m
222CONFIG_MAC80211=m 220CONFIG_MAC80211=m
223CONFIG_MAC80211_RC_PID=y
224CONFIG_MAC80211_RC_DEFAULT_PID=y
225CONFIG_MAC80211_MESH=y 221CONFIG_MAC80211_MESH=y
226CONFIG_RFKILL=m 222CONFIG_RFKILL=m
227CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 223CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
@@ -248,19 +244,13 @@ CONFIG_ATA_OVER_ETH=m
248CONFIG_IDE=y 244CONFIG_IDE=y
249CONFIG_BLK_DEV_IDECD=y 245CONFIG_BLK_DEV_IDECD=y
250CONFIG_IDE_GENERIC=y 246CONFIG_IDE_GENERIC=y
251CONFIG_BLK_DEV_GENERIC=y
252CONFIG_BLK_DEV_PIIX=y
253CONFIG_BLK_DEV_IT8213=m
254CONFIG_BLK_DEV_TC86C001=m
255CONFIG_RAID_ATTRS=m 247CONFIG_RAID_ATTRS=m
256CONFIG_SCSI=m 248CONFIG_BLK_DEV_SD=y
257CONFIG_BLK_DEV_SD=m
258CONFIG_CHR_DEV_ST=m 249CONFIG_CHR_DEV_ST=m
259CONFIG_CHR_DEV_OSST=m 250CONFIG_CHR_DEV_OSST=m
260CONFIG_BLK_DEV_SR=m 251CONFIG_BLK_DEV_SR=m
261CONFIG_BLK_DEV_SR_VENDOR=y 252CONFIG_BLK_DEV_SR_VENDOR=y
262CONFIG_CHR_DEV_SG=m 253CONFIG_CHR_DEV_SG=m
263CONFIG_SCSI_MULTI_LUN=y
264CONFIG_SCSI_CONSTANTS=y 254CONFIG_SCSI_CONSTANTS=y
265CONFIG_SCSI_LOGGING=y 255CONFIG_SCSI_LOGGING=y
266CONFIG_SCSI_SCAN_ASYNC=y 256CONFIG_SCSI_SCAN_ASYNC=y
@@ -273,6 +263,8 @@ CONFIG_SCSI_AACRAID=m
273CONFIG_SCSI_AIC7XXX=m 263CONFIG_SCSI_AIC7XXX=m
274CONFIG_AIC7XXX_RESET_DELAY_MS=15000 264CONFIG_AIC7XXX_RESET_DELAY_MS=15000
275# CONFIG_AIC7XXX_DEBUG_ENABLE is not set 265# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
266CONFIG_ATA=y
267CONFIG_ATA_PIIX=y
276CONFIG_MD=y 268CONFIG_MD=y
277CONFIG_BLK_DEV_MD=m 269CONFIG_BLK_DEV_MD=m
278CONFIG_MD_LINEAR=m 270CONFIG_MD_LINEAR=m
@@ -340,6 +332,7 @@ CONFIG_UIO=m
340CONFIG_UIO_CIF=m 332CONFIG_UIO_CIF=m
341CONFIG_EXT2_FS=y 333CONFIG_EXT2_FS=y
342CONFIG_EXT3_FS=y 334CONFIG_EXT3_FS=y
335CONFIG_EXT4_FS=y
343CONFIG_REISERFS_FS=m 336CONFIG_REISERFS_FS=m
344CONFIG_REISERFS_PROC_INFO=y 337CONFIG_REISERFS_PROC_INFO=y
345CONFIG_REISERFS_FS_XATTR=y 338CONFIG_REISERFS_FS_XATTR=y
@@ -441,4 +434,3 @@ CONFIG_CRYPTO_SERPENT=m
441CONFIG_CRYPTO_TEA=m 434CONFIG_CRYPTO_TEA=m
442CONFIG_CRYPTO_TWOFISH=m 435CONFIG_CRYPTO_TWOFISH=m
443# CONFIG_CRYPTO_ANSI_CPRNG is not set 436# CONFIG_CRYPTO_ANSI_CPRNG is not set
444CONFIG_CRC16=m
diff --git a/arch/mips/include/asm/fpu.h b/arch/mips/include/asm/fpu.h
index 994d21939676..affebb78f5d6 100644
--- a/arch/mips/include/asm/fpu.h
+++ b/arch/mips/include/asm/fpu.h
@@ -64,7 +64,7 @@ static inline int __enable_fpu(enum fpu_mode mode)
64 return SIGFPE; 64 return SIGFPE;
65 65
66 /* set FRE */ 66 /* set FRE */
67 write_c0_config5(read_c0_config5() | MIPS_CONF5_FRE); 67 set_c0_config5(MIPS_CONF5_FRE);
68 goto fr_common; 68 goto fr_common;
69 69
70 case FPU_64BIT: 70 case FPU_64BIT:
@@ -74,8 +74,10 @@ static inline int __enable_fpu(enum fpu_mode mode)
74#endif 74#endif
75 /* fall through */ 75 /* fall through */
76 case FPU_32BIT: 76 case FPU_32BIT:
77 /* clear FRE */ 77 if (cpu_has_fre) {
78 write_c0_config5(read_c0_config5() & ~MIPS_CONF5_FRE); 78 /* clear FRE */
79 clear_c0_config5(MIPS_CONF5_FRE);
80 }
79fr_common: 81fr_common:
80 /* set CU1 & change FR appropriately */ 82 /* set CU1 & change FR appropriately */
81 fr = (int)mode & FPU_FR_MASK; 83 fr = (int)mode & FPU_FR_MASK;
@@ -182,25 +184,32 @@ static inline int init_fpu(void)
182 int ret = 0; 184 int ret = 0;
183 185
184 if (cpu_has_fpu) { 186 if (cpu_has_fpu) {
187 unsigned int config5;
188
185 ret = __own_fpu(); 189 ret = __own_fpu();
186 if (!ret) { 190 if (ret)
187 unsigned int config5 = read_c0_config5(); 191 return ret;
188
189 /*
190 * Ensure FRE is clear whilst running _init_fpu, since
191 * single precision FP instructions are used. If FRE
192 * was set then we'll just end up initialising all 32
193 * 64b registers.
194 */
195 write_c0_config5(config5 & ~MIPS_CONF5_FRE);
196 enable_fpu_hazard();
197 192
193 if (!cpu_has_fre) {
198 _init_fpu(); 194 _init_fpu();
199 195
200 /* Restore FRE */ 196 return 0;
201 write_c0_config5(config5);
202 enable_fpu_hazard();
203 } 197 }
198
199 /*
200 * Ensure FRE is clear whilst running _init_fpu, since
201 * single precision FP instructions are used. If FRE
202 * was set then we'll just end up initialising all 32
203 * 64b registers.
204 */
205 config5 = clear_c0_config5(MIPS_CONF5_FRE);
206 enable_fpu_hazard();
207
208 _init_fpu();
209
210 /* Restore FRE */
211 write_c0_config5(config5);
212 enable_fpu_hazard();
204 } else 213 } else
205 fpu_emulator_init_fpu(); 214 fpu_emulator_init_fpu();
206 215
diff --git a/arch/mips/include/asm/fw/arc/hinv.h b/arch/mips/include/asm/fw/arc/hinv.h
index f8d37d1df5de..9fac64a26353 100644
--- a/arch/mips/include/asm/fw/arc/hinv.h
+++ b/arch/mips/include/asm/fw/arc/hinv.h
@@ -119,7 +119,7 @@ union key_u {
119#define SGI_ARCS_REV 10 /* rev .10, 3/04/92 */ 119#define SGI_ARCS_REV 10 /* rev .10, 3/04/92 */
120#endif 120#endif
121 121
122typedef struct component { 122typedef struct {
123 CONFIGCLASS Class; 123 CONFIGCLASS Class;
124 CONFIGTYPE Type; 124 CONFIGTYPE Type;
125 IDENTIFIERFLAG Flags; 125 IDENTIFIERFLAG Flags;
@@ -140,7 +140,7 @@ struct cfgdata {
140}; 140};
141 141
142/* System ID */ 142/* System ID */
143typedef struct systemid { 143typedef struct {
144 CHAR VendorId[8]; 144 CHAR VendorId[8];
145 CHAR ProductId[8]; 145 CHAR ProductId[8];
146} SYSTEMID; 146} SYSTEMID;
@@ -166,7 +166,7 @@ typedef enum memorytype {
166#endif /* _NT_PROM */ 166#endif /* _NT_PROM */
167} MEMORYTYPE; 167} MEMORYTYPE;
168 168
169typedef struct memorydescriptor { 169typedef struct {
170 MEMORYTYPE Type; 170 MEMORYTYPE Type;
171 LONG BasePage; 171 LONG BasePage;
172 LONG PageCount; 172 LONG PageCount;
diff --git a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h
index b95a827d763e..59c0901bdd84 100644
--- a/arch/mips/include/asm/mips-cm.h
+++ b/arch/mips/include/asm/mips-cm.h
@@ -89,9 +89,9 @@ static inline bool mips_cm_has_l2sync(void)
89 89
90/* Macros to ease the creation of register access functions */ 90/* Macros to ease the creation of register access functions */
91#define BUILD_CM_R_(name, off) \ 91#define BUILD_CM_R_(name, off) \
92static inline u32 *addr_gcr_##name(void) \ 92static inline u32 __iomem *addr_gcr_##name(void) \
93{ \ 93{ \
94 return (u32 *)(mips_cm_base + (off)); \ 94 return (u32 __iomem *)(mips_cm_base + (off)); \
95} \ 95} \
96 \ 96 \
97static inline u32 read_gcr_##name(void) \ 97static inline u32 read_gcr_##name(void) \
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 5e4aef304b02..5b720d8c2745 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -1386,12 +1386,27 @@ do { \
1386 __res; \ 1386 __res; \
1387}) 1387})
1388 1388
1389#define _write_32bit_cp1_register(dest, val, gas_hardfloat) \
1390do { \
1391 __asm__ __volatile__( \
1392 " .set push \n" \
1393 " .set reorder \n" \
1394 " "STR(gas_hardfloat)" \n" \
1395 " ctc1 %0,"STR(dest)" \n" \
1396 " .set pop \n" \
1397 : : "r" (val)); \
1398} while (0)
1399
1389#ifdef GAS_HAS_SET_HARDFLOAT 1400#ifdef GAS_HAS_SET_HARDFLOAT
1390#define read_32bit_cp1_register(source) \ 1401#define read_32bit_cp1_register(source) \
1391 _read_32bit_cp1_register(source, .set hardfloat) 1402 _read_32bit_cp1_register(source, .set hardfloat)
1403#define write_32bit_cp1_register(dest, val) \
1404 _write_32bit_cp1_register(dest, val, .set hardfloat)
1392#else 1405#else
1393#define read_32bit_cp1_register(source) \ 1406#define read_32bit_cp1_register(source) \
1394 _read_32bit_cp1_register(source, ) 1407 _read_32bit_cp1_register(source, )
1408#define write_32bit_cp1_register(dest, val) \
1409 _write_32bit_cp1_register(dest, val, )
1395#endif 1410#endif
1396 1411
1397#ifdef HAVE_AS_DSP 1412#ifdef HAVE_AS_DSP
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h
index bb7963753730..6499d93ae68d 100644
--- a/arch/mips/include/asm/syscall.h
+++ b/arch/mips/include/asm/syscall.h
@@ -29,13 +29,7 @@
29static inline long syscall_get_nr(struct task_struct *task, 29static inline long syscall_get_nr(struct task_struct *task,
30 struct pt_regs *regs) 30 struct pt_regs *regs)
31{ 31{
32 /* O32 ABI syscall() - Either 64-bit with O32 or 32-bit */ 32 return current_thread_info()->syscall;
33 if ((config_enabled(CONFIG_32BIT) ||
34 test_tsk_thread_flag(task, TIF_32BIT_REGS)) &&
35 (regs->regs[2] == __NR_syscall))
36 return regs->regs[4];
37 else
38 return regs->regs[2];
39} 33}
40 34
41static inline unsigned long mips_get_syscall_arg(unsigned long *arg, 35static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h
index 99eea59604e9..e4440f92b366 100644
--- a/arch/mips/include/asm/thread_info.h
+++ b/arch/mips/include/asm/thread_info.h
@@ -36,6 +36,7 @@ struct thread_info {
36 */ 36 */
37 struct restart_block restart_block; 37 struct restart_block restart_block;
38 struct pt_regs *regs; 38 struct pt_regs *regs;
39 long syscall; /* syscall number */
39}; 40};
40 41
41/* 42/*
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h
index d001bb1ad177..c03088f9f514 100644
--- a/arch/mips/include/uapi/asm/unistd.h
+++ b/arch/mips/include/uapi/asm/unistd.h
@@ -376,16 +376,17 @@
376#define __NR_getrandom (__NR_Linux + 353) 376#define __NR_getrandom (__NR_Linux + 353)
377#define __NR_memfd_create (__NR_Linux + 354) 377#define __NR_memfd_create (__NR_Linux + 354)
378#define __NR_bpf (__NR_Linux + 355) 378#define __NR_bpf (__NR_Linux + 355)
379#define __NR_execveat (__NR_Linux + 356)
379 380
380/* 381/*
381 * Offset of the last Linux o32 flavoured syscall 382 * Offset of the last Linux o32 flavoured syscall
382 */ 383 */
383#define __NR_Linux_syscalls 355 384#define __NR_Linux_syscalls 356
384 385
385#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 386#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
386 387
387#define __NR_O32_Linux 4000 388#define __NR_O32_Linux 4000
388#define __NR_O32_Linux_syscalls 355 389#define __NR_O32_Linux_syscalls 356
389 390
390#if _MIPS_SIM == _MIPS_SIM_ABI64 391#if _MIPS_SIM == _MIPS_SIM_ABI64
391 392
@@ -709,16 +710,17 @@
709#define __NR_getrandom (__NR_Linux + 313) 710#define __NR_getrandom (__NR_Linux + 313)
710#define __NR_memfd_create (__NR_Linux + 314) 711#define __NR_memfd_create (__NR_Linux + 314)
711#define __NR_bpf (__NR_Linux + 315) 712#define __NR_bpf (__NR_Linux + 315)
713#define __NR_execveat (__NR_Linux + 316)
712 714
713/* 715/*
714 * Offset of the last Linux 64-bit flavoured syscall 716 * Offset of the last Linux 64-bit flavoured syscall
715 */ 717 */
716#define __NR_Linux_syscalls 315 718#define __NR_Linux_syscalls 316
717 719
718#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ 720#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
719 721
720#define __NR_64_Linux 5000 722#define __NR_64_Linux 5000
721#define __NR_64_Linux_syscalls 315 723#define __NR_64_Linux_syscalls 316
722 724
723#if _MIPS_SIM == _MIPS_SIM_NABI32 725#if _MIPS_SIM == _MIPS_SIM_NABI32
724 726
@@ -1046,15 +1048,16 @@
1046#define __NR_getrandom (__NR_Linux + 317) 1048#define __NR_getrandom (__NR_Linux + 317)
1047#define __NR_memfd_create (__NR_Linux + 318) 1049#define __NR_memfd_create (__NR_Linux + 318)
1048#define __NR_bpf (__NR_Linux + 319) 1050#define __NR_bpf (__NR_Linux + 319)
1051#define __NR_execveat (__NR_Linux + 320)
1049 1052
1050/* 1053/*
1051 * Offset of the last N32 flavoured syscall 1054 * Offset of the last N32 flavoured syscall
1052 */ 1055 */
1053#define __NR_Linux_syscalls 319 1056#define __NR_Linux_syscalls 320
1054 1057
1055#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ 1058#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
1056 1059
1057#define __NR_N32_Linux 6000 1060#define __NR_N32_Linux 6000
1058#define __NR_N32_Linux_syscalls 319 1061#define __NR_N32_Linux_syscalls 320
1059 1062
1060#endif /* _UAPI_ASM_UNISTD_H */ 1063#endif /* _UAPI_ASM_UNISTD_H */
diff --git a/arch/mips/jz4740/irq.c b/arch/mips/jz4740/irq.c
index 2531da1d3add..97206b3deb97 100644
--- a/arch/mips/jz4740/irq.c
+++ b/arch/mips/jz4740/irq.c
@@ -30,6 +30,9 @@
30#include <asm/irq_cpu.h> 30#include <asm/irq_cpu.h>
31 31
32#include <asm/mach-jz4740/base.h> 32#include <asm/mach-jz4740/base.h>
33#include <asm/mach-jz4740/irq.h>
34
35#include "irq.h"
33 36
34static void __iomem *jz_intc_base; 37static void __iomem *jz_intc_base;
35 38
diff --git a/arch/mips/kernel/elf.c b/arch/mips/kernel/elf.c
index c92b15df6893..a5b5b56485c1 100644
--- a/arch/mips/kernel/elf.c
+++ b/arch/mips/kernel/elf.c
@@ -19,8 +19,8 @@ enum {
19int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf, 19int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf,
20 bool is_interp, struct arch_elf_state *state) 20 bool is_interp, struct arch_elf_state *state)
21{ 21{
22 struct elfhdr *ehdr = _ehdr; 22 struct elf32_hdr *ehdr = _ehdr;
23 struct elf_phdr *phdr = _phdr; 23 struct elf32_phdr *phdr = _phdr;
24 struct mips_elf_abiflags_v0 abiflags; 24 struct mips_elf_abiflags_v0 abiflags;
25 int ret; 25 int ret;
26 26
@@ -48,7 +48,7 @@ int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf,
48 return 0; 48 return 0;
49} 49}
50 50
51static inline unsigned get_fp_abi(struct elfhdr *ehdr, int in_abi) 51static inline unsigned get_fp_abi(struct elf32_hdr *ehdr, int in_abi)
52{ 52{
53 /* If the ABI requirement is provided, simply return that */ 53 /* If the ABI requirement is provided, simply return that */
54 if (in_abi != -1) 54 if (in_abi != -1)
@@ -65,7 +65,7 @@ static inline unsigned get_fp_abi(struct elfhdr *ehdr, int in_abi)
65int arch_check_elf(void *_ehdr, bool has_interpreter, 65int arch_check_elf(void *_ehdr, bool has_interpreter,
66 struct arch_elf_state *state) 66 struct arch_elf_state *state)
67{ 67{
68 struct elfhdr *ehdr = _ehdr; 68 struct elf32_hdr *ehdr = _ehdr;
69 unsigned fp_abi, interp_fp_abi, abi0, abi1; 69 unsigned fp_abi, interp_fp_abi, abi0, abi1;
70 70
71 /* Ignore non-O32 binaries */ 71 /* Ignore non-O32 binaries */
diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c
index 590c2c980fd3..6eb7a3f515fc 100644
--- a/arch/mips/kernel/irq_cpu.c
+++ b/arch/mips/kernel/irq_cpu.c
@@ -57,6 +57,8 @@ static struct irq_chip mips_cpu_irq_controller = {
57 .irq_mask_ack = mask_mips_irq, 57 .irq_mask_ack = mask_mips_irq,
58 .irq_unmask = unmask_mips_irq, 58 .irq_unmask = unmask_mips_irq,
59 .irq_eoi = unmask_mips_irq, 59 .irq_eoi = unmask_mips_irq,
60 .irq_disable = mask_mips_irq,
61 .irq_enable = unmask_mips_irq,
60}; 62};
61 63
62/* 64/*
@@ -93,6 +95,8 @@ static struct irq_chip mips_mt_cpu_irq_controller = {
93 .irq_mask_ack = mips_mt_cpu_irq_ack, 95 .irq_mask_ack = mips_mt_cpu_irq_ack,
94 .irq_unmask = unmask_mips_irq, 96 .irq_unmask = unmask_mips_irq,
95 .irq_eoi = unmask_mips_irq, 97 .irq_eoi = unmask_mips_irq,
98 .irq_disable = mask_mips_irq,
99 .irq_enable = unmask_mips_irq,
96}; 100};
97 101
98asmlinkage void __weak plat_irq_dispatch(void) 102asmlinkage void __weak plat_irq_dispatch(void)
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index eb76434828e8..85bff5d513e5 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -82,6 +82,30 @@ void flush_thread(void)
82{ 82{
83} 83}
84 84
85int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
86{
87 /*
88 * Save any process state which is live in hardware registers to the
89 * parent context prior to duplication. This prevents the new child
90 * state becoming stale if the parent is preempted before copy_thread()
91 * gets a chance to save the parent's live hardware registers to the
92 * child context.
93 */
94 preempt_disable();
95
96 if (is_msa_enabled())
97 save_msa(current);
98 else if (is_fpu_owner())
99 _save_fp(current);
100
101 save_dsp(current);
102
103 preempt_enable();
104
105 *dst = *src;
106 return 0;
107}
108
85int copy_thread(unsigned long clone_flags, unsigned long usp, 109int copy_thread(unsigned long clone_flags, unsigned long usp,
86 unsigned long arg, struct task_struct *p) 110 unsigned long arg, struct task_struct *p)
87{ 111{
@@ -92,18 +116,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
92 116
93 childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE - 32; 117 childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE - 32;
94 118
95 preempt_disable();
96
97 if (is_msa_enabled())
98 save_msa(p);
99 else if (is_fpu_owner())
100 save_fp(p);
101
102 if (cpu_has_dsp)
103 save_dsp(p);
104
105 preempt_enable();
106
107 /* set up new TSS. */ 119 /* set up new TSS. */
108 childregs = (struct pt_regs *) childksp - 1; 120 childregs = (struct pt_regs *) childksp - 1;
109 /* Put the stack after the struct pt_regs. */ 121 /* Put the stack after the struct pt_regs. */
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index 9d1487d83293..510452812594 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -770,6 +770,8 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall)
770 long ret = 0; 770 long ret = 0;
771 user_exit(); 771 user_exit();
772 772
773 current_thread_info()->syscall = syscall;
774
773 if (secure_computing() == -1) 775 if (secure_computing() == -1)
774 return -1; 776 return -1;
775 777
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index 00cad1005a16..6e8de80bb446 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -181,6 +181,7 @@ illegal_syscall:
181 sll t1, t0, 2 181 sll t1, t0, 2
182 beqz v0, einval 182 beqz v0, einval
183 lw t2, sys_call_table(t1) # syscall routine 183 lw t2, sys_call_table(t1) # syscall routine
184 sw a0, PT_R2(sp) # call routine directly on restart
184 185
185 /* Some syscalls like execve get their arguments from struct pt_regs 186 /* Some syscalls like execve get their arguments from struct pt_regs
186 and claim zero arguments in the syscall table. Thus we have to 187 and claim zero arguments in the syscall table. Thus we have to
@@ -580,3 +581,4 @@ EXPORT(sys_call_table)
580 PTR sys_getrandom 581 PTR sys_getrandom
581 PTR sys_memfd_create 582 PTR sys_memfd_create
582 PTR sys_bpf /* 4355 */ 583 PTR sys_bpf /* 4355 */
584 PTR sys_execveat
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index 5251565e344b..ad4d44635c76 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -435,4 +435,5 @@ EXPORT(sys_call_table)
435 PTR sys_getrandom 435 PTR sys_getrandom
436 PTR sys_memfd_create 436 PTR sys_memfd_create
437 PTR sys_bpf /* 5315 */ 437 PTR sys_bpf /* 5315 */
438 PTR sys_execveat
438 .size sys_call_table,.-sys_call_table 439 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 77e74398b828..446cc654da56 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -428,4 +428,5 @@ EXPORT(sysn32_call_table)
428 PTR sys_getrandom 428 PTR sys_getrandom
429 PTR sys_memfd_create 429 PTR sys_memfd_create
430 PTR sys_bpf 430 PTR sys_bpf
431 PTR compat_sys_execveat /* 6320 */
431 .size sysn32_call_table,.-sysn32_call_table 432 .size sysn32_call_table,.-sysn32_call_table
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 6f8db9f728e8..d07b210fbeff 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -186,6 +186,7 @@ LEAF(sys32_syscall)
186 dsll t1, t0, 3 186 dsll t1, t0, 3
187 beqz v0, einval 187 beqz v0, einval
188 ld t2, sys32_call_table(t1) # syscall routine 188 ld t2, sys32_call_table(t1) # syscall routine
189 sd a0, PT_R2(sp) # call routine directly on restart
189 190
190 move a0, a1 # shift argument registers 191 move a0, a1 # shift argument registers
191 move a1, a2 192 move a1, a2
@@ -565,4 +566,5 @@ EXPORT(sys32_call_table)
565 PTR sys_getrandom 566 PTR sys_getrandom
566 PTR sys_memfd_create 567 PTR sys_memfd_create
567 PTR sys_bpf /* 4355 */ 568 PTR sys_bpf /* 4355 */
569 PTR compat_sys_execveat
568 .size sys32_call_table,.-sys32_call_table 570 .size sys32_call_table,.-sys32_call_table
diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c
index 1e0a93c5a3e7..e36a859af666 100644
--- a/arch/mips/kernel/smp-cmp.c
+++ b/arch/mips/kernel/smp-cmp.c
@@ -44,8 +44,8 @@ static void cmp_init_secondary(void)
44 struct cpuinfo_mips *c __maybe_unused = &current_cpu_data; 44 struct cpuinfo_mips *c __maybe_unused = &current_cpu_data;
45 45
46 /* Assume GIC is present */ 46 /* Assume GIC is present */
47 change_c0_status(ST0_IM, STATUSF_IP3 | STATUSF_IP4 | STATUSF_IP6 | 47 change_c0_status(ST0_IM, STATUSF_IP2 | STATUSF_IP3 | STATUSF_IP4 |
48 STATUSF_IP7); 48 STATUSF_IP5 | STATUSF_IP6 | STATUSF_IP7);
49 49
50 /* Enable per-cpu interrupts: platform specific */ 50 /* Enable per-cpu interrupts: platform specific */
51 51
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index ad86951b73bd..17ea705f6c40 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -161,7 +161,8 @@ static void vsmp_init_secondary(void)
161#ifdef CONFIG_MIPS_GIC 161#ifdef CONFIG_MIPS_GIC
162 /* This is Malta specific: IPI,performance and timer interrupts */ 162 /* This is Malta specific: IPI,performance and timer interrupts */
163 if (gic_present) 163 if (gic_present)
164 change_c0_status(ST0_IM, STATUSF_IP3 | STATUSF_IP4 | 164 change_c0_status(ST0_IM, STATUSF_IP2 | STATUSF_IP3 |
165 STATUSF_IP4 | STATUSF_IP5 |
165 STATUSF_IP6 | STATUSF_IP7); 166 STATUSF_IP6 | STATUSF_IP7);
166 else 167 else
167#endif 168#endif
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index c94c4e92e17d..1c0d8c50b7e1 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -123,10 +123,10 @@ asmlinkage void start_secondary(void)
123 unsigned int cpu; 123 unsigned int cpu;
124 124
125 cpu_probe(); 125 cpu_probe();
126 cpu_report();
127 per_cpu_trap_init(false); 126 per_cpu_trap_init(false);
128 mips_clockevent_init(); 127 mips_clockevent_init();
129 mp_ops->init_secondary(); 128 mp_ops->init_secondary();
129 cpu_report();
130 130
131 /* 131 /*
132 * XXX parity protection should be folded in here when it's converted 132 * XXX parity protection should be folded in here when it's converted
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index ad3d2031c327..c3b41e24c05a 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1231,7 +1231,8 @@ static int enable_restore_fp_context(int msa)
1231 1231
1232 /* Restore the scalar FP control & status register */ 1232 /* Restore the scalar FP control & status register */
1233 if (!was_fpu_owner) 1233 if (!was_fpu_owner)
1234 asm volatile("ctc1 %0, $31" : : "r"(current->thread.fpu.fcr31)); 1234 write_32bit_cp1_register(CP1_STATUS,
1235 current->thread.fpu.fcr31);
1235 } 1236 }
1236 1237
1237out: 1238out:
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index e90b2e899291..30639a6e9b8c 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -489,6 +489,8 @@ static void r4k_tlb_configure(void)
489#ifdef CONFIG_64BIT 489#ifdef CONFIG_64BIT
490 pg |= PG_ELPA; 490 pg |= PG_ELPA;
491#endif 491#endif
492 if (cpu_has_rixiex)
493 pg |= PG_IEC;
492 write_c0_pagegrain(pg); 494 write_c0_pagegrain(pg);
493 } 495 }
494 496
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 2b0468e3df6a..56b96c63dc4b 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -37,6 +37,7 @@ static struct irq_domain *gic_irq_domain;
37static int gic_shared_intrs; 37static int gic_shared_intrs;
38static int gic_vpes; 38static int gic_vpes;
39static unsigned int gic_cpu_pin; 39static unsigned int gic_cpu_pin;
40static unsigned int timer_cpu_pin;
40static struct irq_chip gic_level_irq_controller, gic_edge_irq_controller; 41static struct irq_chip gic_level_irq_controller, gic_edge_irq_controller;
41 42
42static void __gic_irq_dispatch(void); 43static void __gic_irq_dispatch(void);
@@ -616,6 +617,8 @@ static int gic_local_irq_domain_map(struct irq_domain *d, unsigned int virq,
616 gic_write(GIC_REG(VPE_OTHER, GIC_VPE_COMPARE_MAP), val); 617 gic_write(GIC_REG(VPE_OTHER, GIC_VPE_COMPARE_MAP), val);
617 break; 618 break;
618 case GIC_LOCAL_INT_TIMER: 619 case GIC_LOCAL_INT_TIMER:
620 /* CONFIG_MIPS_CMP workaround (see __gic_init) */
621 val = GIC_MAP_TO_PIN_MSK | timer_cpu_pin;
619 gic_write(GIC_REG(VPE_OTHER, GIC_VPE_TIMER_MAP), val); 622 gic_write(GIC_REG(VPE_OTHER, GIC_VPE_TIMER_MAP), val);
620 break; 623 break;
621 case GIC_LOCAL_INT_PERFCTR: 624 case GIC_LOCAL_INT_PERFCTR:
@@ -713,12 +716,36 @@ static void __init __gic_init(unsigned long gic_base_addr,
713 if (cpu_has_veic) { 716 if (cpu_has_veic) {
714 /* Always use vector 1 in EIC mode */ 717 /* Always use vector 1 in EIC mode */
715 gic_cpu_pin = 0; 718 gic_cpu_pin = 0;
719 timer_cpu_pin = gic_cpu_pin;
716 set_vi_handler(gic_cpu_pin + GIC_PIN_TO_VEC_OFFSET, 720 set_vi_handler(gic_cpu_pin + GIC_PIN_TO_VEC_OFFSET,
717 __gic_irq_dispatch); 721 __gic_irq_dispatch);
718 } else { 722 } else {
719 gic_cpu_pin = cpu_vec - GIC_CPU_PIN_OFFSET; 723 gic_cpu_pin = cpu_vec - GIC_CPU_PIN_OFFSET;
720 irq_set_chained_handler(MIPS_CPU_IRQ_BASE + cpu_vec, 724 irq_set_chained_handler(MIPS_CPU_IRQ_BASE + cpu_vec,
721 gic_irq_dispatch); 725 gic_irq_dispatch);
726 /*
727 * With the CMP implementation of SMP (deprecated), other CPUs
728 * are started by the bootloader and put into a timer based
729 * waiting poll loop. We must not re-route those CPU's local
730 * timer interrupts as the wait instruction will never finish,
731 * so just handle whatever CPU interrupt it is routed to by
732 * default.
733 *
734 * This workaround should be removed when CMP support is
735 * dropped.
736 */
737 if (IS_ENABLED(CONFIG_MIPS_CMP) &&
738 gic_local_irq_is_routable(GIC_LOCAL_INT_TIMER)) {
739 timer_cpu_pin = gic_read(GIC_REG(VPE_LOCAL,
740 GIC_VPE_TIMER_MAP)) &
741 GIC_MAP_MSK;
742 irq_set_chained_handler(MIPS_CPU_IRQ_BASE +
743 GIC_CPU_PIN_OFFSET +
744 timer_cpu_pin,
745 gic_irq_dispatch);
746 } else {
747 timer_cpu_pin = gic_cpu_pin;
748 }
722 } 749 }
723 750
724 gic_irq_domain = irq_domain_add_simple(node, GIC_NUM_LOCAL_INTRS + 751 gic_irq_domain = irq_domain_add_simple(node, GIC_NUM_LOCAL_INTRS +