ARM: 8696/1: mm: Remove dead code in mem_init()
authorVladimir Murzin <vladimir.murzin@arm.com>
Mon, 4 Sep 2017 08:17:48 +0000 (09:17 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Thu, 28 Sep 2017 10:13:04 +0000 (11:13 +0100)
The code in question checks memory constrains to set default policy for
overcommit; however we support page size of 4K only thus condition is
always evaluated to false. Remove that dead code.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/mm/init.c

index ad80548325fe9a6694641c722f00d1b29bd5bf3e..81d4482b6861ca2f3ea71d56b1a967db953fc94a 100644 (file)
@@ -580,16 +580,6 @@ void __init mem_init(void)
        BUILD_BUG_ON(PKMAP_BASE + LAST_PKMAP * PAGE_SIZE > PAGE_OFFSET);
        BUG_ON(PKMAP_BASE + LAST_PKMAP * PAGE_SIZE      > PAGE_OFFSET);
 #endif
-
-       if (PAGE_SIZE >= 16384 && get_num_physpages() <= 128) {
-               extern int sysctl_overcommit_memory;
-               /*
-                * On a machine this small we won't get
-                * anywhere without overcommit, so turn
-                * it on by default.
-                */
-               sysctl_overcommit_memory = OVERCOMMIT_ALWAYS;
-       }
 }
 
 #ifdef CONFIG_STRICT_KERNEL_RWX