From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B14BEC10F00 for ; Wed, 27 Mar 2019 18:10:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8249F218A6 for ; Wed, 27 Mar 2019 18:10:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PHzMfVOD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8249F218A6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SuZGd4b1XU9ykJa/6vxi+Pb2ij7cdMRUFkYDd35wGAo=; b=PHzMfVODvN9Es+ SGvsR2Z2zPvDi5Cbbo/v/52FCwht23hIeyVR2K4S8kLC1kSws0yBo6NuctEzyiMt8pGxkUZDeHPMc DDTJjXwz62CvFbFpVOcDcskJUGUejBWuyacmtF6G9QFQd/3iCQIuWsN8EELqhJFeELOwHDAzQFudi P8I1+nv0sX76eJAs/dW+mCssRwPLnwv4h3brqnarGitvRvS++2FWVLX0ON6SvFE80GDWKVx+t3jER Q0wWO1WBS4esvLKggF99OMNEDfae6mrJqSOrJqDK4O3ijHKEuq+Lh0f87Q3rxaXsar7WrOdFmQc1h Uu+SSDshswfd/fmV25wQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9D0f-0001AI-F3; Wed, 27 Mar 2019 18:10:45 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9D0I-0000py-Et for linux-arm-kernel@lists.infradead.org; Wed, 27 Mar 2019 18:10:32 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CE399A78; Wed, 27 Mar 2019 11:10:19 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.196.78]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 76A9C3F557; Wed, 27 Mar 2019 11:10:18 -0700 (PDT) Date: Wed, 27 Mar 2019 18:10:15 +0000 From: Catalin Marinas To: AKASHI Takahiro , Chen Zhou , will.deacon@arm.com, robin.murphy@arm.com, steve.capper@arm.com, wangyufen@huawei.com, linux-arm-kernel@lists.infradead.org Subject: Re: [BUG] arm64: kdump: capture kernel boot failed when crashkernel above 4G Message-ID: <20190327181015.GD17247@arrakis.emea.arm.com> References: <4ad85f69-6942-2f3b-bdf1-b7693e1e3fcf@huawei.com> <20190325143505.lrgrxwkxxltpggf7@mbp> <20190327045514.GQ9937@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190327045514.GQ9937@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190327_111022_584995_DA4C2909 X-CRM114-Status: GOOD ( 17.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Mar 27, 2019 at 01:55:16PM +0900, AKASHI Takahiro wrote: > On Mon, Mar 25, 2019 at 02:35:05PM +0000, Catalin Marinas wrote: > > On Sat, Mar 23, 2019 at 06:34:31PM +0800, Chen Zhou wrote: > > > When i tested kdump on arm64 with crashkernel=Y@X, the capture kernel boot failed if the start > > > address is above 4G. > > > > > > My test steps: > > > 1. set crashkernel=1024M@0x2040000000 and boot with ACPI > > > 2. echo c > /proc/sysrq-trigger > > > 3. boot capture kernel, failed > > [...] > > > [2019/3/23 15:58:47] [ 0.000000] Call trace: > > > [2019/3/23 15:58:47] [ 0.000000] dump_backtrace+0x0/0x188 > > > [2019/3/23 15:58:47] [ 0.000000] show_stack+0x24/0x30 > > > [2019/3/23 15:58:47] [ 0.000000] dump_stack+0xa8/0xcc > > > [2019/3/23 15:58:47] [ 0.000000] panic+0x14c/0x31c > > > [2019/3/23 15:58:47] [ 0.000000] setup_arch+0x2b0/0x5e0 > > > [2019/3/23 15:58:47] [ 0.000000] start_kernel+0x90/0x52c > > > [2019/3/23 15:58:47] [ 0.000000] ---[ end Kernel panic - not syncing: request_standard_resources: Failed to allocate 384 bytes ]--- > > > > > > The root cause is: > > > In capture kernel, memblock_alloc_low alloced memory in range [MEMBLOCK_LOW_LIMIT, ARCH_LOW_ADDRESS_LIMIT]. > > > CONFIG_ZONE_DMA32 is enabled, and ARCH_LOW_ADDRESS_LIMIT equals to max_zone_dma_phys() - 1. > > > The return value of function max_zone_dma_phys is 4G due to the existing "no-map" memory below 4G. > > > So memblock_alloc_low alloced memory in range [0, 4G) and failed. > > > > Does it work better if, in request_standard_resources(), we call > > memblock_alloc() instead of the _low variant? I doubt we need the > > *_low() call here. > > I've been aware of this issue in my testing, but I supposed > that there must be a reason for *_low() here to prevent the kernel > booting from higher address space. I don't remember why we had the *_low() variant, maybe we inherited it from arm32 where only the low addresses are mapped. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel