From: Greg Kroah-Hartman Date: Fri, 12 Oct 2018 11:03:46 +0000 (+0200) Subject: fix up powerpc patch to build properly X-Git-Tag: v3.18.124~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2aaa06da20b3805b01e9f7e0a52d6f722a466452;p=thirdparty%2Fkernel%2Fstable-queue.git fix up powerpc patch to build properly --- diff --git a/queue-4.14/powerpc-avoid-code-patching-freed-init-sections.patch b/queue-4.14/powerpc-avoid-code-patching-freed-init-sections.patch index 809bc8c82f6..364bc242d67 100644 --- a/queue-4.14/powerpc-avoid-code-patching-freed-init-sections.patch +++ b/queue-4.14/powerpc-avoid-code-patching-freed-init-sections.patch @@ -38,9 +38,9 @@ Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/include/asm/setup.h | 1 + - arch/powerpc/lib/code-patching.c | 6 ++++++ + 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 --- 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 + #include + #include ++#include + + static int __patch_instruction(unsigned int *exec_addr, unsigned int instr, + unsigned int *patch_addr) { int err; diff --git a/queue-4.14/powerpc-lib-fix-book3s-32-boot-failure-due-to-code-patching.patch b/queue-4.14/powerpc-lib-fix-book3s-32-boot-failure-due-to-code-patching.patch index 3c0d8181f2d..abe76aa020c 100644 --- a/queue-4.14/powerpc-lib-fix-book3s-32-boot-failure-due-to-code-patching.patch +++ b/queue-4.14/powerpc-lib-fix-book3s-32-boot-failure-due-to-code-patching.patch @@ -31,7 +31,7 @@ Signed-off-by: Greg Kroah-Hartman --- 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 __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 { int err; unsigned int *patch_addr = NULL; -@@ -188,12 +182,22 @@ out: +@@ -189,12 +183,22 @@ out: } #else /* !CONFIG_STRICT_KERNEL_RWX */