From news@gmane.org Tue Mar 04 03:33:20 2003 From: Bernhard Walle Subject: [PATCH] x86: Move crashkernel reservation before dma32_reserve_bootmem() Date: Sun, 13 Jul 2008 20:49:44 +0200 Lines: 50 Message-ID: <1215974984-25184-1-git-send-email-bwalle@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, Bernhard Walle , kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Bernhard Walle , vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org To: x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org X-From: kexec-bounces+glkk-kexec=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Sun Jul 13 20:51:01 2008 Return-path: Envelope-to: glkk-kexec@m.gmane.org Received: from bombadil.infradead.org ([18.85.46.34]) by lo.gmane.org with esmtp (Exim 4.50) id 1KI6ey-0004HG-Qh for glkk-kexec@m.gmane.org; Sun, 13 Jul 2008 20:51:01 +0200 Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1KI6ds-0005By-4N; Sun, 13 Jul 2008 18:49:52 +0000 Received: from relay2.mail.vrmd.de ([81.28.224.28]) by bombadil.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id 1KI6dp-000586-R0 for kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org; Sun, 13 Jul 2008 18:49:50 +0000 Received: from [83.171.168.122] (helo=localhost.localdomain) by relay2.mail.vrmd.de with esmtpa (Exim 4.69) (envelope-from ) id 1KI6dl-00022U-Hq; Sun, 13 Jul 2008 20:49:45 +0200 X-Mailer: git-send-email 1.5.6.2 X-Relay-User: bernhard-X9USDgGjgfuzQB+pC5nmwQ@public.gmane.org X-Spam-Score: 0.0 (/) X-BeenThere: kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kexec-bounces-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Errors-To: kexec-bounces+glkk-kexec=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org From: Bernhard Walle On a x86-64 machine (nothing special I could encounter) I had the problem that crashkernel reservation with the usual "64M@16M" failed. While debugging that, I encountered that dma32_reserve_bootmem() reserves a memory region which is in that area. Because dma32_reserve_bootmem() does not rely on a specific offset but crashkernel does, it makes sense to move the crashkernel reservation up a bit. I tested that patch and it works without problems. I don't see any negative effects of that move, but maybe I oversaw something ... While the long-term solution is to make the crashkernel reservation dynamic (which is already done in -tip), this bug should be fixed also short-term for 2.6.26 (or 2.6.26-stable if it's too short), and that's why I made that patch. Signed-off-by: Bernhard Walle Signed-off-by: Bernhard Walle --- arch/x86/kernel/setup_64.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index 6dff128..158cefe 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c @@ -444,6 +444,12 @@ void __init setup_arch(char **cmdline_p) contig_initmem_init(0, end_pfn); #endif + /* + * dma32_reserve_bootmem() allocates bootmem which may conflict + * with the crashkernel command line, so do that before + */ + reserve_crashkernel(); + dma32_reserve_bootmem(); #ifdef CONFIG_ACPI_SLEEP @@ -484,7 +490,6 @@ void __init setup_arch(char **cmdline_p) } } #endif - reserve_crashkernel(); reserve_ibft_region(); -- 1.5.6.2