summaryrefslogtreecommitdiffstats
path: root/arch/tile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/mm/init.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/tile/mm/init.c b/arch/tile/mm/init.c
index d4e1fc41d06d..a0582b7f41d3 100644
--- a/arch/tile/mm/init.c
+++ b/arch/tile/mm/init.c
@@ -896,17 +896,15 @@ void __init pgtable_cache_init(void)
896 panic("pgtable_cache_init(): Cannot create pgd cache"); 896 panic("pgtable_cache_init(): Cannot create pgd cache");
897} 897}
898 898
899#ifdef CONFIG_DEBUG_PAGEALLOC
900static long __write_once initfree;
901#else
902static long __write_once initfree = 1; 899static long __write_once initfree = 1;
903#endif 900static bool __write_once set_initfree_done;
904 901
905/* Select whether to free (1) or mark unusable (0) the __init pages. */ 902/* Select whether to free (1) or mark unusable (0) the __init pages. */
906static int __init set_initfree(char *str) 903static int __init set_initfree(char *str)
907{ 904{
908 long val; 905 long val;
909 if (kstrtol(str, 0, &val) == 0) { 906 if (kstrtol(str, 0, &val) == 0) {
907 set_initfree_done = true;
910 initfree = val; 908 initfree = val;
911 pr_info("initfree: %s free init pages\n", 909 pr_info("initfree: %s free init pages\n",
912 initfree ? "will" : "won't"); 910 initfree ? "will" : "won't");
@@ -919,6 +917,11 @@ static void free_init_pages(char *what, unsigned long begin, unsigned long end)
919{ 917{
920 unsigned long addr = (unsigned long) begin; 918 unsigned long addr = (unsigned long) begin;
921 919
920 /* Prefer user request first */
921 if (!set_initfree_done) {
922 if (debug_pagealloc_enabled())
923 initfree = 0;
924 }
922 if (kdata_huge && !initfree) { 925 if (kdata_huge && !initfree) {
923 pr_warn("Warning: ignoring initfree=0: incompatible with kdata=huge\n"); 926 pr_warn("Warning: ignoring initfree=0: incompatible with kdata=huge\n");
924 initfree = 1; 927 initfree = 1;