]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge tag 'powerpc-4.9-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 5 Dec 2016 18:30:12 +0000 (10:30 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 5 Dec 2016 18:30:12 +0000 (10:30 -0800)
Pull powerpc fixes from Michael Ellerman:
 "Four fixes, the first for code we merged this cycle and three that are
  also going to stable:

   - On 64-bit Book3E we were not placing the .text section where we
     said we would in the asm.

   - We broke building the boot wrapper on some 32-bit toolchains.

   - Lazy icache flushing was broken on pre-POWER5 machines.

   - One of the error paths in our EEH code would lead to a deadlock.

  Thanks to: Andrew Donnellan, Ben Hutchings, Benjamin Herrenschmidt,
  Nicholas Piggin"

* tag 'powerpc-4.9-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/64: Fix placement of .text to be immediately following .head.text
  powerpc/eeh: Fix deadlock when PE frozen state can't be cleared
  powerpc/mm: Fix lazy icache flush on pre-POWER5
  powerpc/boot: Fix build failure in 32-bit boot wrapper

arch/powerpc/boot/Makefile
arch/powerpc/boot/opal.c
arch/powerpc/kernel/eeh_driver.c
arch/powerpc/kernel/vmlinux.lds.S
arch/powerpc/mm/hash64_4k.c
arch/powerpc/mm/hash64_64k.c

index eae2dc8bc218165242f4406df9a6273755b60770..9d47f2efa830c220c68ffa11d29d6efaa3fa84cc 100644 (file)
@@ -100,7 +100,8 @@ src-wlib-y := string.S crt0.S crtsavres.S stdio.c decompress.c main.c \
                ns16550.c serial.c simple_alloc.c div64.S util.S \
                elf_util.c $(zlib-y) devtree.c stdlib.c \
                oflib.c ofconsole.c cuboot.c mpsc.c cpm-serial.c \
-               uartlite.c mpc52xx-psc.c opal.c opal-calls.S
+               uartlite.c mpc52xx-psc.c opal.c
+src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) +=  opal-calls.S
 src-wlib-$(CONFIG_40x) += 4xx.c planetcore.c
 src-wlib-$(CONFIG_44x) += 4xx.c ebony.c bamboo.c
 src-wlib-$(CONFIG_8xx) += mpc8xx.c planetcore.c fsl-soc.c
index d7b4fd47eb44ff6b9bbef81da9f49f334efa8eef..0272570d02de15ba70363809c987ca7efd97dd99 100644 (file)
@@ -13,7 +13,7 @@
 #include <libfdt.h>
 #include "../include/asm/opal-api.h"
 
-#ifdef __powerpc64__
+#ifdef CONFIG_PPC64_BOOT_WRAPPER
 
 /* Global OPAL struct used by opal-call.S */
 struct opal {
index a62be72da274de3993a4b28cfbad7938d5502559..5c31369435f24200ae8c06bc69a8795b12ffd8e3 100644 (file)
@@ -671,8 +671,10 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
 
        /* Clear frozen state */
        rc = eeh_clear_pe_frozen_state(pe, false);
-       if (rc)
+       if (rc) {
+               pci_unlock_rescan_remove();
                return rc;
+       }
 
        /* Give the system 5 seconds to finish running the user-space
         * hotplug shutdown scripts, e.g. ifdown for ethernet.  Yes,
index 8295f51c1a5f9023022273d6e19b9e2a46ae4451..7394b770ae1f6b2402ef2b04fe23e92eae2c7ee2 100644 (file)
@@ -94,8 +94,17 @@ SECTIONS
         * detected, and will result in a crash at boot due to offsets being
         * wrong.
         */
+#ifdef CONFIG_PPC64
+       /*
+        * BLOCK(0) overrides the default output section alignment because
+        * this needs to start right after .head.text in order for fixed
+        * section placement to work.
+        */
+       .text BLOCK(0) : AT(ADDR(.text) - LOAD_OFFSET) {
+#else
        .text : AT(ADDR(.text) - LOAD_OFFSET) {
                ALIGN_FUNCTION();
+#endif
                /* careful! __ftr_alt_* sections need to be close to .text */
                *(.text .fixup __ftr_alt_* .ref.text)
                SCHED_TEXT
index 42c702b3be1ff795d36b2039ba0d0bcef01305c2..6fa450c12d6d1b28c71429ac4aa10fdd4dabf2a0 100644 (file)
@@ -55,7 +55,7 @@ int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,
         */
        rflags = htab_convert_pte_flags(new_pte);
 
-       if (!cpu_has_feature(CPU_FTR_NOEXECUTE) &&
+       if (cpu_has_feature(CPU_FTR_NOEXECUTE) &&
            !cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
                rflags = hash_page_do_lazy_icache(rflags, __pte(old_pte), trap);
 
index 3bbbea07378c60b56e545d74ebc6e17301f0644f..1a68cb19b0e33c0031a1568f9e977f1681b80cd8 100644 (file)
@@ -87,7 +87,7 @@ int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,
        subpg_pte = new_pte & ~subpg_prot;
        rflags = htab_convert_pte_flags(subpg_pte);
 
-       if (!cpu_has_feature(CPU_FTR_NOEXECUTE) &&
+       if (cpu_has_feature(CPU_FTR_NOEXECUTE) &&
            !cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) {
 
                /*
@@ -258,7 +258,7 @@ int __hash_page_64K(unsigned long ea, unsigned long access,
 
        rflags = htab_convert_pte_flags(new_pte);
 
-       if (!cpu_has_feature(CPU_FTR_NOEXECUTE) &&
+       if (cpu_has_feature(CPU_FTR_NOEXECUTE) &&
            !cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
                rflags = hash_page_do_lazy_icache(rflags, __pte(old_pte), trap);