From 0399123f3dcce1a515d021107ec0fb4413ca3efa Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 15 Dec 2009 19:27:45 +0000 Subject: NOMMU: Optimise away the {dac_,}mmap_min_addr tests commit 6e1415467614e854fee660ff6648bd10fa976e95 upstream. In NOMMU mode clamp dac_mmap_min_addr to zero to cause the tests on it to be skipped by the compiler. We do this as the minimum mmap address doesn't make any sense in NOMMU mode. mmap_min_addr and round_hint_to_min() can be discarded entirely in NOMMU mode. Signed-off-by: David Howells Acked-by: Eric Paris Signed-off-by: James Morris Signed-off-by: Greg Kroah-Hartman --- kernel/sysctl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kernel/sysctl.c') diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 0d949c517412..db23ab7e56c0 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1200,6 +1200,7 @@ static struct ctl_table vm_table[] = { .extra2 = (void *)&hugetlb_infinity, }, #endif +#ifdef CONFIG_MMU { .ctl_name = VM_LOWMEM_RESERVE_RATIO, .procname = "lowmem_reserve_ratio", @@ -1353,6 +1354,7 @@ static struct ctl_table vm_table[] = { .mode = 0644, .proc_handler = &mmap_min_addr_handler, }, +#endif #ifdef CONFIG_NUMA { .ctl_name = CTL_UNNUMBERED, -- cgit v1.2.3