From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id F09C86B0253 for ; Fri, 12 Aug 2016 10:21:37 -0400 (EDT) Received: by mail-pf0-f200.google.com with SMTP id h186so50104482pfg.2 for ; Fri, 12 Aug 2016 07:21:37 -0700 (PDT) Received: from mail-pa0-x243.google.com (mail-pa0-x243.google.com. [2607:f8b0:400e:c03::243]) by mx.google.com with ESMTPS id y8si9155971pab.178.2016.08.12.07.21.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Aug 2016 07:21:37 -0700 (PDT) Received: by mail-pa0-x243.google.com with SMTP id cf3so1557474pad.2 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> Sender: owner-linux-mm@kvack.org List-ID: To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, bp@suse.de, dyoung@redhat.com, jroedel@suse.de, krzysiek@podlesie.net, msalter@redhat.com, ebiederm@xmission.com, akpm@linux-foundation.org, bhe@redhat.com, vgoyal@redhat.com, mnfhuang@gmail.com, kexec@lists.infradead.org, kirill.shutemov@linux.intel.com, mchehab@osg.samsung.com, aarcange@redhat.com, vdavydov@parallels.com, dan.j.williams@intel.com, jack@suse.cz, linux-mm@kvack.org, Ronit Halder 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