From patchwork Mon May 19 01:54:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 30357 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f197.google.com (mail-ig0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7AA28203AB for ; Mon, 19 May 2014 02:05:15 +0000 (UTC) Received: by mail-ig0-f197.google.com with SMTP id hn18sf10002842igb.8 for ; Sun, 18 May 2014 19:05:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :mime-version:cc:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=MTZoZO5WlOEjRMPkYd0zdZ7OZHHgxF/2NoALNtMlhwQ=; b=YWbFcr2NLuRJ+lUAkkR8RElwQ4FeB3bmqACE5yebnVc+qpUaXiZPxi0351cyGloS3J BXSHRZh1SJ3qfrPcnxTO9+AbnGrMI4EwhU0NQX0cUzsvelV9WiTjeWwj/smtEgqfI5OT mC6I+TAhYdp4fuzGl/bKzjPYC1cdFmrKbAVAtzeYoku1wSYBDI0XJZ2hrKlGPpe9RTNR IfntfDHouBjNXqyVqHFF6q1nKN2OQfC3TsMP0bZ2fJAaoUvKfJrE3DChrIBF0Z2Uqat9 HMaqAzA7j6GsJu6NRFHkvSqJ+Vb0ljtFPHvEgR/abjaTg5JcFskxQnN86bNRbJuqmA9u DJqQ== X-Gm-Message-State: ALoCoQm6WhnaMY45N9pzTDMksfpGnFNJDUBh5I3lD7t6sQTGHAB58VhnBSLUHYugIqSwJaQWyK/p X-Received: by 10.182.128.234 with SMTP id nr10mr15393170obb.0.1400465114939; Sun, 18 May 2014 19:05:14 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.34.233 with SMTP id l96ls1412747qgl.90.gmail; Sun, 18 May 2014 19:05:14 -0700 (PDT) X-Received: by 10.58.29.16 with SMTP id f16mr16279541veh.23.1400465114768; Sun, 18 May 2014 19:05:14 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id an4si3539152vdd.134.2014.05.18.19.05.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 18 May 2014 19:05:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.174 as permitted sender) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id jw12so5728031veb.19 for ; Sun, 18 May 2014 19:05:14 -0700 (PDT) X-Received: by 10.58.126.4 with SMTP id mu4mr29441776veb.0.1400465114646; Sun, 18 May 2014 19:05:14 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp209498vcb; Sun, 18 May 2014 19:05:14 -0700 (PDT) X-Received: by 10.140.104.44 with SMTP id z41mr43287356qge.76.1400465114194; Sun, 18 May 2014 19:05:14 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id e4si7869504qcc.29.2014.05.18.19.05.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 May 2014 19:05:14 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WmCuc-0003Pk-LS; Mon, 19 May 2014 02:02:46 +0000 Received: from szxga02-in.huawei.com ([119.145.14.65]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WmCua-0003NY-Aw; Mon, 19 May 2014 02:02:45 +0000 Received: from 172.24.2.119 (EHLO szxeml212-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BTX81779; Mon, 19 May 2014 10:01:26 +0800 (CST) Received: from SZXEML404-HUB.china.huawei.com (10.82.67.59) by szxeml212-edg.china.huawei.com (172.24.2.181) with Microsoft SMTP Server (TLS) id 14.3.158.1; Mon, 19 May 2014 10:01:21 +0800 Received: from lggeml418-hub.china.huawei.com (10.72.61.113) by szxeml404-hub.china.huawei.com (10.82.67.59) with Microsoft SMTP Server (TLS) id 14.3.158.1; Mon, 19 May 2014 10:01:23 +0800 Received: from kernel-host.huawei (10.107.197.247) by lggeml418-hub.china.huawei.com (10.72.61.113) with Microsoft SMTP Server id 14.3.158.1; Mon, 19 May 2014 10:01:17 +0800 From: Wang Nan To: , Simon Horman , Will Deacon Subject: [PATCH Resend] ARM: kdump: makes second kernel use strict pfn_valid Date: Mon, 19 May 2014 09:54:03 +0800 Message-ID: <1400464443-34816-1-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.4 MIME-Version: 1.0 X-Originating-IP: [10.107.197.247] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140518_190244_766973_43DB24DE X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.4 (-) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-1.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [119.145.14.65 listed in list.dnswl.org] -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record Cc: Wang Nan , Andrew Morton , kexec@lists.infradead.org, Geng Hui , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: wangnan0@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 When SPARSEMEM and CRASH_DUMP both selected, simple pfn_valid prevents the second kernel ioremap first kernel's memory if the address falls into second kernel section. This limitation requires the second kernel occupies a full section, and elfcorehdr must resides in another section. This patch makes crash dump kernel use strict pfn_valid, removes such limitation. For example: For a platform with SECTION_SIZE_BITS == 28 (256MiB) and crashkernel=128M@0x28000000 in kernel cmdline, the second kernel is loaded at 0x28000000. Kexec puts elfcorehdr at 0x2ff00000, and passes 'elfcorehdr=0x2ff00000 mem=130048K' to second kernel. When second kernel start, it tries to use ioremap to retrive its elfcorehrd. In this case, elfcodehdr is at the same section of the second kernel, pfn_valid will recongnize the page as valid, so ioremap will refuse to map it. Signed-off-by: Wang Nan Cc: Geng Hui --- I have sent this patch once, but get no response. Resend with commit message update. --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index db3c541..795b1d4 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1800,7 +1800,7 @@ config ARCH_SELECT_MEMORY_MODEL def_bool ARCH_SPARSEMEM_ENABLE config HAVE_ARCH_PFN_VALID - def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM + def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM || CRASH_DUMP config HIGHMEM bool "High Memory Support"