···8080 }81818282 /* Sorted insert of 75th percentile into buf2 */8383- for (k = 0; k < i; ++k) {8383+ for (k = 0; k < i && k < ARRAY_SIZE(buf2); ++k) {8484 if (buf1[ARRAY_SIZE(buf1) - 1] < buf2[k]) {8585 l = min_t(unsigned int,8686 i, ARRAY_SIZE(buf2) - 1);
+1-1
arch/mips/kernel/elf.c
···257257 else if ((prog_req.fr1 && prog_req.frdefault) ||258258 (prog_req.single && !prog_req.frdefault))259259 /* Make sure 64-bit MIPS III/IV/64R1 will not pick FR1 */260260- state->overall_fp_mode = ((current_cpu_data.fpu_id & MIPS_FPIR_F64) &&260260+ state->overall_fp_mode = ((raw_current_cpu_data.fpu_id & MIPS_FPIR_F64) &&261261 cpu_has_mips_r2_r6) ?262262 FP_FR1 : FP_FR0;263263 else if (prog_req.fr1)
+32-14
arch/mips/kernel/kgdb.c
···244244void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p)245245{246246 int reg;247247- struct thread_info *ti = task_thread_info(p);248248- unsigned long ksp = (unsigned long)ti + THREAD_SIZE - 32;249249- struct pt_regs *regs = (struct pt_regs *)ksp - 1;250247#if (KGDB_GDB_REG_SIZE == 32)251248 u32 *ptr = (u32 *)gdb_regs;252249#else···251254#endif252255253256 for (reg = 0; reg < 16; reg++)254254- *(ptr++) = regs->regs[reg];257257+ *(ptr++) = 0;255258256259 /* S0 - S7 */257257- for (reg = 16; reg < 24; reg++)258258- *(ptr++) = regs->regs[reg];260260+ *(ptr++) = p->thread.reg16;261261+ *(ptr++) = p->thread.reg17;262262+ *(ptr++) = p->thread.reg18;263263+ *(ptr++) = p->thread.reg19;264264+ *(ptr++) = p->thread.reg20;265265+ *(ptr++) = p->thread.reg21;266266+ *(ptr++) = p->thread.reg22;267267+ *(ptr++) = p->thread.reg23;259268260269 for (reg = 24; reg < 28; reg++)261270 *(ptr++) = 0;262271263272 /* GP, SP, FP, RA */264264- for (reg = 28; reg < 32; reg++)265265- *(ptr++) = regs->regs[reg];273273+ *(ptr++) = (long)p;274274+ *(ptr++) = p->thread.reg29;275275+ *(ptr++) = p->thread.reg30;276276+ *(ptr++) = p->thread.reg31;266277267267- *(ptr++) = regs->cp0_status;268268- *(ptr++) = regs->lo;269269- *(ptr++) = regs->hi;270270- *(ptr++) = regs->cp0_badvaddr;271271- *(ptr++) = regs->cp0_cause;272272- *(ptr++) = regs->cp0_epc;278278+ *(ptr++) = p->thread.cp0_status;279279+280280+ /* lo, hi */281281+ *(ptr++) = 0;282282+ *(ptr++) = 0;283283+284284+ /*285285+ * BadVAddr, Cause286286+ * Ideally these would come from the last exception frame up the stack287287+ * but that requires unwinding, otherwise we can't know much for sure.288288+ */289289+ *(ptr++) = 0;290290+ *(ptr++) = 0;291291+292292+ /*293293+ * PC294294+ * use return address (RA), i.e. the moment after return from resume()295295+ */296296+ *(ptr++) = p->thread.reg31;273297}274298275299void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc)
+5-4
arch/mips/kernel/perf_event_mipsxx.c
···14461446 HANDLE_COUNTER(0)14471447 }1448144814491449+#ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS14501450+ read_unlock(&pmuint_rwlock);14511451+#endif14521452+ resume_local_counters();14531453+14491454 /*14501455 * Do all the work for the pending perf events. We can do this14511456 * in here because the performance counter interrupt is a regular···14591454 if (handled == IRQ_HANDLED)14601455 irq_work_run();1461145614621462-#ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS14631463- read_unlock(&pmuint_rwlock);14641464-#endif14651465- resume_local_counters();14661457 return handled;14671458}14681459
···422422 local_irq_disable();423423 idle_task_exit();424424 cpu = smp_processor_id();425425+ core = cpu_data[cpu].core;425426 cpu_death = CPU_DEATH_POWER;426427427428 pr_debug("CPU%d going offline\n", cpu);428429429430 if (cpu_has_mipsmt || cpu_has_vp) {430430- core = cpu_data[cpu].core;431431-432431 /* Look for another online VPE within the core */433432 for_each_online_cpu(cpu_death_sibling) {434433 if (cpu_data[cpu_death_sibling].core != core)
+11
arch/mips/mti-malta/malta-int.c
···176176{177177 int corehi_irq;178178179179+ /*180180+ * Preallocate the i8259's expected virq's here. Since irqchip_init()181181+ * will probe the irqchips in hierarchial order, i8259 is probed last.182182+ * If anything allocates a virq before the i8259 is probed, it will183183+ * be given one of the i8259's expected range and consequently setup184184+ * of the i8259 will fail.185185+ */186186+ WARN(irq_alloc_descs(I8259A_IRQ_BASE, I8259A_IRQ_BASE,187187+ 16, numa_node_id()) < 0,188188+ "Cannot reserve i8259 virqs at IRQ%d\n", I8259A_IRQ_BASE);189189+179190 i8259_set_poll(mips_pcibios_iack);180191 irqchip_init();181192