traps.c (b74b953b998bcc2db91b694446f3a2619ec32de6) traps.c (247055aa21ffef1c49dd64710d5e94c2aee19b58)
1/*
2 * linux/arch/arm/kernel/traps.c
3 *
4 * Copyright (C) 1995-2009 Russell King
5 * Fragments that appear the same as linux/arch/i386/kernel/traps.c (C) Linus Torvalds
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 23 unchanged lines hidden (view full) ---

32#include <asm/unwind.h>
33#include <asm/tls.h>
34
35#include "ptrace.h"
36#include "signal.h"
37
38static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" };
39
1/*
2 * linux/arch/arm/kernel/traps.c
3 *
4 * Copyright (C) 1995-2009 Russell King
5 * Fragments that appear the same as linux/arch/i386/kernel/traps.c (C) Linus Torvalds
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 23 unchanged lines hidden (view full) ---

32#include <asm/unwind.h>
33#include <asm/tls.h>
34
35#include "ptrace.h"
36#include "signal.h"
37
38static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" };
39
40void *vectors_page;
41
40#ifdef CONFIG_DEBUG_USER
41unsigned int user_debug;
42
43static int __init user_debug_setup(char *str)
44{
45 get_option(&str, &user_debug);
46 return 1;
47}

--- 706 unchanged lines hidden (view full) ---

754 * vectors + 0xfe8 = hardware TLS instruction at 0xffff0fe8
755 */
756 if (tls_emu || has_tls_reg)
757 memcpy((void *)vectors + 0xfe0, (void *)vectors + 0xfe8, 4);
758}
759
760void __init early_trap_init(void)
761{
42#ifdef CONFIG_DEBUG_USER
43unsigned int user_debug;
44
45static int __init user_debug_setup(char *str)
46{
47 get_option(&str, &user_debug);
48 return 1;
49}

--- 706 unchanged lines hidden (view full) ---

756 * vectors + 0xfe8 = hardware TLS instruction at 0xffff0fe8
757 */
758 if (tls_emu || has_tls_reg)
759 memcpy((void *)vectors + 0xfe0, (void *)vectors + 0xfe8, 4);
760}
761
762void __init early_trap_init(void)
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[];
764 extern char __vectors_start[], __vectors_end[];
765 extern char __kuser_helper_start[], __kuser_helper_end[];
766 int kuser_sz = __kuser_helper_end - __kuser_helper_start;
767
768 /*
769 * Copy the vectors, stubs and kuser helpers (in entry-armv.S)
770 * into the vector page, mapped at 0xffff0000, and ensure these

--- 7 unchanged lines hidden (view full) ---

778 * Do processor specific fixups for the kuser helpers
779 */
780 kuser_get_tls_init(vectors);
781
782 /*
783 * Copy signal return handlers into the vector page, and
784 * set sigreturn to be a pointer to these.
785 */
769 extern char __stubs_start[], __stubs_end[];
770 extern char __vectors_start[], __vectors_end[];
771 extern char __kuser_helper_start[], __kuser_helper_end[];
772 int kuser_sz = __kuser_helper_end - __kuser_helper_start;
773
774 /*
775 * Copy the vectors, stubs and kuser helpers (in entry-armv.S)
776 * into the vector page, mapped at 0xffff0000, and ensure these

--- 7 unchanged lines hidden (view full) ---

784 * Do processor specific fixups for the kuser helpers
785 */
786 kuser_get_tls_init(vectors);
787
788 /*
789 * Copy signal return handlers into the vector page, and
790 * set sigreturn to be a pointer to these.
791 */
786 memcpy((void *)KERN_SIGRETURN_CODE, sigreturn_codes,
787 sizeof(sigreturn_codes));
788 memcpy((void *)KERN_RESTART_CODE, syscall_restart_code,
789 sizeof(syscall_restart_code));
792 memcpy((void *)(vectors + KERN_SIGRETURN_CODE - CONFIG_VECTORS_BASE),
793 sigreturn_codes, sizeof(sigreturn_codes));
794 memcpy((void *)(vectors + KERN_RESTART_CODE - CONFIG_VECTORS_BASE),
795 syscall_restart_code, sizeof(syscall_restart_code));
790
791 flush_icache_range(vectors, vectors + PAGE_SIZE);
792 modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
793}
796
797 flush_icache_range(vectors, vectors + PAGE_SIZE);
798 modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
799}