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
@ -13,7 +13,6 @@
|
||||
#include "asm/ldt.h"
|
||||
#include "asm/unistd.h"
|
||||
#include "kern.h"
|
||||
#include "mode_kern.h"
|
||||
#include "os.h"
|
||||
|
||||
extern int modify_ldt(int func, void *ptr, unsigned long bytecount);
|
||||
@ -33,7 +32,7 @@ long write_ldt_entry(struct mm_id * mm_idp, int func, struct user_desc * desc,
|
||||
* modify isn't current->active_mm.
|
||||
* If this is called directly by modify_ldt,
|
||||
* (current->active_mm->context.skas.u == mm_idp)
|
||||
* will be true. So no call to switch_mm_skas(mm_idp) is done.
|
||||
* will be true. So no call to __switch_mm(mm_idp) is done.
|
||||
* If this is called in case of init_new_ldt or PTRACE_LDT,
|
||||
* mm_idp won't belong to current->active_mm, but child->mm.
|
||||
* So we need to switch child's mm into our userspace, then
|
||||
@ -43,7 +42,7 @@ long write_ldt_entry(struct mm_id * mm_idp, int func, struct user_desc * desc,
|
||||
*/
|
||||
if(!current->active_mm || current->active_mm == &init_mm ||
|
||||
mm_idp != ¤t->active_mm->context.skas.id)
|
||||
switch_mm_skas(mm_idp);
|
||||
__switch_mm(mm_idp);
|
||||
}
|
||||
|
||||
if(ptrace_ldt) {
|
||||
@ -88,7 +87,7 @@ long write_ldt_entry(struct mm_id * mm_idp, int func, struct user_desc * desc,
|
||||
*/
|
||||
if(current->active_mm && current->active_mm != &init_mm &&
|
||||
mm_idp != ¤t->active_mm->context.skas.id)
|
||||
switch_mm_skas(¤t->active_mm->context.skas.id);
|
||||
__switch_mm(¤t->active_mm->context.skas.id);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
Reference in New Issue
Block a user