From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bYDLR-0004PV-M7 for kexec@lists.infradead.org; Fri, 12 Aug 2016 14:21:58 +0000 Received: by mail-pa0-x241.google.com with SMTP id hh10so1572975pac.1 for ; Fri, 12 Aug 2016 07:21:37 -0700 (PDT) From: Ronit Halder Subject: [RFC 1/4] Creating one or two CMA area at Boot time Date: Fri, 12 Aug 2016 19:50:32 +0530 Message-Id: <20160812142032.6036-1-ronit.crj@gmail.com> In-Reply-To: <20160812141838.5973-1-ronit.crj@gmail.com> References: <20160812141838.5973-1-ronit.crj@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: linux-kernel@vger.kernel.org Cc: vdavydov@parallels.com, jack@suse.cz, linux-mm@kvack.org, krzysiek@podlesie.net, mnfhuang@gmail.com, hpa@zytor.com, Ronit Halder , tglx@linutronix.de, aarcange@redhat.com, bhe@redhat.com, mingo@redhat.com, msalter@redhat.com, bp@suse.de, dyoung@redhat.com, vgoyal@redhat.com, jroedel@suse.de, mchehab@osg.samsung.com, dan.j.williams@intel.com, kexec@lists.infradead.org, ebiederm@xmission.com, akpm@linux-foundation.org, kirill.shutemov@linux.intel.com This patch create CMA area(s) at boot time. In case of x86_32 only one CMA area will be created. In case of x86_64 if the user wants to reserve high memory for crash kernel, then there must be at least 256MB (needed for swiotlb and DMA buffers) low memory. In that case two CMA areas (one in low memory and one in high memory) will be created. Signed-off-by: Ronit Halder --- arch/x86/kernel/setup.c | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index d2bbe34..87c16c7 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -69,6 +69,7 @@ #include #include #include +#include #include