From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f70.google.com (mail-pg0-f70.google.com [74.125.83.70]) by kanga.kvack.org (Postfix) with ESMTP id 9CA956B026D for ; Mon, 18 Sep 2017 06:56:16 -0400 (EDT) Received: by mail-pg0-f70.google.com with SMTP id 188so163104pgb.3 for ; Mon, 18 Sep 2017 03:56:16 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com. [134.134.136.65]) by mx.google.com with ESMTPS id c79si4255963pfd.234.2017.09.18.03.56.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 03:56:15 -0700 (PDT) From: "Kirill A. Shutemov" Subject: [PATCHv7 11/19] x86/mm: Make STACK_TOP_MAX dynamic Date: Mon, 18 Sep 2017 13:55:45 +0300 Message-Id: <20170918105553.27914-12-kirill.shutemov@linux.intel.com> In-Reply-To: <20170918105553.27914-1-kirill.shutemov@linux.intel.com> References: <20170918105553.27914-1-kirill.shutemov@linux.intel.com> Sender: owner-linux-mm@kvack.org List-ID: To: Ingo Molnar , Linus Torvalds , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" Cc: Andrew Morton , Andy Lutomirski , Cyrill Gorcunov , Borislav Petkov , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" For boot-time switching between paging modes, we need to be able to change STACK_TOP_MAX at runtime. The change is trivial and it doesn't affect kernel image size. Signed-off-by: Kirill A. Shutemov --- arch/x86/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 3fa26a61eabc..fa9300ccce1b 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -871,7 +871,7 @@ static inline void spin_lock_prefetch(const void *x) IA32_PAGE_OFFSET : TASK_SIZE_MAX) #define STACK_TOP TASK_SIZE_LOW -#define STACK_TOP_MAX TASK_SIZE_MAX +#define STACK_TOP_MAX (pgtable_l5_enabled ? TASK_SIZE_MAX : DEFAULT_MAP_WINDOW) #define INIT_THREAD { \ .sp0 = TOP_OF_INIT_STACK, \ -- 2.14.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org