diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-01-23 17:43:16 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-01-23 17:43:16 -0500 |
commit | 1501396e56d74df03163fd018516ea0b8d1390c0 (patch) | |
tree | 51ecbb7da6b2ce1e256d4fbd9e4fe0718c9214a4 | |
parent | 13cea1069f65c120c8b5d44ea09903aad41ad715 (diff) | |
parent | 651134b01240aad44a0eed141e946d835aa93579 (diff) |
Merge branch 'for-rmk/virt/hyp-boot/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into devel-stable
-rw-r--r-- | arch/arm/include/asm/assembler.h | 10 | ||||
-rw-r--r-- | arch/arm/include/asm/virt.h | 4 | ||||
-rw-r--r-- | arch/arm/mm/Kconfig | 10 |
3 files changed, 8 insertions, 16 deletions
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index eb87200aa4b5..05ee9eebad6b 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -246,18 +246,14 @@ | |||
246 | * | 246 | * |
247 | * This macro is intended for forcing the CPU into SVC mode at boot time. | 247 | * This macro is intended for forcing the CPU into SVC mode at boot time. |
248 | * you cannot return to the original mode. | 248 | * you cannot return to the original mode. |
249 | * | ||
250 | * Beware, it also clobers LR. | ||
251 | */ | 249 | */ |
252 | .macro safe_svcmode_maskall reg:req | 250 | .macro safe_svcmode_maskall reg:req |
253 | #if __LINUX_ARM_ARCH__ >= 6 | 251 | #if __LINUX_ARM_ARCH__ >= 6 |
254 | mrs \reg , cpsr | 252 | mrs \reg , cpsr |
255 | mov lr , \reg | 253 | eor \reg, \reg, #HYP_MODE |
256 | and lr , lr , #MODE_MASK | 254 | tst \reg, #MODE_MASK |
257 | cmp lr , #HYP_MODE | ||
258 | orr \reg , \reg , #PSR_I_BIT | PSR_F_BIT | ||
259 | bic \reg , \reg , #MODE_MASK | 255 | bic \reg , \reg , #MODE_MASK |
260 | orr \reg , \reg , #SVC_MODE | 256 | orr \reg , \reg , #PSR_I_BIT | PSR_F_BIT | SVC_MODE |
261 | THUMB( orr \reg , \reg , #PSR_T_BIT ) | 257 | THUMB( orr \reg , \reg , #PSR_T_BIT ) |
262 | bne 1f | 258 | bne 1f |
263 | orr \reg, \reg, #PSR_A_BIT | 259 | orr \reg, \reg, #PSR_A_BIT |
diff --git a/arch/arm/include/asm/virt.h b/arch/arm/include/asm/virt.h index 86164df86cb4..50af92bac737 100644 --- a/arch/arm/include/asm/virt.h +++ b/arch/arm/include/asm/virt.h | |||
@@ -24,9 +24,9 @@ | |||
24 | /* | 24 | /* |
25 | * Flag indicating that the kernel was not entered in the same mode on every | 25 | * Flag indicating that the kernel was not entered in the same mode on every |
26 | * CPU. The zImage loader stashes this value in an SPSR, so we need an | 26 | * CPU. The zImage loader stashes this value in an SPSR, so we need an |
27 | * architecturally defined flag bit here (the N flag, as it happens) | 27 | * architecturally defined flag bit here. |
28 | */ | 28 | */ |
29 | #define BOOT_CPU_MODE_MISMATCH (1<<31) | 29 | #define BOOT_CPU_MODE_MISMATCH PSR_N_BIT |
30 | 30 | ||
31 | #ifndef __ASSEMBLY__ | 31 | #ifndef __ASSEMBLY__ |
32 | 32 | ||
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 3fd629d5a513..025d17328730 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -629,8 +629,9 @@ config ARM_THUMBEE | |||
629 | make use of it. Say N for code that can run on CPUs without ThumbEE. | 629 | make use of it. Say N for code that can run on CPUs without ThumbEE. |
630 | 630 | ||
631 | config ARM_VIRT_EXT | 631 | config ARM_VIRT_EXT |
632 | bool "Native support for the ARM Virtualization Extensions" | 632 | bool |
633 | depends on MMU && CPU_V7 | 633 | depends on MMU |
634 | default y if CPU_V7 | ||
634 | help | 635 | help |
635 | Enable the kernel to make use of the ARM Virtualization | 636 | Enable the kernel to make use of the ARM Virtualization |
636 | Extensions to install hypervisors without run-time firmware | 637 | Extensions to install hypervisors without run-time firmware |
@@ -640,11 +641,6 @@ config ARM_VIRT_EXT | |||
640 | use of this feature. Refer to Documentation/arm/Booting for | 641 | use of this feature. Refer to Documentation/arm/Booting for |
641 | details. | 642 | details. |
642 | 643 | ||
643 | It is safe to enable this option even if the kernel may not be | ||
644 | booted in HYP mode, may not have support for the | ||
645 | virtualization extensions, or may be booted with a | ||
646 | non-compliant bootloader. | ||
647 | |||
648 | config SWP_EMULATE | 644 | config SWP_EMULATE |
649 | bool "Emulate SWP/SWPB instructions" | 645 | bool "Emulate SWP/SWPB instructions" |
650 | depends on !CPU_USE_DOMAINS && CPU_V7 | 646 | depends on !CPU_USE_DOMAINS && CPU_V7 |