]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up powerpc patch to build properly
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2018 11:03:46 +0000 (13:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2018 11:03:46 +0000 (13:03 +0200)
queue-4.14/powerpc-avoid-code-patching-freed-init-sections.patch
queue-4.14/powerpc-lib-fix-book3s-32-boot-failure-due-to-code-patching.patch

index 809bc8c82f6d6f8e18238255b9c7a181ddc9b768..364bc242d675c97ac7752172c186b131b8e102a6 100644 (file)
@@ -38,9 +38,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 ---
  arch/powerpc/include/asm/setup.h |    1 +
- arch/powerpc/lib/code-patching.c |    ++++++
+ arch/powerpc/lib/code-patching.c |    7 +++++++
  arch/powerpc/mm/mem.c            |    2 ++
- 3 files changed, 9 insertions(+)
+ 3 files changed, 10 insertions(+)
 
 --- a/arch/powerpc/include/asm/setup.h
 +++ b/arch/powerpc/include/asm/setup.h
@@ -54,7 +54,14 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  
 --- a/arch/powerpc/lib/code-patching.c
 +++ b/arch/powerpc/lib/code-patching.c
-@@ -28,6 +28,12 @@ static int __patch_instruction(unsigned
+@@ -22,12 +22,19 @@
+ #include <asm/page.h>
+ #include <asm/code-patching.h>
+ #include <asm/setup.h>
++#include <asm/sections.h>
+ static int __patch_instruction(unsigned int *exec_addr, unsigned int instr,
+                              unsigned int *patch_addr)
  {
        int err;
  
index 3c0d8181f2d5393748e8a3e68b22738559ad0761..abe76aa020c40a3736d9b9e98a718d7128513ef2 100644 (file)
@@ -31,7 +31,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- a/arch/powerpc/lib/code-patching.c
 +++ b/arch/powerpc/lib/code-patching.c
-@@ -28,12 +28,6 @@ static int __patch_instruction(unsigned
+@@ -29,12 +29,6 @@ static int __patch_instruction(unsigned
  {
        int err;
  
@@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        __put_user_size(instr, patch_addr, 4, err);
        if (err)
                return err;
-@@ -148,7 +142,7 @@ static inline int unmap_patch_area(unsig
+@@ -149,7 +143,7 @@ static inline int unmap_patch_area(unsig
        return 0;
  }
  
@@ -53,7 +53,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  {
        int err;
        unsigned int *patch_addr = NULL;
-@@ -188,12 +182,22 @@ out:
+@@ -189,12 +183,22 @@ out:
  }
  #else /* !CONFIG_STRICT_KERNEL_RWX */