summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2018-08-25 21:55:45 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2018-08-25 21:57:53 -0400
commit526ec70dc1c5f6ace2345babc69f1e29cd6c16e3 (patch)
tree63d698bf88da6ce9d2189c7467a48f1180ed0b55
parent114e78d7e247f15f93ea151a690c1cb93323d133 (diff)
downloadlongterm-queue-4.12-526ec70dc1c5f6ace2345babc69f1e29cd6c16e3.tar.gz
Revert "arm: refresh"
This reverts commit 2c654ef8a3f9808af2cd70734a5b7819382817a9. Not needed anymore after adding in the shim patch.
-rw-r--r--queue/arm64-alternatives-Add-dynamic-patching-feature.patch26
1 files changed, 13 insertions, 13 deletions
diff --git a/queue/arm64-alternatives-Add-dynamic-patching-feature.patch b/queue/arm64-alternatives-Add-dynamic-patching-feature.patch
index 7214ab7..40c7ba6 100644
--- a/queue/arm64-alternatives-Add-dynamic-patching-feature.patch
+++ b/queue/arm64-alternatives-Add-dynamic-patching-feature.patch
@@ -1,4 +1,4 @@
-From 7b95e0653e404bf2cccbf75651f0edc1c65a9342 Mon Sep 17 00:00:00 2001
+From dea5e2a4c5bcf196f879a66cebdcca07793e8ba4 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <marc.zyngier@arm.com>
Date: Sun, 3 Dec 2017 12:02:14 +0000
Subject: [PATCH] arm64: alternatives: Add dynamic patching feature
@@ -37,10 +37,10 @@ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/arch/arm64/include/asm/alternative.h b/arch/arm64/include/asm/alternative.h
-index f9e2f69f296e..7e842dcae450 100644
+index 669028172fd6..a91933b1e2e6 100644
--- a/arch/arm64/include/asm/alternative.h
+++ b/arch/arm64/include/asm/alternative.h
-@@ -4,6 +4,8 @@
+@@ -5,6 +5,8 @@
#include <asm/cpucaps.h>
#include <asm/insn.h>
@@ -49,7 +49,7 @@ index f9e2f69f296e..7e842dcae450 100644
#ifndef __ASSEMBLY__
#include <linux/init.h>
-@@ -21,12 +23,19 @@ struct alt_instr {
+@@ -22,12 +24,19 @@ struct alt_instr {
u8 alt_len; /* size of new instruction(s), <= orig_len */
};
@@ -70,7 +70,7 @@ index f9e2f69f296e..7e842dcae450 100644
" .hword " __stringify(feature) "\n" /* feature bit */ \
" .byte 662b-661b\n" /* source len */ \
" .byte 664f-663f\n" /* replacement len */
-@@ -44,15 +53,18 @@ void apply_alternatives(void *start, size_t length);
+@@ -45,15 +54,18 @@ void apply_alternatives(void *start, size_t length);
* but most assemblers die if insn1 or insn2 have a .inst. This should
* be fixed in a binutils release posterior to 2.25.51.0.2 (anything
* containing commit 4e4d08cf7399b606 or c1baaddf8861).
@@ -91,7 +91,7 @@ index f9e2f69f296e..7e842dcae450 100644
".pushsection .altinstr_replacement, \"a\"\n" \
"663:\n\t" \
newinstr "\n" \
-@@ -60,11 +72,17 @@ void apply_alternatives(void *start, size_t length);
+@@ -61,11 +73,17 @@ void apply_alternatives(void *start, size_t length);
".popsection\n\t" \
".org . - (664b-663b) + (662b-661b)\n\t" \
".org . - (662b-661b) + (664b-663b)\n" \
@@ -110,7 +110,7 @@ index f9e2f69f296e..7e842dcae450 100644
#else
#include <asm/assembler.h>
-@@ -131,6 +149,14 @@ void apply_alternatives(void *start, size_t length);
+@@ -132,6 +150,14 @@ void apply_alternatives(void *start, size_t length);
661:
.endm
@@ -125,7 +125,7 @@ index f9e2f69f296e..7e842dcae450 100644
/*
* Provide the other half of the alternative code sequence.
*/
-@@ -156,6 +182,13 @@ void apply_alternatives(void *start, size_t length);
+@@ -157,6 +183,13 @@ void apply_alternatives(void *start, size_t length);
.org . - (662b-661b) + (664b-663b)
.endm
@@ -140,10 +140,10 @@ index f9e2f69f296e..7e842dcae450 100644
* Provides a trivial alternative or default sequence consisting solely
* of NOPs. The number of NOPs is chosen automatically to match the
diff --git a/arch/arm64/kernel/alternative.c b/arch/arm64/kernel/alternative.c
-index 7293839a4e2b..9b35f98d0152 100644
+index 414288a558c8..5c4bce4ac381 100644
--- a/arch/arm64/kernel/alternative.c
+++ b/arch/arm64/kernel/alternative.c
-@@ -107,32 +107,53 @@ static u32 get_alt_insn(struct alt_instr *alt, u32 *insnptr, u32 *altinsnptr)
+@@ -107,32 +107,53 @@ static u32 get_alt_insn(struct alt_instr *alt, __le32 *insnptr, __le32 *altinsnp
return insn;
}
@@ -166,8 +166,8 @@ index 7293839a4e2b..9b35f98d0152 100644
{
struct alt_instr *alt;
struct alt_region *region = alt_region;
-- u32 *origptr, *replptr, *updptr;
-+ u32 *origptr, *updptr;
+- __le32 *origptr, *replptr, *updptr;
++ __le32 *origptr, *updptr;
+ alternative_cb_t alt_cb;
for (alt = region->begin; alt < region->end; alt++) {
@@ -191,7 +191,7 @@ index 7293839a4e2b..9b35f98d0152 100644
origptr = ALT_ORIG_PTR(alt);
- replptr = ALT_REPL_PTR(alt);
- updptr = use_linear_alias ? (u32 *)lm_alias(origptr) : origptr;
+ updptr = use_linear_alias ? lm_alias(origptr) : origptr;
- nr_inst = alt->alt_len / sizeof(insn);
+ nr_inst = alt->orig_len / AARCH64_INSN_SIZE;