Commit 57598fd7 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds
Browse files

uml: remove task_protections



Replaced task_protections with stack_protections since they do the same
thing, and task_protections was misnamed anyway.

This needs THREAD_SIZE, so that's imported via common-offsets.h

Also tidied up the code in the vicinity.

Signed-off-by: default avatarJeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 22258d40
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -28,3 +28,5 @@ DEFINE(UM_NR_CPUS, NR_CPUS);

/* For crypto assembler code. */
DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx));

DEFINE(UM_THREAD_SIZE, THREAD_SIZE);
+0 −1
Original line number Diff line number Diff line
@@ -272,7 +272,6 @@ extern void do_longjmp(void *p, int val);

/* util.c */
extern void stack_protections(unsigned long address);
extern void task_protections(unsigned long address);
extern int raw(int fd);
extern void setup_machinename(char *machine_out);
extern void setup_hostinfo(char *buf, int len);
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ void flush_thread_tt(void)
	enable_timer();
	free_page(stack);
	protect_memory(uml_reserved, high_physmem - uml_reserved, 1, 1, 0, 1);
	task_protections((unsigned long) current_thread);
	stack_protections((unsigned long) current_thread);
	force_flush_all();
	unblock_signals();
}
+1 −1
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ void finish_fork_handler(int sig)
	if(current->mm != current->parent->mm)
		protect_memory(uml_reserved, high_physmem - uml_reserved, 1, 
			       1, 0, 1);
	task_protections((unsigned long) current_thread);
	stack_protections((unsigned long) current_thread);

	free_page(current->thread.temp_stack);
	local_irq_disable();
+1 −1
Original line number Diff line number Diff line
@@ -459,7 +459,7 @@ int __init linux_main(int argc, char **argv)

	uml_postsetup();

	task_protections((unsigned long) &init_thread_info);
	stack_protections((unsigned long) &init_thread_info);
	os_flush_stdout();

	return CHOOSE_MODE(start_uml_tt(), start_uml_skas());
Loading