diff options
-rw-r--r-- | arch/mips/Makefile | 6 | ||||
-rw-r--r-- | arch/mips/include/asm/asm-prototypes.h | 1 | ||||
-rw-r--r-- | arch/mips/kernel/cevt-r4k.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/elf.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/kgdb.c | 48 | ||||
-rw-r--r-- | arch/mips/kernel/perf_event_mipsxx.c | 9 | ||||
-rw-r--r-- | arch/mips/kernel/relocate.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/smp-cps.c | 3 | ||||
-rw-r--r-- | arch/mips/mti-malta/malta-int.c | 11 |
9 files changed, 57 insertions, 27 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 8ef9c02747fa..02a1787c888c 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -489,7 +489,7 @@ $(generic_defconfigs): | |||
489 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ | 489 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ |
490 | -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/generic_defconfig $^ \ | 490 | -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/generic_defconfig $^ \ |
491 | $(foreach board,$(BOARDS),$(generic_config_dir)/board-$(board).config) | 491 | $(foreach board,$(BOARDS),$(generic_config_dir)/board-$(board).config) |
492 | $(Q)$(MAKE) olddefconfig | 492 | $(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig |
493 | 493 | ||
494 | # | 494 | # |
495 | # Prevent generic merge_config rules attempting to merge single fragments | 495 | # Prevent generic merge_config rules attempting to merge single fragments |
@@ -503,8 +503,8 @@ $(generic_config_dir)/%.config: ; | |||
503 | # | 503 | # |
504 | .PHONY: sead3_defconfig | 504 | .PHONY: sead3_defconfig |
505 | sead3_defconfig: | 505 | sead3_defconfig: |
506 | $(Q)$(MAKE) 32r2el_defconfig BOARDS=sead-3 | 506 | $(Q)$(MAKE) -f $(srctree)/Makefile 32r2el_defconfig BOARDS=sead-3 |
507 | 507 | ||
508 | .PHONY: sead3micro_defconfig | 508 | .PHONY: sead3micro_defconfig |
509 | sead3micro_defconfig: | 509 | sead3micro_defconfig: |
510 | $(Q)$(MAKE) micro32r2el_defconfig BOARDS=sead-3 | 510 | $(Q)$(MAKE) -f $(srctree)/Makefile micro32r2el_defconfig BOARDS=sead-3 |
diff --git a/arch/mips/include/asm/asm-prototypes.h b/arch/mips/include/asm/asm-prototypes.h index a160cf69bb92..6e28971fe73a 100644 --- a/arch/mips/include/asm/asm-prototypes.h +++ b/arch/mips/include/asm/asm-prototypes.h | |||
@@ -3,3 +3,4 @@ | |||
3 | #include <asm/fpu.h> | 3 | #include <asm/fpu.h> |
4 | #include <asm-generic/asm-prototypes.h> | 4 | #include <asm-generic/asm-prototypes.h> |
5 | #include <asm/uaccess.h> | 5 | #include <asm/uaccess.h> |
6 | #include <asm/ftrace.h> | ||
diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c index 804d2a2a19fe..dd6a18bc10ab 100644 --- a/arch/mips/kernel/cevt-r4k.c +++ b/arch/mips/kernel/cevt-r4k.c | |||
@@ -80,7 +80,7 @@ static unsigned int calculate_min_delta(void) | |||
80 | } | 80 | } |
81 | 81 | ||
82 | /* Sorted insert of 75th percentile into buf2 */ | 82 | /* Sorted insert of 75th percentile into buf2 */ |
83 | for (k = 0; k < i; ++k) { | 83 | for (k = 0; k < i && k < ARRAY_SIZE(buf2); ++k) { |
84 | if (buf1[ARRAY_SIZE(buf1) - 1] < buf2[k]) { | 84 | if (buf1[ARRAY_SIZE(buf1) - 1] < buf2[k]) { |
85 | l = min_t(unsigned int, | 85 | l = min_t(unsigned int, |
86 | i, ARRAY_SIZE(buf2) - 1); | 86 | i, ARRAY_SIZE(buf2) - 1); |
diff --git a/arch/mips/kernel/elf.c b/arch/mips/kernel/elf.c index 6430bff21fff..5c429d70e17f 100644 --- a/arch/mips/kernel/elf.c +++ b/arch/mips/kernel/elf.c | |||
@@ -257,7 +257,7 @@ int arch_check_elf(void *_ehdr, bool has_interpreter, void *_interp_ehdr, | |||
257 | else if ((prog_req.fr1 && prog_req.frdefault) || | 257 | else if ((prog_req.fr1 && prog_req.frdefault) || |
258 | (prog_req.single && !prog_req.frdefault)) | 258 | (prog_req.single && !prog_req.frdefault)) |
259 | /* Make sure 64-bit MIPS III/IV/64R1 will not pick FR1 */ | 259 | /* Make sure 64-bit MIPS III/IV/64R1 will not pick FR1 */ |
260 | state->overall_fp_mode = ((current_cpu_data.fpu_id & MIPS_FPIR_F64) && | 260 | state->overall_fp_mode = ((raw_current_cpu_data.fpu_id & MIPS_FPIR_F64) && |
261 | cpu_has_mips_r2_r6) ? | 261 | cpu_has_mips_r2_r6) ? |
262 | FP_FR1 : FP_FR0; | 262 | FP_FR1 : FP_FR0; |
263 | else if (prog_req.fr1) | 263 | else if (prog_req.fr1) |
diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c index 1f4bd222ba76..eb6c0d582626 100644 --- a/arch/mips/kernel/kgdb.c +++ b/arch/mips/kernel/kgdb.c | |||
@@ -244,9 +244,6 @@ static int compute_signal(int tt) | |||
244 | void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) | 244 | void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) |
245 | { | 245 | { |
246 | int reg; | 246 | int reg; |
247 | struct thread_info *ti = task_thread_info(p); | ||
248 | unsigned long ksp = (unsigned long)ti + THREAD_SIZE - 32; | ||
249 | struct pt_regs *regs = (struct pt_regs *)ksp - 1; | ||
250 | #if (KGDB_GDB_REG_SIZE == 32) | 247 | #if (KGDB_GDB_REG_SIZE == 32) |
251 | u32 *ptr = (u32 *)gdb_regs; | 248 | u32 *ptr = (u32 *)gdb_regs; |
252 | #else | 249 | #else |
@@ -254,25 +251,46 @@ void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) | |||
254 | #endif | 251 | #endif |
255 | 252 | ||
256 | for (reg = 0; reg < 16; reg++) | 253 | for (reg = 0; reg < 16; reg++) |
257 | *(ptr++) = regs->regs[reg]; | 254 | *(ptr++) = 0; |
258 | 255 | ||
259 | /* S0 - S7 */ | 256 | /* S0 - S7 */ |
260 | for (reg = 16; reg < 24; reg++) | 257 | *(ptr++) = p->thread.reg16; |
261 | *(ptr++) = regs->regs[reg]; | 258 | *(ptr++) = p->thread.reg17; |
259 | *(ptr++) = p->thread.reg18; | ||
260 | *(ptr++) = p->thread.reg19; | ||
261 | *(ptr++) = p->thread.reg20; | ||
262 | *(ptr++) = p->thread.reg21; | ||
263 | *(ptr++) = p->thread.reg22; | ||
264 | *(ptr++) = p->thread.reg23; | ||
262 | 265 | ||
263 | for (reg = 24; reg < 28; reg++) | 266 | for (reg = 24; reg < 28; reg++) |
264 | *(ptr++) = 0; | 267 | *(ptr++) = 0; |
265 | 268 | ||
266 | /* GP, SP, FP, RA */ | 269 | /* GP, SP, FP, RA */ |
267 | for (reg = 28; reg < 32; reg++) | 270 | *(ptr++) = (long)p; |
268 | *(ptr++) = regs->regs[reg]; | 271 | *(ptr++) = p->thread.reg29; |
269 | 272 | *(ptr++) = p->thread.reg30; | |
270 | *(ptr++) = regs->cp0_status; | 273 | *(ptr++) = p->thread.reg31; |
271 | *(ptr++) = regs->lo; | 274 | |
272 | *(ptr++) = regs->hi; | 275 | *(ptr++) = p->thread.cp0_status; |
273 | *(ptr++) = regs->cp0_badvaddr; | 276 | |
274 | *(ptr++) = regs->cp0_cause; | 277 | /* lo, hi */ |
275 | *(ptr++) = regs->cp0_epc; | 278 | *(ptr++) = 0; |
279 | *(ptr++) = 0; | ||
280 | |||
281 | /* | ||
282 | * BadVAddr, Cause | ||
283 | * Ideally these would come from the last exception frame up the stack | ||
284 | * but that requires unwinding, otherwise we can't know much for sure. | ||
285 | */ | ||
286 | *(ptr++) = 0; | ||
287 | *(ptr++) = 0; | ||
288 | |||
289 | /* | ||
290 | * PC | ||
291 | * use return address (RA), i.e. the moment after return from resume() | ||
292 | */ | ||
293 | *(ptr++) = p->thread.reg31; | ||
276 | } | 294 | } |
277 | 295 | ||
278 | void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) | 296 | void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) |
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c index 8c35b3152e1e..9452b02ce079 100644 --- a/arch/mips/kernel/perf_event_mipsxx.c +++ b/arch/mips/kernel/perf_event_mipsxx.c | |||
@@ -1446,6 +1446,11 @@ static int mipsxx_pmu_handle_shared_irq(void) | |||
1446 | HANDLE_COUNTER(0) | 1446 | HANDLE_COUNTER(0) |
1447 | } | 1447 | } |
1448 | 1448 | ||
1449 | #ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS | ||
1450 | read_unlock(&pmuint_rwlock); | ||
1451 | #endif | ||
1452 | resume_local_counters(); | ||
1453 | |||
1449 | /* | 1454 | /* |
1450 | * Do all the work for the pending perf events. We can do this | 1455 | * Do all the work for the pending perf events. We can do this |
1451 | * in here because the performance counter interrupt is a regular | 1456 | * in here because the performance counter interrupt is a regular |
@@ -1454,10 +1459,6 @@ static int mipsxx_pmu_handle_shared_irq(void) | |||
1454 | if (handled == IRQ_HANDLED) | 1459 | if (handled == IRQ_HANDLED) |
1455 | irq_work_run(); | 1460 | irq_work_run(); |
1456 | 1461 | ||
1457 | #ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS | ||
1458 | read_unlock(&pmuint_rwlock); | ||
1459 | #endif | ||
1460 | resume_local_counters(); | ||
1461 | return handled; | 1462 | return handled; |
1462 | } | 1463 | } |
1463 | 1464 | ||
diff --git a/arch/mips/kernel/relocate.c b/arch/mips/kernel/relocate.c index 9103bebc9a8e..2d1a0c438771 100644 --- a/arch/mips/kernel/relocate.c +++ b/arch/mips/kernel/relocate.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/libfdt.h> | 19 | #include <linux/libfdt.h> |
20 | #include <linux/of_fdt.h> | 20 | #include <linux/of_fdt.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched/task.h> |
22 | #include <linux/start_kernel.h> | 22 | #include <linux/start_kernel.h> |
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/printk.h> | 24 | #include <linux/printk.h> |
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index 306b4a64cb8f..36954ddd0b9f 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c | |||
@@ -422,13 +422,12 @@ void play_dead(void) | |||
422 | local_irq_disable(); | 422 | local_irq_disable(); |
423 | idle_task_exit(); | 423 | idle_task_exit(); |
424 | cpu = smp_processor_id(); | 424 | cpu = smp_processor_id(); |
425 | core = cpu_data[cpu].core; | ||
425 | cpu_death = CPU_DEATH_POWER; | 426 | cpu_death = CPU_DEATH_POWER; |
426 | 427 | ||
427 | pr_debug("CPU%d going offline\n", cpu); | 428 | pr_debug("CPU%d going offline\n", cpu); |
428 | 429 | ||
429 | if (cpu_has_mipsmt || cpu_has_vp) { | 430 | if (cpu_has_mipsmt || cpu_has_vp) { |
430 | core = cpu_data[cpu].core; | ||
431 | |||
432 | /* Look for another online VPE within the core */ | 431 | /* Look for another online VPE within the core */ |
433 | for_each_online_cpu(cpu_death_sibling) { | 432 | for_each_online_cpu(cpu_death_sibling) { |
434 | if (cpu_data[cpu_death_sibling].core != core) | 433 | if (cpu_data[cpu_death_sibling].core != core) |
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c index fe9bb479f2a0..b0f9b188e833 100644 --- a/arch/mips/mti-malta/malta-int.c +++ b/arch/mips/mti-malta/malta-int.c | |||
@@ -176,6 +176,17 @@ void __init arch_init_irq(void) | |||
176 | { | 176 | { |
177 | int corehi_irq; | 177 | int corehi_irq; |
178 | 178 | ||
179 | /* | ||
180 | * Preallocate the i8259's expected virq's here. Since irqchip_init() | ||
181 | * will probe the irqchips in hierarchial order, i8259 is probed last. | ||
182 | * If anything allocates a virq before the i8259 is probed, it will | ||
183 | * be given one of the i8259's expected range and consequently setup | ||
184 | * of the i8259 will fail. | ||
185 | */ | ||
186 | WARN(irq_alloc_descs(I8259A_IRQ_BASE, I8259A_IRQ_BASE, | ||
187 | 16, numa_node_id()) < 0, | ||
188 | "Cannot reserve i8259 virqs at IRQ%d\n", I8259A_IRQ_BASE); | ||
189 | |||
179 | i8259_set_poll(mips_pcibios_iack); | 190 | i8259_set_poll(mips_pcibios_iack); |
180 | irqchip_init(); | 191 | irqchip_init(); |
181 | 192 | ||