aboutsummaryrefslogtreecommitdiff
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-12-15 19:27:45 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-01-06 15:04:30 -0800
commit0399123f3dcce1a515d021107ec0fb4413ca3efa (patch)
treefeb6247bb86bcb4ccaf179d086ccd95fff6f2c66 /kernel/sysctl.c
parent1cfe005024b5c820f9b37c9045ec87ee75a8cfb6 (diff)
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 <dhowells@redhat.com> Acked-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 0d949c51741..db23ab7e56c 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,