diff options
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/cps-vec.S | 4 | ||||
-rw-r--r-- | arch/mips/kernel/machine_kexec.c | 8 | ||||
-rw-r--r-- | arch/mips/kernel/mcount.S | 12 | ||||
-rw-r--r-- | arch/mips/kernel/perf_event_mipsxx.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/scall32-o32.S | 2 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-64.S | 2 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-n32.S | 2 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-o32.S | 14 |
8 files changed, 39 insertions, 7 deletions
diff --git a/arch/mips/kernel/cps-vec.S b/arch/mips/kernel/cps-vec.S index 6f4f739dad96..e6e97d2a5c9e 100644 --- a/arch/mips/kernel/cps-vec.S +++ b/arch/mips/kernel/cps-vec.S | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <asm/asm-offsets.h> | 13 | #include <asm/asm-offsets.h> |
14 | #include <asm/asmmacro.h> | 14 | #include <asm/asmmacro.h> |
15 | #include <asm/cacheops.h> | 15 | #include <asm/cacheops.h> |
16 | #include <asm/eva.h> | ||
16 | #include <asm/mipsregs.h> | 17 | #include <asm/mipsregs.h> |
17 | #include <asm/mipsmtregs.h> | 18 | #include <asm/mipsmtregs.h> |
18 | #include <asm/pm.h> | 19 | #include <asm/pm.h> |
@@ -166,6 +167,9 @@ dcache_done: | |||
166 | 1: jal mips_cps_core_init | 167 | 1: jal mips_cps_core_init |
167 | nop | 168 | nop |
168 | 169 | ||
170 | /* Do any EVA initialization if necessary */ | ||
171 | eva_init | ||
172 | |||
169 | /* | 173 | /* |
170 | * Boot any other VPEs within this core that should be online, and | 174 | * Boot any other VPEs within this core that should be online, and |
171 | * deactivate this VPE if it should be offline. | 175 | * deactivate this VPE if it should be offline. |
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/mcount.S b/arch/mips/kernel/mcount.S index 5d25462de8a6..2f7c734771f4 100644 --- a/arch/mips/kernel/mcount.S +++ b/arch/mips/kernel/mcount.S | |||
@@ -129,7 +129,11 @@ NESTED(_mcount, PT_SIZE, ra) | |||
129 | nop | 129 | nop |
130 | #endif | 130 | #endif |
131 | b ftrace_stub | 131 | b ftrace_stub |
132 | #ifdef CONFIG_32BIT | ||
133 | addiu sp, sp, 8 | ||
134 | #else | ||
132 | nop | 135 | nop |
136 | #endif | ||
133 | 137 | ||
134 | static_trace: | 138 | static_trace: |
135 | MCOUNT_SAVE_REGS | 139 | MCOUNT_SAVE_REGS |
@@ -139,6 +143,9 @@ static_trace: | |||
139 | move a1, AT /* arg2: parent's return address */ | 143 | move a1, AT /* arg2: parent's return address */ |
140 | 144 | ||
141 | MCOUNT_RESTORE_REGS | 145 | MCOUNT_RESTORE_REGS |
146 | #ifdef CONFIG_32BIT | ||
147 | addiu sp, sp, 8 | ||
148 | #endif | ||
142 | .globl ftrace_stub | 149 | .globl ftrace_stub |
143 | ftrace_stub: | 150 | ftrace_stub: |
144 | RETURN_BACK | 151 | RETURN_BACK |
@@ -183,6 +190,11 @@ NESTED(ftrace_graph_caller, PT_SIZE, ra) | |||
183 | jal prepare_ftrace_return | 190 | jal prepare_ftrace_return |
184 | nop | 191 | nop |
185 | MCOUNT_RESTORE_REGS | 192 | MCOUNT_RESTORE_REGS |
193 | #ifndef CONFIG_DYNAMIC_FTRACE | ||
194 | #ifdef CONFIG_32BIT | ||
195 | addiu sp, sp, 8 | ||
196 | #endif | ||
197 | #endif | ||
186 | RETURN_BACK | 198 | RETURN_BACK |
187 | END(ftrace_graph_caller) | 199 | END(ftrace_graph_caller) |
188 | 200 | ||
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c index 14bf74b0f51c..b63f2482f288 100644 --- a/arch/mips/kernel/perf_event_mipsxx.c +++ b/arch/mips/kernel/perf_event_mipsxx.c | |||
@@ -558,7 +558,7 @@ static int mipspmu_get_irq(void) | |||
558 | if (mipspmu.irq >= 0) { | 558 | if (mipspmu.irq >= 0) { |
559 | /* Request my own irq handler. */ | 559 | /* Request my own irq handler. */ |
560 | err = request_irq(mipspmu.irq, mipsxx_pmu_handle_irq, | 560 | err = request_irq(mipspmu.irq, mipsxx_pmu_handle_irq, |
561 | IRQF_PERCPU | IRQF_NOBALANCING, | 561 | IRQF_PERCPU | IRQF_NOBALANCING | IRQF_NO_THREAD, |
562 | "mips_perf_pmu", NULL); | 562 | "mips_perf_pmu", NULL); |
563 | if (err) { | 563 | if (err) { |
564 | pr_warning("Unable to request IRQ%d for MIPS " | 564 | pr_warning("Unable to request IRQ%d for MIPS " |
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 13b964fddc4a..9e10d11fbb84 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -113,15 +113,19 @@ trace_a_syscall: | |||
113 | move s0, t2 # Save syscall pointer | 113 | move s0, t2 # Save syscall pointer |
114 | move a0, sp | 114 | move a0, sp |
115 | /* | 115 | /* |
116 | * syscall number is in v0 unless we called syscall(__NR_###) | 116 | * absolute syscall number is in v0 unless we called syscall(__NR_###) |
117 | * where the real syscall number is in a0 | 117 | * where the real syscall number is in a0 |
118 | * note: NR_syscall is the first O32 syscall but the macro is | 118 | * note: NR_syscall is the first O32 syscall but the macro is |
119 | * only defined when compiling with -mabi=32 (CONFIG_32BIT) | 119 | * only defined when compiling with -mabi=32 (CONFIG_32BIT) |
120 | * therefore __NR_O32_Linux is used (4000) | 120 | * therefore __NR_O32_Linux is used (4000) |
121 | */ | 121 | */ |
122 | addiu a1, v0, __NR_O32_Linux | 122 | .set push |
123 | bnez v0, 1f /* __NR_syscall at offset 0 */ | 123 | .set reorder |
124 | lw a1, PT_R4(sp) | 124 | subu t1, v0, __NR_O32_Linux |
125 | move a1, v0 | ||
126 | bnez t1, 1f /* __NR_syscall at offset 0 */ | ||
127 | lw a1, PT_R4(sp) /* Arg1 for __NR_syscall case */ | ||
128 | .set pop | ||
125 | 129 | ||
126 | 1: jal syscall_trace_enter | 130 | 1: jal syscall_trace_enter |
127 | 131 | ||
@@ -558,4 +562,6 @@ EXPORT(sys32_call_table) | |||
558 | PTR sys_sched_getattr /* 4350 */ | 562 | PTR sys_sched_getattr /* 4350 */ |
559 | PTR sys_renameat2 | 563 | PTR sys_renameat2 |
560 | PTR sys_seccomp | 564 | PTR sys_seccomp |
565 | PTR sys_getrandom | ||
566 | PTR sys_memfd_create | ||
561 | .size sys32_call_table,.-sys32_call_table | 567 | .size sys32_call_table,.-sys32_call_table |