From: Jeff Dike Define addresses at which UML will link and make them settable by the arch. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton --- 25-akpm/arch/um/Kconfig_arch | 16 ++++++++++++++++ 25-akpm/arch/um/Kconfig_i386 | 7 ++++++- 25-akpm/arch/um/Makefile-i386 | 6 +----- 25-akpm/arch/um/kernel/skas/mem.c | 5 +++++ 4 files changed, 28 insertions(+), 6 deletions(-) diff -puN arch/um/Kconfig_arch~uml-split-out-arch-link-address-definitions arch/um/Kconfig_arch --- 25/arch/um/Kconfig_arch~uml-split-out-arch-link-address-definitions 2005-01-09 23:44:12.112322136 -0800 +++ 25-akpm/arch/um/Kconfig_arch 2005-01-09 23:44:12.120320920 -0800 @@ -0,0 +1,16 @@ +config 64_BIT + bool + default n + +config TOP_ADDR + hex + default 0xc0000000 if !HOST_2G_2G + default 0x80000000 if HOST_2G_2G + +config 3_LEVEL_PGTABLES + bool "Three-level pagetables" + default n + help + Three-level pagetables will let UML have more than 4G of physical + memory. All the memory that can't be mapped directly will be treated + as high memory. diff -puN arch/um/Kconfig_i386~uml-split-out-arch-link-address-definitions arch/um/Kconfig_i386 --- 25/arch/um/Kconfig_i386~uml-split-out-arch-link-address-definitions 2005-01-09 23:44:12.113321984 -0800 +++ 25-akpm/arch/um/Kconfig_i386 2005-01-09 23:44:12.120320920 -0800 @@ -1,6 +1,12 @@ config 64_BIT bool default n + +config TOP_ADDR + hex + default 0xc0000000 if !HOST_2G_2G + default 0x80000000 if HOST_2G_2G + config 3_LEVEL_PGTABLES bool "Three-level pagetables" default n @@ -8,4 +14,3 @@ config 3_LEVEL_PGTABLES Three-level pagetables will let UML have more than 4G of physical memory. All the memory that can't be mapped directly will be treated as high memory. - diff -puN arch/um/kernel/skas/mem.c~uml-split-out-arch-link-address-definitions arch/um/kernel/skas/mem.c --- 25/arch/um/kernel/skas/mem.c~uml-split-out-arch-link-address-definitions 2005-01-09 23:44:12.115321680 -0800 +++ 25-akpm/arch/um/kernel/skas/mem.c 2005-01-09 23:44:12.121320768 -0800 @@ -13,8 +13,13 @@ unsigned long set_task_sizes_skas(int ar /* Round up to the nearest 4M */ unsigned long top = ROUND_4M((unsigned long) &arg); +#ifdef CONFIG_HOST_TASK_SIZE + *host_size_out = CONFIG_HOST_TASK_SIZE; + *task_size_out = CONFIG_HOST_TASK_SIZE; +#else *host_size_out = top; *task_size_out = top; +#endif return(((unsigned long) set_task_sizes_skas) & ~0xffffff); } diff -puN arch/um/Makefile-i386~uml-split-out-arch-link-address-definitions arch/um/Makefile-i386 --- 25/arch/um/Makefile-i386~uml-split-out-arch-link-address-definitions 2005-01-09 23:44:12.116321528 -0800 +++ 25-akpm/arch/um/Makefile-i386 2005-01-09 23:44:12.121320768 -0800 @@ -1,10 +1,6 @@ SUBARCH_CORE := arch/um/sys-i386/ -ifeq ($(CONFIG_HOST_2G_2G), y) -TOP_ADDR := 0x80000000 -else -TOP_ADDR := 0xc0000000 -endif +TOP_ADDR := $(CONFIG_TOP_ADDR) ifeq ($(CONFIG_MODE_SKAS),y) ifneq ($(CONFIG_MODE_TT),y) _