aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/traps.c')
-rw-r--r--arch/arm/kernel/traps.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index cda78d59aa31..87abca018054 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -37,6 +37,8 @@
37 37
38static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" }; 38static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" };
39 39
40void *vectors_page;
41
40#ifdef CONFIG_DEBUG_USER 42#ifdef CONFIG_DEBUG_USER
41unsigned int user_debug; 43unsigned int user_debug;
42 44
@@ -759,7 +761,11 @@ static void __init kuser_get_tls_init(unsigned long vectors)
759 761
760void __init early_trap_init(void) 762void __init early_trap_init(void)
761{ 763{
764#if defined(CONFIG_CPU_USE_DOMAINS)
762 unsigned long vectors = CONFIG_VECTORS_BASE; 765 unsigned long vectors = CONFIG_VECTORS_BASE;
766#else
767 unsigned long vectors = (unsigned long)vectors_page;
768#endif
763 extern char __stubs_start[], __stubs_end[]; 769 extern char __stubs_start[], __stubs_end[];
764 extern char __vectors_start[], __vectors_end[]; 770 extern char __vectors_start[], __vectors_end[];
765 extern char __kuser_helper_start[], __kuser_helper_end[]; 771 extern char __kuser_helper_start[], __kuser_helper_end[];
@@ -783,10 +789,10 @@ void __init early_trap_init(void)
783 * Copy signal return handlers into the vector page, and 789 * Copy signal return handlers into the vector page, and
784 * set sigreturn to be a pointer to these. 790 * set sigreturn to be a pointer to these.
785 */ 791 */
786 memcpy((void *)KERN_SIGRETURN_CODE, sigreturn_codes, 792 memcpy((void *)(vectors + KERN_SIGRETURN_CODE - CONFIG_VECTORS_BASE),
787 sizeof(sigreturn_codes)); 793 sigreturn_codes, sizeof(sigreturn_codes));
788 memcpy((void *)KERN_RESTART_CODE, syscall_restart_code, 794 memcpy((void *)(vectors + KERN_RESTART_CODE - CONFIG_VECTORS_BASE),
789 sizeof(syscall_restart_code)); 795 syscall_restart_code, sizeof(syscall_restart_code));
790 796
791 flush_icache_range(vectors, vectors + PAGE_SIZE); 797 flush_icache_range(vectors, vectors + PAGE_SIZE);
792 modify_domain(DOMAIN_USER, DOMAIN_CLIENT); 798 modify_domain(DOMAIN_USER, DOMAIN_CLIENT);