uml: remove code made redundant by CHOOSE_MODE removal
This patch makes a number of simplifications enabled by the removal of
CHOOSE_MODE. There were lots of functions that looked like
int foo(args){
foo_skas(args);
}
The bodies of foo_skas are now folded into foo, and their declarations (and
sometimes entire header files) are deleted.
In addition, the union uml_pt_regs, which was a union between the tt and skas
register formats, is now a struct, with the tt-mode arm of the union being
removed.
It turns out that usr2_handler was unused, so it is gone.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
ae2587e412
commit
77bf440031
@@ -29,7 +29,7 @@ static inline void activate_mm(struct mm_struct *old, struct mm_struct *new)
|
||||
* possible.
|
||||
*/
|
||||
if (old != new && (current->flags & PF_BORROWED_MM))
|
||||
switch_mm_skas(&new->context.skas.id);
|
||||
__switch_mm(&new->context.skas.id);
|
||||
}
|
||||
|
||||
static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
||||
@@ -41,7 +41,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
||||
cpu_clear(cpu, prev->cpu_vm_mask);
|
||||
cpu_set(cpu, next->cpu_vm_mask);
|
||||
if(next != &init_mm)
|
||||
switch_mm_skas(&next->context.skas.id);
|
||||
__switch_mm(&next->context.skas.id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,21 +50,9 @@ static inline void enter_lazy_tlb(struct mm_struct *mm,
|
||||
{
|
||||
}
|
||||
|
||||
extern int init_new_context_skas(struct task_struct *task,
|
||||
struct mm_struct *mm);
|
||||
extern int init_new_context(struct task_struct *task, struct mm_struct *mm);
|
||||
|
||||
static inline int init_new_context(struct task_struct *task,
|
||||
struct mm_struct *mm)
|
||||
{
|
||||
return(init_new_context_skas(task, mm));
|
||||
}
|
||||
|
||||
extern void destroy_context_skas(struct mm_struct *mm);
|
||||
|
||||
static inline void destroy_context(struct mm_struct *mm)
|
||||
{
|
||||
destroy_context_skas(mm);
|
||||
}
|
||||
extern void destroy_context(struct mm_struct *mm);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,12 +32,8 @@ struct thread_struct {
|
||||
unsigned long temp_stack;
|
||||
void *exec_buf;
|
||||
struct arch_thread arch;
|
||||
union {
|
||||
struct {
|
||||
jmp_buf switch_buf;
|
||||
int mm_count;
|
||||
} skas;
|
||||
} mode;
|
||||
jmp_buf switch_buf;
|
||||
int mm_count;
|
||||
struct {
|
||||
int op;
|
||||
union {
|
||||
@@ -75,7 +71,10 @@ typedef struct {
|
||||
|
||||
extern struct task_struct *alloc_task_struct(void);
|
||||
|
||||
extern void release_thread(struct task_struct *);
|
||||
static inline void release_thread(struct task_struct *task)
|
||||
{
|
||||
}
|
||||
|
||||
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
|
||||
|
||||
static inline void prepare_to_copy(struct task_struct *tsk)
|
||||
@@ -125,8 +124,7 @@ extern struct cpuinfo_um cpu_data[];
|
||||
#endif
|
||||
|
||||
|
||||
#define KSTK_REG(tsk, reg) \
|
||||
get_thread_reg(reg, &tsk->thread.mode.skas.switch_buf)
|
||||
#define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf)
|
||||
#define get_wchan(p) (0)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "sysdep/ptrace.h"
|
||||
|
||||
struct pt_regs {
|
||||
union uml_pt_regs regs;
|
||||
struct uml_pt_regs regs;
|
||||
};
|
||||
|
||||
#define EMPTY_REGS { .regs = EMPTY_UML_PT_REGS }
|
||||
@@ -44,7 +44,7 @@ extern int set_fpxregs(unsigned long buf, struct task_struct *tsk);
|
||||
|
||||
extern void show_regs(struct pt_regs *regs);
|
||||
|
||||
extern void send_sigtrap(struct task_struct *tsk, union uml_pt_regs *regs,
|
||||
extern void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs,
|
||||
int error_code);
|
||||
|
||||
extern int arch_copy_tls(struct task_struct *new);
|
||||
|
||||
@@ -46,21 +46,4 @@ extern int ptrace_get_thread_area(struct task_struct *child, int idx,
|
||||
extern int ptrace_set_thread_area(struct task_struct *child, int idx,
|
||||
struct user_desc __user *user_desc);
|
||||
|
||||
extern int do_set_thread_area_skas(struct user_desc *info);
|
||||
extern int do_get_thread_area_skas(struct user_desc *info);
|
||||
|
||||
extern int do_set_thread_area_tt(struct user_desc *info);
|
||||
extern int do_get_thread_area_tt(struct user_desc *info);
|
||||
|
||||
extern int arch_switch_tls_skas(struct task_struct *from, struct task_struct *to);
|
||||
extern int arch_switch_tls_tt(struct task_struct *from, struct task_struct *to);
|
||||
|
||||
extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to);
|
||||
extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to);
|
||||
|
||||
extern int do_get_thread_area_skas(struct user_desc *info);
|
||||
extern int do_set_thread_area_skas(struct user_desc *info);
|
||||
|
||||
struct task_struct;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -76,15 +76,6 @@ static inline int ptrace_set_thread_area(struct task_struct *child, int idx,
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline void arch_switch_to_tt(struct task_struct *from,
|
||||
struct task_struct *to)
|
||||
{
|
||||
}
|
||||
|
||||
extern void arch_switch_to_skas(struct task_struct *from,
|
||||
struct task_struct *to);
|
||||
|
||||
extern long arch_prctl_skas(struct task_struct *task, int code,
|
||||
unsigned long __user *addr);
|
||||
|
||||
extern long arch_prctl(struct task_struct *task, int code,
|
||||
unsigned long __user *addr);
|
||||
#endif
|
||||
|
||||
@@ -24,18 +24,7 @@ extern void flush_tlb_all(void);
|
||||
extern void flush_tlb_mm(struct mm_struct *mm);
|
||||
extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
|
||||
unsigned long end);
|
||||
extern void flush_tlb_page_skas(struct vm_area_struct *vma,
|
||||
unsigned long address);
|
||||
|
||||
static inline void flush_tlb_page(struct vm_area_struct *vma,
|
||||
unsigned long address)
|
||||
{
|
||||
address &= PAGE_MASK;
|
||||
|
||||
flush_tlb_page_skas(vma, address);
|
||||
}
|
||||
|
||||
extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
|
||||
extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long address);
|
||||
extern void flush_tlb_kernel_vm(void);
|
||||
extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
|
||||
extern void __flush_tlb_one(unsigned long addr);
|
||||
|
||||
Reference in New Issue
Block a user