Commit c6653f49 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull powerpc fixes from Michael Ellerman:

 - Fix unnecessary copy to 0 when kernel is booted at address 0

 - Fix usercopy crash when dumping dtl via debugfs

 - Avoid possible crash when PCI hotplug races with error handling

 - Fix kexec crash caused by scv being disabled before other CPUs
   call-in

 - Fix powerpc selftests build with USERCFLAGS set

Thanks to Anjali K, Ganesh Goudar, Gautam Menghani, Jinglin Wen,
Nicholas Piggin, Sourabh Jain, Srikar Dronamraju, and Vishal Chourasia.

* tag 'powerpc-6.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  selftests/powerpc: Fix build with USERCFLAGS set
  powerpc/pseries: Fix scv instruction crash with kexec
  powerpc/eeh: avoid possible crash when edev->pdev changes
  powerpc/pseries: Whitelist dtl slub object for copying to userspace
  powerpc/64s: Fix unnecessary copy to 0 when kernel is booted at address 0
parents 256fdd4b 8b7f59de
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -849,6 +849,7 @@ struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe)
{
	struct eeh_dev *edev;
	struct pci_dev *pdev;
	struct pci_bus *bus = NULL;

	if (pe->type & EEH_PE_PHB)
		return pe->phb->bus;
@@ -859,9 +860,11 @@ struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe)

	/* Retrieve the parent PCI bus of first (top) PCI device */
	edev = list_first_entry_or_null(&pe->edevs, struct eeh_dev, entry);
	pci_lock_rescan_remove();
	pdev = eeh_dev_to_pci_dev(edev);
	if (pdev)
		return pdev->bus;
		bus = pdev->bus;
	pci_unlock_rescan_remove();

	return NULL;
	return bus;
}
+3 −2
Original line number Diff line number Diff line
@@ -647,8 +647,9 @@ __after_prom_start:
 * Note: This process overwrites the OF exception vectors.
 */
	LOAD_REG_IMMEDIATE(r3, PAGE_OFFSET)
	mr.	r4,r26			/* In some cases the loader may  */
	beq	9f			/* have already put us at zero */
	mr	r4,r26			/* Load the virtual source address into r4 */
	cmpld	r3,r4			/* Check if source == dest */
	beq	9f			/* If so skip the copy  */
	li	r6,0x100		/* Start offset, the first 0x100 */
					/* bytes were copied earlier.	 */

+11 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <asm/paca.h>
#include <asm/mmu.h>
#include <asm/sections.h>	/* _end */
#include <asm/setup.h>
#include <asm/smp.h>
#include <asm/hw_breakpoint.h>
#include <asm/svm.h>
@@ -317,6 +318,16 @@ void default_machine_kexec(struct kimage *image)
	if (!kdump_in_progress())
		kexec_prepare_cpus();

#ifdef CONFIG_PPC_PSERIES
	/*
	 * This must be done after other CPUs have shut down, otherwise they
	 * could execute the 'scv' instruction, which is not supported with
	 * reloc disabled (see configure_exceptions()).
	 */
	if (firmware_has_feature(FW_FEATURE_SET_MODE))
		pseries_disable_reloc_on_exc();
#endif

	printk("kexec: Starting switchover sequence.\n");

	/* switch to a staticly allocated stack.  Based on irq stack code.
+0 −8
Original line number Diff line number Diff line
@@ -61,11 +61,3 @@ void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
	} else
		xics_kexec_teardown_cpu(secondary);
}

void pseries_machine_kexec(struct kimage *image)
{
	if (firmware_has_feature(FW_FEATURE_SET_MODE))
		pseries_disable_reloc_on_exc();

	default_machine_kexec(image);
}
+0 −1
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ static inline void smp_init_pseries(void) { }
#endif

extern void pseries_kexec_cpu_down(int crash_shutdown, int secondary);
void pseries_machine_kexec(struct kimage *image);

extern void pSeries_final_fixup(void);

Loading