X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fum%2Fkernel%2Ftt%2Fmem.c;h=4d1929dfa285ff4c5ed825f883219518a3bf2c75;hb=refs%2Fheads%2Fvserver;hp=34090b8d29836b5de05673bf0f1c5751b52e9696;hpb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;p=linux-2.6.git diff --git a/arch/um/kernel/tt/mem.c b/arch/um/kernel/tt/mem.c index 34090b8d2..4d1929dfa 100644 --- a/arch/um/kernel/tt/mem.c +++ b/arch/um/kernel/tt/mem.c @@ -4,7 +4,6 @@ */ #include "linux/stddef.h" -#include "linux/config.h" #include "linux/mm.h" #include "asm/uaccess.h" #include "mem_user.h" @@ -15,37 +14,22 @@ void before_mem_tt(unsigned long brk_start) { - if(!jail || debug) + if(debug) remap_data(UML_ROUND_DOWN(&_stext), UML_ROUND_UP(&_etext), 1); remap_data(UML_ROUND_DOWN(&_sdata), UML_ROUND_UP(&_edata), 1); remap_data(UML_ROUND_DOWN(&__bss_start), UML_ROUND_UP(&_end), 1); } -#ifdef CONFIG_HOST_2G_2G -#define TOP 0x80000000 -#else -#define TOP 0xc0000000 -#endif - #define SIZE ((CONFIG_NEST_LEVEL + CONFIG_KERNEL_HALF_GIGS) * 0x20000000) -#define START (TOP - SIZE) +#define START (CONFIG_TOP_ADDR - SIZE) -unsigned long set_task_sizes_tt(int arg, unsigned long *host_size_out, - unsigned long *task_size_out) +unsigned long set_task_sizes_tt(unsigned long *task_size_out) { + unsigned long host_task_size; + /* Round up to the nearest 4M */ - *host_size_out = ROUND_4M((unsigned long) &arg); + host_task_size = ROUND_4M((unsigned long) &host_task_size); *task_size_out = START; - return(START); -} -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ + return host_task_size; +}