Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d339d33 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MIPS fixes from Ralf Baechle:
 "Another round of 4.11 for the MIPS architecture. This time around it's
  mostly arch but little platforms-specific code.

   - PCI: Register controllers in the right order to aoid a PCI error
   - KGDB: Use kernel context for sleeping threads
   - smp-cps: Fix potentially uninitialised value of core
   - KASLR: Fix build
   - ELF: Fix BUG() warning in arch_check_elf
   - Fix modversioning of _mcount symbol
   - fix out-of-tree defconfig target builds
   - cevt-r4k: Fix out-of-bounds array access
   - perf: fix deadlock
   - Malta: Fix i8259 irqchip setup"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: PCI: add controllers before the specified head
  MIPS: KGDB: Use kernel context for sleeping threads
  MIPS: smp-cps: Fix potentially uninitialised value of core
  MIPS: KASLR: Add missing header files
  MIPS: Avoid BUG warning in arch_check_elf
  MIPS: Fix modversioning of _mcount symbol
  MIPS: generic: fix out-of-tree defconfig target builds
  MIPS: cevt-r4k: Fix out-of-bounds array access
  MIPS: perf: fix deadlock
  MIPS: Malta: Fix i8259 irqchip setup
parents 5a7ad114 edb0b6a0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -489,7 +489,7 @@ $(generic_defconfigs):
	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
		-m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/generic_defconfig $^ \
		$(foreach board,$(BOARDS),$(generic_config_dir)/board-$(board).config)
	$(Q)$(MAKE) olddefconfig
	$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig

#
# Prevent generic merge_config rules attempting to merge single fragments
@@ -503,8 +503,8 @@ $(generic_config_dir)/%.config: ;
#
.PHONY: sead3_defconfig
sead3_defconfig:
	$(Q)$(MAKE) 32r2el_defconfig BOARDS=sead-3
	$(Q)$(MAKE) -f $(srctree)/Makefile 32r2el_defconfig BOARDS=sead-3

.PHONY: sead3micro_defconfig
sead3micro_defconfig:
	$(Q)$(MAKE) micro32r2el_defconfig BOARDS=sead-3
	$(Q)$(MAKE) -f $(srctree)/Makefile micro32r2el_defconfig BOARDS=sead-3
+1 −0
Original line number Diff line number Diff line
@@ -3,3 +3,4 @@
#include <asm/fpu.h>
#include <asm-generic/asm-prototypes.h>
#include <asm/uaccess.h>
#include <asm/ftrace.h>
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ static unsigned int calculate_min_delta(void)
		}

		/* Sorted insert of 75th percentile into buf2 */
		for (k = 0; k < i; ++k) {
		for (k = 0; k < i && k < ARRAY_SIZE(buf2); ++k) {
			if (buf1[ARRAY_SIZE(buf1) - 1] < buf2[k]) {
				l = min_t(unsigned int,
					  i, ARRAY_SIZE(buf2) - 1);
+1 −1
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ int arch_check_elf(void *_ehdr, bool has_interpreter, void *_interp_ehdr,
	else if ((prog_req.fr1 && prog_req.frdefault) ||
		 (prog_req.single && !prog_req.frdefault))
		/* Make sure 64-bit MIPS III/IV/64R1 will not pick FR1 */
		state->overall_fp_mode = ((current_cpu_data.fpu_id & MIPS_FPIR_F64) &&
		state->overall_fp_mode = ((raw_current_cpu_data.fpu_id & MIPS_FPIR_F64) &&
					  cpu_has_mips_r2_r6) ?
					  FP_FR1 : FP_FR0;
	else if (prog_req.fr1)
+33 −15
Original line number Diff line number Diff line
@@ -244,9 +244,6 @@ static int compute_signal(int tt)
void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p)
{
	int reg;
	struct thread_info *ti = task_thread_info(p);
	unsigned long ksp = (unsigned long)ti + THREAD_SIZE - 32;
	struct pt_regs *regs = (struct pt_regs *)ksp - 1;
#if (KGDB_GDB_REG_SIZE == 32)
	u32 *ptr = (u32 *)gdb_regs;
#else
@@ -254,25 +251,46 @@ void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p)
#endif

	for (reg = 0; reg < 16; reg++)
		*(ptr++) = regs->regs[reg];
		*(ptr++) = 0;

	/* S0 - S7 */
	for (reg = 16; reg < 24; reg++)
		*(ptr++) = regs->regs[reg];
	*(ptr++) = p->thread.reg16;
	*(ptr++) = p->thread.reg17;
	*(ptr++) = p->thread.reg18;
	*(ptr++) = p->thread.reg19;
	*(ptr++) = p->thread.reg20;
	*(ptr++) = p->thread.reg21;
	*(ptr++) = p->thread.reg22;
	*(ptr++) = p->thread.reg23;

	for (reg = 24; reg < 28; reg++)
		*(ptr++) = 0;

	/* GP, SP, FP, RA */
	for (reg = 28; reg < 32; reg++)
		*(ptr++) = regs->regs[reg];

	*(ptr++) = regs->cp0_status;
	*(ptr++) = regs->lo;
	*(ptr++) = regs->hi;
	*(ptr++) = regs->cp0_badvaddr;
	*(ptr++) = regs->cp0_cause;
	*(ptr++) = regs->cp0_epc;
	*(ptr++) = (long)p;
	*(ptr++) = p->thread.reg29;
	*(ptr++) = p->thread.reg30;
	*(ptr++) = p->thread.reg31;

	*(ptr++) = p->thread.cp0_status;

	/* lo, hi */
	*(ptr++) = 0;
	*(ptr++) = 0;

	/*
	 * BadVAddr, Cause
	 * Ideally these would come from the last exception frame up the stack
	 * but that requires unwinding, otherwise we can't know much for sure.
	 */
	*(ptr++) = 0;
	*(ptr++) = 0;

	/*
	 * PC
	 * use return address (RA), i.e. the moment after return from resume()
	 */
	*(ptr++) = p->thread.reg31;
}

void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc)
Loading