summaryrefslogtreecommitdiffstats
path: root/arch/riscv/include
diff options
context:
space:
mode:
authorAlexandre Ghiti <aghiti@upmem.com>2018-12-10 06:21:46 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-13 14:02:28 -0700
commitdc04a00b3cbb89c96e3b5d5ef7b7cb75d1d747ec (patch)
treeced86b288e5c3eeeb428cd686f0f16763c6150f3 /arch/riscv/include
parentf43e42f46aa87bc0507bde9a0cd6ead663ba6a30 (diff)
downloadlinux-stable-dc04a00b3cbb89c96e3b5d5ef7b7cb75d1d747ec.tar.gz
linux-stable-dc04a00b3cbb89c96e3b5d5ef7b7cb75d1d747ec.tar.bz2
linux-stable-dc04a00b3cbb89c96e3b5d5ef7b7cb75d1d747ec.zip
riscv: Adjust mmap base address at a third of task size
[ Upstream commit ae662eec8a515ab550524e04c793b5ddf1aae3a1 ] This ratio is the most used among all other architectures and make icache_hygiene libhugetlbfs test pass: this test mmap lots of hugepages whose addresses, without this patch, reach the end of the process user address space. Signed-off-by: Alexandre Ghiti <aghiti@upmem.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Palmer Dabbelt <palmer@sifive.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r--arch/riscv/include/asm/processor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/processor.h b/arch/riscv/include/asm/processor.h
index 3fe4af8147d2..c23578a37b44 100644
--- a/arch/riscv/include/asm/processor.h
+++ b/arch/riscv/include/asm/processor.h
@@ -22,7 +22,7 @@
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
-#define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE >> 1)
+#define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE / 3)
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX STACK_TOP