mirror of https://github.com/OpenIPC/firmware.git
30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
diff -drupN a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
|
|
--- a/arch/arm64/kernel/cpufeature.c 2018-08-06 17:23:04.000000000 +0300
|
|
+++ b/arch/arm64/kernel/cpufeature.c 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -23,6 +23,7 @@
|
|
#include <linux/sort.h>
|
|
#include <linux/stop_machine.h>
|
|
#include <linux/types.h>
|
|
+#include <linux/mm.h>
|
|
#include <asm/cpu.h>
|
|
#include <asm/cpufeature.h>
|
|
#include <asm/cpu_ops.h>
|
|
@@ -739,7 +740,7 @@ static bool runs_at_el2(const struct arm
|
|
static bool hyp_offset_low(const struct arm64_cpu_capabilities *entry,
|
|
int __unused)
|
|
{
|
|
- phys_addr_t idmap_addr = virt_to_phys(__hyp_idmap_text_start);
|
|
+ phys_addr_t idmap_addr = __pa_symbol(__hyp_idmap_text_start);
|
|
|
|
/*
|
|
* Activate the lower HYP offset only if:
|
|
@@ -791,7 +792,7 @@ static bool unmap_kernel_at_el0(const st
|
|
ID_AA64PFR0_CSV3_SHIFT);
|
|
}
|
|
|
|
-static int kpti_install_ng_mappings(void *__unused)
|
|
+static int __nocfi kpti_install_ng_mappings(void *__unused)
|
|
{
|
|
typedef void (kpti_remap_fn)(int, int, phys_addr_t);
|
|
extern kpti_remap_fn idmap_kpti_install_ng_mappings;
|