diff options
Diffstat (limited to 'arch/arm/kernel/traps.c')
-rw-r--r-- | arch/arm/kernel/traps.c | 14 |
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 | ||
38 | static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" }; | 38 | static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" }; |
39 | 39 | ||
40 | void *vectors_page; | ||
41 | |||
40 | #ifdef CONFIG_DEBUG_USER | 42 | #ifdef CONFIG_DEBUG_USER |
41 | unsigned int user_debug; | 43 | unsigned int user_debug; |
42 | 44 | ||
@@ -759,7 +761,11 @@ static void __init kuser_get_tls_init(unsigned long vectors) | |||
759 | 761 | ||
760 | void __init early_trap_init(void) | 762 | void __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); |