diff options
| author | Russell King <rmk@flint.arm.linux.org.uk> | 2003-09-03 20:19:25 +0100 |
|---|---|---|
| committer | Russell King <rmk@flint.arm.linux.org.uk> | 2003-09-03 20:19:25 +0100 |
| commit | ac7ebfb23521ef77b3af31d57faffabb2b6f98ca (patch) | |
| tree | f5c7e3fd4839c307b59fc1774a386befde9f9491 /include/asm-arm/processor.h | |
| parent | de950cef51ac8d7bd67d305857c0bee7bb8a97e5 (diff) | |
[ARM] Remove more reminants of 26-bit ARM support.
This removes include/asm-arm/proc-armv entirely, merging the
contents into the relevant include files in include/asm-arm.
We also update various files in arch/arm which reference
definitions in the now non-existent directory.
Diffstat (limited to 'include/asm-arm/processor.h')
| -rw-r--r-- | include/asm-arm/processor.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h index 181223a7329b..31c888ba601c 100644 --- a/include/asm-arm/processor.h +++ b/include/asm-arm/processor.h @@ -1,7 +1,7 @@ /* * linux/include/asm-arm/processor.h * - * Copyright (C) 1995 Russell King + * Copyright (C) 1995-1999 Russell King * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -27,9 +27,10 @@ #include <asm/ptrace.h> #include <asm/procinfo.h> #include <asm/arch/memory.h> -#include <asm/proc/processor.h> #include <asm/types.h> +#define KERNEL_STACK_SIZE PAGE_SIZE + union debug_insn { u32 arm; u16 thumb; @@ -56,6 +57,24 @@ struct thread_struct { #define INIT_THREAD { } +#define start_thread(regs,pc,sp) \ +({ \ + unsigned long *stack = (unsigned long *)sp; \ + set_fs(USER_DS); \ + memzero(regs->uregs, sizeof(regs->uregs)); \ + if (current->personality & ADDR_LIMIT_32BIT) \ + regs->ARM_cpsr = USR_MODE; \ + else \ + regs->ARM_cpsr = USR26_MODE; \ + if (elf_hwcap & HWCAP_THUMB && pc & 1) \ + regs->ARM_cpsr |= PSR_T_BIT; \ + regs->ARM_pc = pc & ~1; /* pc */ \ + regs->ARM_sp = sp; /* sp */ \ + regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ + regs->ARM_r1 = stack[1]; /* r1 (argv) */ \ + regs->ARM_r0 = stack[0]; /* r0 (argc) */ \ +}) + /* Forward declaration, a strange C thing */ struct task_struct; @@ -74,6 +93,9 @@ unsigned long get_wchan(struct task_struct *p); */ extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); +#define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1019]) +#define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1017]) + /* * Prefetching support - only ARMv5. */ |
