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

Commit 3bab0bf0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull third set of powerpc updates from Benjamin Herrenschmidt:
 "This is a small collection of random bug fixes and a few improvements
  of Oops output which I deemed valuable enough to include as well.

  The fixes are essentially recent build breakage and regressions, and a
  couple of older bugs such as the DTL log duplication, the EEH issue
  with PCI_COMMAND_MASTER and the problem with small contexts passed to
  get/set_context with VSX enabled"

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/signals: Mark VSX not saved with small contexts
  powerpc/pseries: Fix SMP=n build of rng.c
  powerpc: Make cpu_to_chip_id() available when SMP=n
  powerpc/vio: Fix a dma_mask issue of vio
  powerpc: booke: Fix build failures
  powerpc: ppc64 address space capped at 32TB, mmap randomisation disabled
  powerpc: Only print PACATMSCRATCH in oops when TM is active
  powerpc/pseries: Duplicate dtl entries sometimes sent to userspace
  powerpc: Remove a few lines of oops output
  powerpc: Print DAR and DSISR on machine check oopses
  powerpc: Fix __get_user_pages_fast() irq handling
  powerpc/eeh: More accurate log
  powerpc/eeh: Enable PCI_COMMAND_MASTER for PCI bridges
parents a5d6e633 c13f20ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ extern int boot_cpuid;
extern int spinning_secondaries;

extern void cpu_die(void);
extern int cpu_to_chip_id(int cpu);

#ifdef CONFIG_SMP

@@ -112,7 +113,6 @@ static inline struct cpumask *cpu_core_mask(int cpu)
}

extern int cpu_to_core_id(int cpu);
extern int cpu_to_chip_id(int cpu);

/* Since OpenPIC has only 4 IPIs, we use slightly different message numbers.
 *
+9 −0
Original line number Diff line number Diff line
@@ -686,6 +686,15 @@ void eeh_save_bars(struct eeh_dev *edev)

	for (i = 0; i < 16; i++)
		eeh_ops->read_config(dn, i * 4, 4, &edev->config_space[i]);

	/*
	 * For PCI bridges including root port, we need enable bus
	 * master explicitly. Otherwise, it can't fetch IODA table
	 * entries correctly. So we cache the bit in advance so that
	 * we can restore it after reset, either PHB range or PE range.
	 */
	if (edev->mode & EEH_DEV_BRIDGE)
		edev->config_space[1] |= PCI_COMMAND_MASTER;
}

/**
+7 −2
Original line number Diff line number Diff line
@@ -74,7 +74,12 @@ static int eeh_event_handler(void * dummy)
		pe = event->pe;
		if (pe) {
			eeh_pe_state_mark(pe, EEH_PE_RECOVERING);
			pr_info("EEH: Detected PCI bus error on PHB#%d-PE#%x\n",
			if (pe->type & EEH_PE_PHB)
				pr_info("EEH: Detected error on PHB#%d\n",
					 pe->phb->global_number);
			else
				pr_info("EEH: Detected PCI bus error on "
					"PHB#%d-PE#%x\n",
					pe->phb->global_number, pe->addr);
			eeh_handle_event(pe);
			eeh_pe_state_clear(pe, EEH_PE_RECOVERING);
+11 −10
Original line number Diff line number Diff line
@@ -858,17 +858,21 @@ void show_regs(struct pt_regs * regs)
	printk("MSR: "REG" ", regs->msr);
	printbits(regs->msr, msr_bits);
	printk("  CR: %08lx  XER: %08lx\n", regs->ccr, regs->xer);
#ifdef CONFIG_PPC64
	printk("SOFTE: %ld\n", regs->softe);
#endif
	trap = TRAP(regs);
	if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR))
		printk("CFAR: "REG"\n", regs->orig_gpr3);
	if (trap == 0x300 || trap == 0x600)
		printk("CFAR: "REG" ", regs->orig_gpr3);
	if (trap == 0x200 || trap == 0x300 || trap == 0x600)
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
		printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr);
		printk("DEAR: "REG" ESR: "REG" ", regs->dar, regs->dsisr);
#else
		printk("DAR: "REG", DSISR: %08lx\n", regs->dar, regs->dsisr);
		printk("DAR: "REG" DSISR: %08lx ", regs->dar, regs->dsisr);
#endif
#ifdef CONFIG_PPC64
	printk("SOFTE: %ld ", regs->softe);
#endif
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
	if (MSR_TM_ACTIVE(regs->msr))
		printk("\nPACATMSCRATCH: %016llx ", get_paca()->tm_scratch);
#endif

	for (i = 0;  i < 32;  i++) {
@@ -886,9 +890,6 @@ void show_regs(struct pt_regs * regs)
	 */
	printk("NIP ["REG"] %pS\n", regs->nip, (void *)regs->nip);
	printk("LR ["REG"] %pS\n", regs->link, (void *)regs->link);
#endif
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
	printk("PACATMSCRATCH [%llx]\n", get_paca()->tm_scratch);
#endif
	show_stack(current, (unsigned long *) regs->gpr[1]);
	if (!user_mode(regs))
+20 −0
Original line number Diff line number Diff line
@@ -777,6 +777,26 @@ int of_get_ibm_chip_id(struct device_node *np)
	return -1;
}

/**
 * cpu_to_chip_id - Return the cpus chip-id
 * @cpu: The logical cpu number.
 *
 * Return the value of the ibm,chip-id property corresponding to the given
 * logical cpu number. If the chip-id can not be found, returns -1.
 */
int cpu_to_chip_id(int cpu)
{
	struct device_node *np;

	np = of_get_cpu_node(cpu, NULL);
	if (!np)
		return -1;

	of_node_put(np);
	return of_get_ibm_chip_id(np);
}
EXPORT_SYMBOL(cpu_to_chip_id);

#ifdef CONFIG_PPC_PSERIES
/*
 * Fix up the uninitialized fields in a new device node:
Loading