aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/Kconfig3
-rw-r--r--arch/mips/Makefile11
-rw-r--r--arch/mips/bcm63xx/irq.c4
-rw-r--r--arch/mips/boot/compressed/decompress.c1
-rw-r--r--arch/mips/include/asm/cop2.h18
-rw-r--r--arch/mips/include/asm/mach-ip28/spaces.h7
-rw-r--r--arch/mips/include/asm/page.h5
-rw-r--r--arch/mips/include/asm/smp.h5
-rw-r--r--arch/mips/include/asm/switch_to.h4
-rw-r--r--arch/mips/include/asm/topology.h8
-rw-r--r--arch/mips/include/uapi/asm/unistd.h18
-rw-r--r--arch/mips/kernel/machine_kexec.c8
-rw-r--r--arch/mips/kernel/scall32-o32.S2
-rw-r--r--arch/mips/kernel/scall64-64.S2
-rw-r--r--arch/mips/kernel/scall64-n32.S2
-rw-r--r--arch/mips/kernel/scall64-o32.S2
-rw-r--r--arch/mips/net/bpf_jit.c5
17 files changed, 67 insertions, 38 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 900c7e5333b6..574c43000699 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -546,6 +546,7 @@ config SGI_IP28
546 # select SYS_HAS_EARLY_PRINTK 546 # select SYS_HAS_EARLY_PRINTK
547 select SYS_SUPPORTS_64BIT_KERNEL 547 select SYS_SUPPORTS_64BIT_KERNEL
548 select SYS_SUPPORTS_BIG_ENDIAN 548 select SYS_SUPPORTS_BIG_ENDIAN
549 select MIPS_L1_CACHE_SHIFT_7
549 help 550 help
550 This is the SGI Indigo2 with R10000 processor. To compile a Linux 551 This is the SGI Indigo2 with R10000 processor. To compile a Linux
551 kernel that runs on these, say Y here. 552 kernel that runs on these, say Y here.
@@ -2029,7 +2030,9 @@ config MIPS_CMP
2029 bool "MIPS CMP framework support (DEPRECATED)" 2030 bool "MIPS CMP framework support (DEPRECATED)"
2030 depends on SYS_SUPPORTS_MIPS_CMP 2031 depends on SYS_SUPPORTS_MIPS_CMP
2031 select MIPS_GIC_IPI 2032 select MIPS_GIC_IPI
2033 select SMP
2032 select SYNC_R4K 2034 select SYNC_R4K
2035 select SYS_SUPPORTS_SMP
2033 select WEAK_ORDERING 2036 select WEAK_ORDERING
2034 default n 2037 default n
2035 help 2038 help
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 9336509f47ad..bbac51e11179 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -113,7 +113,16 @@ predef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__
113cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be)) 113cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be))
114cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le)) 114cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le))
115 115
116cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,-msmartmips) 116# For smartmips configurations, there are hundreds of warnings due to ISA overrides
117# in assembly and header files. smartmips is only supported for MIPS32r1 onwards
118# and there is no support for 64-bit. Various '.set mips2' or '.set mips3' or
119# similar directives in the kernel will spam the build logs with the following warnings:
120# Warning: the `smartmips' extension requires MIPS32 revision 1 or greater
121# or
122# Warning: the 64-bit MIPS architecture does not support the `smartmips' extension
123# Pass -Wa,--no-warn to disable all assembler warnings until the kernel code has
124# been fixed properly.
125cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,-msmartmips) -Wa,--no-warn
117cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,-mmicromips) 126cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,-mmicromips)
118 127
119cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \ 128cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \
diff --git a/arch/mips/bcm63xx/irq.c b/arch/mips/bcm63xx/irq.c
index 37eb2d1fa69a..b94bf44d8d8e 100644
--- a/arch/mips/bcm63xx/irq.c
+++ b/arch/mips/bcm63xx/irq.c
@@ -434,7 +434,7 @@ static void bcm63xx_init_irq(void)
434 irq_stat_addr[0] += PERF_IRQSTAT_3368_REG; 434 irq_stat_addr[0] += PERF_IRQSTAT_3368_REG;
435 irq_mask_addr[0] += PERF_IRQMASK_3368_REG; 435 irq_mask_addr[0] += PERF_IRQMASK_3368_REG;
436 irq_stat_addr[1] = 0; 436 irq_stat_addr[1] = 0;
437 irq_stat_addr[1] = 0; 437 irq_mask_addr[1] = 0;
438 irq_bits = 32; 438 irq_bits = 32;
439 ext_irq_count = 4; 439 ext_irq_count = 4;
440 ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368; 440 ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368;
@@ -443,7 +443,7 @@ static void bcm63xx_init_irq(void)
443 irq_stat_addr[0] += PERF_IRQSTAT_6328_REG(0); 443 irq_stat_addr[0] += PERF_IRQSTAT_6328_REG(0);
444 irq_mask_addr[0] += PERF_IRQMASK_6328_REG(0); 444 irq_mask_addr[0] += PERF_IRQMASK_6328_REG(0);
445 irq_stat_addr[1] += PERF_IRQSTAT_6328_REG(1); 445 irq_stat_addr[1] += PERF_IRQSTAT_6328_REG(1);
446 irq_stat_addr[1] += PERF_IRQMASK_6328_REG(1); 446 irq_mask_addr[1] += PERF_IRQMASK_6328_REG(1);
447 irq_bits = 64; 447 irq_bits = 64;
448 ext_irq_count = 4; 448 ext_irq_count = 4;
449 is_ext_irq_cascaded = 1; 449 is_ext_irq_cascaded = 1;
diff --git a/arch/mips/boot/compressed/decompress.c b/arch/mips/boot/compressed/decompress.c
index b49c7adbfa89..31903cf9709d 100644
--- a/arch/mips/boot/compressed/decompress.c
+++ b/arch/mips/boot/compressed/decompress.c
@@ -13,6 +13,7 @@
13 13
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/string.h>
16 17
17#include <asm/addrspace.h> 18#include <asm/addrspace.h>
18 19
diff --git a/arch/mips/include/asm/cop2.h b/arch/mips/include/asm/cop2.h
index d0352983b94d..51f80bd36fcc 100644
--- a/arch/mips/include/asm/cop2.h
+++ b/arch/mips/include/asm/cop2.h
@@ -16,8 +16,8 @@
16extern void octeon_cop2_save(struct octeon_cop2_state *); 16extern void octeon_cop2_save(struct octeon_cop2_state *);
17extern void octeon_cop2_restore(struct octeon_cop2_state *); 17extern void octeon_cop2_restore(struct octeon_cop2_state *);
18 18
19#define cop2_save(r) octeon_cop2_save(r) 19#define cop2_save(r) octeon_cop2_save(&(r)->thread.cp2)
20#define cop2_restore(r) octeon_cop2_restore(r) 20#define cop2_restore(r) octeon_cop2_restore(&(r)->thread.cp2)
21 21
22#define cop2_present 1 22#define cop2_present 1
23#define cop2_lazy_restore 1 23#define cop2_lazy_restore 1
@@ -26,26 +26,26 @@ extern void octeon_cop2_restore(struct octeon_cop2_state *);
26 26
27extern void nlm_cop2_save(struct nlm_cop2_state *); 27extern void nlm_cop2_save(struct nlm_cop2_state *);
28extern void nlm_cop2_restore(struct nlm_cop2_state *); 28extern void nlm_cop2_restore(struct nlm_cop2_state *);
29#define cop2_save(r) nlm_cop2_save(r) 29
30#define cop2_restore(r) nlm_cop2_restore(r) 30#define cop2_save(r) nlm_cop2_save(&(r)->thread.cp2)
31#define cop2_restore(r) nlm_cop2_restore(&(r)->thread.cp2)
31 32
32#define cop2_present 1 33#define cop2_present 1
33#define cop2_lazy_restore 0 34#define cop2_lazy_restore 0
34 35
35#elif defined(CONFIG_CPU_LOONGSON3) 36#elif defined(CONFIG_CPU_LOONGSON3)
36 37
37#define cop2_save(r)
38#define cop2_restore(r)
39
40#define cop2_present 1 38#define cop2_present 1
41#define cop2_lazy_restore 1 39#define cop2_lazy_restore 1
40#define cop2_save(r) do { (r); } while (0)
41#define cop2_restore(r) do { (r); } while (0)
42 42
43#else 43#else
44 44
45#define cop2_present 0 45#define cop2_present 0
46#define cop2_lazy_restore 0 46#define cop2_lazy_restore 0
47#define cop2_save(r) 47#define cop2_save(r) do { (r); } while (0)
48#define cop2_restore(r) 48#define cop2_restore(r) do { (r); } while (0)
49#endif 49#endif
50 50
51enum cu2_ops { 51enum cu2_ops {
diff --git a/arch/mips/include/asm/mach-ip28/spaces.h b/arch/mips/include/asm/mach-ip28/spaces.h
index 5d6a76434d00..c4a912733b65 100644
--- a/arch/mips/include/asm/mach-ip28/spaces.h
+++ b/arch/mips/include/asm/mach-ip28/spaces.h
@@ -11,15 +11,8 @@
11#ifndef _ASM_MACH_IP28_SPACES_H 11#ifndef _ASM_MACH_IP28_SPACES_H
12#define _ASM_MACH_IP28_SPACES_H 12#define _ASM_MACH_IP28_SPACES_H
13 13
14#define CAC_BASE _AC(0xa800000000000000, UL)
15
16#define HIGHMEM_START (~0UL)
17
18#define PHYS_OFFSET _AC(0x20000000, UL) 14#define PHYS_OFFSET _AC(0x20000000, UL)
19 15
20#define UNCAC_BASE _AC(0xc0000000, UL) /* 0xa0000000 + PHYS_OFFSET */
21#define IO_BASE UNCAC_BASE
22
23#include <asm/mach-generic/spaces.h> 16#include <asm/mach-generic/spaces.h>
24 17
25#endif /* _ASM_MACH_IP28_SPACES_H */ 18#endif /* _ASM_MACH_IP28_SPACES_H */
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
index 5699ec3a71af..3be81803595d 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -37,7 +37,7 @@
37 37
38/* 38/*
39 * This is used for calculating the real page sizes 39 * This is used for calculating the real page sizes
40 * for FTLB or VTLB + FTLB confugrations. 40 * for FTLB or VTLB + FTLB configurations.
41 */ 41 */
42static inline unsigned int page_size_ftlb(unsigned int mmuextdef) 42static inline unsigned int page_size_ftlb(unsigned int mmuextdef)
43{ 43{
@@ -223,7 +223,8 @@ static inline int pfn_valid(unsigned long pfn)
223 223
224#endif 224#endif
225 225
226#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) 226#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys((void *) \
227 (kaddr))))
227 228
228extern int __virt_addr_valid(const volatile void *kaddr); 229extern int __virt_addr_valid(const volatile void *kaddr);
229#define virt_addr_valid(kaddr) \ 230#define virt_addr_valid(kaddr) \
diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h
index 1e0f20a9cdda..eacf865d21c2 100644
--- a/arch/mips/include/asm/smp.h
+++ b/arch/mips/include/asm/smp.h
@@ -37,11 +37,6 @@ extern int __cpu_logical_map[NR_CPUS];
37 37
38#define NO_PROC_ID (-1) 38#define NO_PROC_ID (-1)
39 39
40#define topology_physical_package_id(cpu) (cpu_data[cpu].package)
41#define topology_core_id(cpu) (cpu_data[cpu].core)
42#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
43#define topology_thread_cpumask(cpu) (&cpu_sibling_map[cpu])
44
45#define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */ 40#define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */
46#define SMP_CALL_FUNCTION 0x2 41#define SMP_CALL_FUNCTION 0x2
47/* Octeon - Tell another core to flush its icache */ 42/* Octeon - Tell another core to flush its icache */
diff --git a/arch/mips/include/asm/switch_to.h b/arch/mips/include/asm/switch_to.h
index 495c1041a2cc..b928b6f898cd 100644
--- a/arch/mips/include/asm/switch_to.h
+++ b/arch/mips/include/asm/switch_to.h
@@ -92,7 +92,7 @@ do { \
92 KSTK_STATUS(prev) &= ~ST0_CU2; \ 92 KSTK_STATUS(prev) &= ~ST0_CU2; \
93 __c0_stat = read_c0_status(); \ 93 __c0_stat = read_c0_status(); \
94 write_c0_status(__c0_stat | ST0_CU2); \ 94 write_c0_status(__c0_stat | ST0_CU2); \
95 cop2_save(&prev->thread.cp2); \ 95 cop2_save(prev); \
96 write_c0_status(__c0_stat & ~ST0_CU2); \ 96 write_c0_status(__c0_stat & ~ST0_CU2); \
97 } \ 97 } \
98 __clear_software_ll_bit(); \ 98 __clear_software_ll_bit(); \
@@ -111,7 +111,7 @@ do { \
111 (KSTK_STATUS(current) & ST0_CU2)) { \ 111 (KSTK_STATUS(current) & ST0_CU2)) { \
112 __c0_stat = read_c0_status(); \ 112 __c0_stat = read_c0_status(); \
113 write_c0_status(__c0_stat | ST0_CU2); \ 113 write_c0_status(__c0_stat | ST0_CU2); \
114 cop2_restore(&current->thread.cp2); \ 114 cop2_restore(current); \
115 write_c0_status(__c0_stat & ~ST0_CU2); \ 115 write_c0_status(__c0_stat & ~ST0_CU2); \
116 } \ 116 } \
117 if (cpu_has_dsp) \ 117 if (cpu_has_dsp) \
diff --git a/arch/mips/include/asm/topology.h b/arch/mips/include/asm/topology.h
index 20ea4859c822..3e307ec2afba 100644
--- a/arch/mips/include/asm/topology.h
+++ b/arch/mips/include/asm/topology.h
@@ -9,5 +9,13 @@
9#define __ASM_TOPOLOGY_H 9#define __ASM_TOPOLOGY_H
10 10
11#include <topology.h> 11#include <topology.h>
12#include <linux/smp.h>
13
14#ifdef CONFIG_SMP
15#define topology_physical_package_id(cpu) (cpu_data[cpu].package)
16#define topology_core_id(cpu) (cpu_data[cpu].core)
17#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
18#define topology_thread_cpumask(cpu) (&cpu_sibling_map[cpu])
19#endif
12 20
13#endif /* __ASM_TOPOLOGY_H */ 21#endif /* __ASM_TOPOLOGY_H */
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h
index 9bc13eaf9d67..fdb4923777d1 100644
--- a/arch/mips/include/uapi/asm/unistd.h
+++ b/arch/mips/include/uapi/asm/unistd.h
@@ -373,16 +373,18 @@
373#define __NR_sched_getattr (__NR_Linux + 350) 373#define __NR_sched_getattr (__NR_Linux + 350)
374#define __NR_renameat2 (__NR_Linux + 351) 374#define __NR_renameat2 (__NR_Linux + 351)
375#define __NR_seccomp (__NR_Linux + 352) 375#define __NR_seccomp (__NR_Linux + 352)
376#define __NR_getrandom (__NR_Linux + 353)
377#define __NR_memfd_create (__NR_Linux + 354)
376 378
377/* 379/*
378 * Offset of the last Linux o32 flavoured syscall 380 * Offset of the last Linux o32 flavoured syscall
379 */ 381 */
380#define __NR_Linux_syscalls 352 382#define __NR_Linux_syscalls 354
381 383
382#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 384#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
383 385
384#define __NR_O32_Linux 4000 386#define __NR_O32_Linux 4000
385#define __NR_O32_Linux_syscalls 352 387#define __NR_O32_Linux_syscalls 354
386 388
387#if _MIPS_SIM == _MIPS_SIM_ABI64 389#if _MIPS_SIM == _MIPS_SIM_ABI64
388 390
@@ -703,16 +705,18 @@
703#define __NR_sched_getattr (__NR_Linux + 310) 705#define __NR_sched_getattr (__NR_Linux + 310)
704#define __NR_renameat2 (__NR_Linux + 311) 706#define __NR_renameat2 (__NR_Linux + 311)
705#define __NR_seccomp (__NR_Linux + 312) 707#define __NR_seccomp (__NR_Linux + 312)
708#define __NR_getrandom (__NR_Linux + 313)
709#define __NR_memfd_create (__NR_Linux + 314)
706 710
707/* 711/*
708 * Offset of the last Linux 64-bit flavoured syscall 712 * Offset of the last Linux 64-bit flavoured syscall
709 */ 713 */
710#define __NR_Linux_syscalls 312 714#define __NR_Linux_syscalls 314
711 715
712#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ 716#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
713 717
714#define __NR_64_Linux 5000 718#define __NR_64_Linux 5000
715#define __NR_64_Linux_syscalls 312 719#define __NR_64_Linux_syscalls 314
716 720
717#if _MIPS_SIM == _MIPS_SIM_NABI32 721#if _MIPS_SIM == _MIPS_SIM_NABI32
718 722
@@ -1037,15 +1041,17 @@
1037#define __NR_sched_getattr (__NR_Linux + 314) 1041#define __NR_sched_getattr (__NR_Linux + 314)
1038#define __NR_renameat2 (__NR_Linux + 315) 1042#define __NR_renameat2 (__NR_Linux + 315)
1039#define __NR_seccomp (__NR_Linux + 316) 1043#define __NR_seccomp (__NR_Linux + 316)
1044#define __NR_getrandom (__NR_Linux + 317)
1045#define __NR_memfd_create (__NR_Linux + 318)
1040 1046
1041/* 1047/*
1042 * Offset of the last N32 flavoured syscall 1048 * Offset of the last N32 flavoured syscall
1043 */ 1049 */
1044#define __NR_Linux_syscalls 316 1050#define __NR_Linux_syscalls 318
1045 1051
1046#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ 1052#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
1047 1053
1048#define __NR_N32_Linux 6000 1054#define __NR_N32_Linux 6000
1049#define __NR_N32_Linux_syscalls 316 1055#define __NR_N32_Linux_syscalls 318
1050 1056
1051#endif /* _UAPI_ASM_UNISTD_H */ 1057#endif /* _UAPI_ASM_UNISTD_H */
diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c
index 992e18474da5..50980bf3983e 100644
--- a/arch/mips/kernel/machine_kexec.c
+++ b/arch/mips/kernel/machine_kexec.c
@@ -71,8 +71,12 @@ machine_kexec(struct kimage *image)
71 kexec_start_address = 71 kexec_start_address =
72 (unsigned long) phys_to_virt(image->start); 72 (unsigned long) phys_to_virt(image->start);
73 73
74 kexec_indirection_page = 74 if (image->type == KEXEC_TYPE_DEFAULT) {
75 (unsigned long) phys_to_virt(image->head & PAGE_MASK); 75 kexec_indirection_page =
76 (unsigned long) phys_to_virt(image->head & PAGE_MASK);
77 } else {
78 kexec_indirection_page = (unsigned long)&image->head;
79 }
76 80
77 memcpy((void*)reboot_code_buffer, relocate_new_kernel, 81 memcpy((void*)reboot_code_buffer, relocate_new_kernel,
78 relocate_new_kernel_size); 82 relocate_new_kernel_size);
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index f93b4cbec739..744cd10ba599 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -577,3 +577,5 @@ EXPORT(sys_call_table)
577 PTR sys_sched_getattr /* 4350 */ 577 PTR sys_sched_getattr /* 4350 */
578 PTR sys_renameat2 578 PTR sys_renameat2
579 PTR sys_seccomp 579 PTR sys_seccomp
580 PTR sys_getrandom
581 PTR sys_memfd_create
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index 03ebd9979ad2..002b1bc09c38 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -432,4 +432,6 @@ EXPORT(sys_call_table)
432 PTR sys_sched_getattr /* 5310 */ 432 PTR sys_sched_getattr /* 5310 */
433 PTR sys_renameat2 433 PTR sys_renameat2
434 PTR sys_seccomp 434 PTR sys_seccomp
435 PTR sys_getrandom
436 PTR sys_memfd_create
435 .size sys_call_table,.-sys_call_table 437 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index ebc9228e2e15..ca6cbbe9805b 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -425,4 +425,6 @@ EXPORT(sysn32_call_table)
425 PTR sys_sched_getattr 425 PTR sys_sched_getattr
426 PTR sys_renameat2 /* 6315 */ 426 PTR sys_renameat2 /* 6315 */
427 PTR sys_seccomp 427 PTR sys_seccomp
428 PTR sys_getrandom
429 PTR sys_memfd_create
428 .size sysn32_call_table,.-sysn32_call_table 430 .size sysn32_call_table,.-sysn32_call_table
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 25bb8400156d..9e10d11fbb84 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -562,4 +562,6 @@ EXPORT(sys32_call_table)
562 PTR sys_sched_getattr /* 4350 */ 562 PTR sys_sched_getattr /* 4350 */
563 PTR sys_renameat2 563 PTR sys_renameat2
564 PTR sys_seccomp 564 PTR sys_seccomp
565 PTR sys_getrandom
566 PTR sys_memfd_create
565 .size sys32_call_table,.-sys32_call_table 567 .size sys32_call_table,.-sys32_call_table
diff --git a/arch/mips/net/bpf_jit.c b/arch/mips/net/bpf_jit.c
index 05a56619ece2..9f7ecbda250c 100644
--- a/arch/mips/net/bpf_jit.c
+++ b/arch/mips/net/bpf_jit.c
@@ -793,6 +793,7 @@ static int build_body(struct jit_ctx *ctx)
793 const struct sock_filter *inst; 793 const struct sock_filter *inst;
794 unsigned int i, off, load_order, condt; 794 unsigned int i, off, load_order, condt;
795 u32 k, b_off __maybe_unused; 795 u32 k, b_off __maybe_unused;
796 int tmp;
796 797
797 for (i = 0; i < prog->len; i++) { 798 for (i = 0; i < prog->len; i++) {
798 u16 code; 799 u16 code;
@@ -1332,9 +1333,9 @@ jmp_cmp:
1332 case BPF_ANC | SKF_AD_PKTTYPE: 1333 case BPF_ANC | SKF_AD_PKTTYPE:
1333 ctx->flags |= SEEN_SKB; 1334 ctx->flags |= SEEN_SKB;
1334 1335
1335 off = pkt_type_offset(); 1336 tmp = off = pkt_type_offset();
1336 1337
1337 if (off < 0) 1338 if (tmp < 0)
1338 return -1; 1339 return -1;
1339 emit_load_byte(r_tmp, r_skb, off, ctx); 1340 emit_load_byte(r_tmp, r_skb, off, ctx);
1340 /* Keep only the last 3 bits */ 1341 /* Keep only the last 3 bits */