diff options
Diffstat (limited to 'arch/arm/cpu/sm.c')
-rw-r--r-- | arch/arm/cpu/sm.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c index 1f2c236d5a..53f5142b63 100644 --- a/arch/arm/cpu/sm.c +++ b/arch/arm/cpu/sm.c @@ -19,14 +19,13 @@ #include <linux/arm-smccc.h> #include <asm-generic/sections.h> #include <asm/secure.h> - -#include "mmu.h" +#include "mmu_32.h" static unsigned int read_id_pfr1(void) { unsigned int reg; - asm("mrc p15, 0, %0, c0, c1, 1\n" : "=r"(reg)); + asm volatile ("mrc p15, 0, %0, c0, c1, 1\n" : "=r"(reg)); return reg; } @@ -34,18 +33,18 @@ static u32 read_nsacr(void) { unsigned int reg; - asm("mrc p15, 0, %0, c1, c1, 2\n" : "=r"(reg)); + asm volatile ("mrc p15, 0, %0, c1, c1, 2\n" : "=r"(reg)); return reg; } static void write_nsacr(u32 val) { - asm("mcr p15, 0, %0, c1, c1, 2" : : "r"(val)); + asm volatile ("mcr p15, 0, %0, c1, c1, 2" : : "r"(val)); } static void write_mvbar(u32 val) { - asm("mcr p15, 0, %0, c12, c0, 1" : : "r"(val)); + asm volatile ("mcr p15, 0, %0, c12, c0, 1" : : "r"(val)); } static int cpu_is_virt_capable(void) @@ -150,7 +149,7 @@ static bool armv7_have_security_extensions(void) int armv7_secure_monitor_install(void) { int mmuon; - unsigned long ttb, vbar; + unsigned long ttb, vbar, dacr; if (!armv7_have_security_extensions()) { pr_err("Security extensions not implemented.\n"); @@ -164,12 +163,14 @@ int armv7_secure_monitor_install(void) vbar = get_vbar(); ttb = get_ttbr(); + dacr = get_domain(); armv7_init_nonsec(); __armv7_secure_monitor_install(); set_ttbr((void *)ttb); set_vbar(vbar); + set_domain(dacr); if (mmuon) { /* |