From patchwork Wed May 28 08:44:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 31042 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 106F5203C3 for ; Wed, 28 May 2014 08:53:58 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id m1sf54724711oag.2 for ; Wed, 28 May 2014 01:53:58 -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:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=/X2FIV1oRdsjFPoU483n6SnYq1Ed0BPwEjFHtI8fK4g=; b=iBAv0yXzyc9D+Hj2IhTaH+B2pyDttYwuzj07v5HePibuPAIGrYEjyvl4zSDYHpWU8T VcIeNqFmm5IlsrJoOUkjS5Off0QlrJEaTuHWgTy30mrb/F+fR6fJS+Tu451dEJpap0my Pwm+EzPB+fCEgic5Vx1pu0UAsLhonw9+S1poleYDo2pkuetHJ6uJYMCD53wwflHXQBro AkHyQucxmQisxfyfsttArkb+oBUrkkVwvTa4m4soPvsoez+tW53LLkeniF+6rPzg1S7d 8HmBGXnFhLVMZS4FsOT9jYuaFOZ2cZVygMWMfeWeiMjaS0RhSO+g9FgtK5jm7p0jozUx eg/w== X-Gm-Message-State: ALoCoQm7+j0cXnX8v1DvGrD0X+pMYwQ+GXmORwfDCcl/6PHanscysNEJOFc5jYYyt+EFYWtAqIjv X-Received: by 10.182.176.8 with SMTP id ce8mr16447915obc.7.1401267238560; Wed, 28 May 2014 01:53:58 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.30.165 with SMTP id d34ls3422420qgd.25.gmail; Wed, 28 May 2014 01:53:58 -0700 (PDT) X-Received: by 10.221.40.193 with SMTP id tr1mr22936858vcb.31.1401267238402; Wed, 28 May 2014 01:53:58 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id vi9si10008491vec.98.2014.05.28.01.53.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 01:53:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.178 as permitted sender) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id sa20so12296489veb.9 for ; Wed, 28 May 2014 01:53:58 -0700 (PDT) X-Received: by 10.52.110.105 with SMTP id hz9mr28020595vdb.9.1401267238282; Wed, 28 May 2014 01:53:58 -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 ib8csp184773vcb; Wed, 28 May 2014 01:53:57 -0700 (PDT) X-Received: by 10.66.177.168 with SMTP id cr8mr43070994pac.128.1401267237544; Wed, 28 May 2014 01:53:57 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ro12si18520385pab.172.2014.05.28.01.53.56 for ; Wed, 28 May 2014 01:53:56 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754429AbaE1Ixr (ORCPT + 27 others); Wed, 28 May 2014 04:53:47 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:39221 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752319AbaE1Ixo (ORCPT ); Wed, 28 May 2014 04:53:44 -0400 Received: from 172.24.2.119 (EHLO szxeml205-edg.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id APG21886; Wed, 28 May 2014 16:52:46 +0800 (CST) Received: from SZXEML454-HUB.china.huawei.com (10.82.67.197) by szxeml205-edg.china.huawei.com (172.24.2.58) with Microsoft SMTP Server (TLS) id 14.3.158.1; Wed, 28 May 2014 16:52:07 +0800 Received: from LGGEML411-HUB.china.huawei.com (10.72.61.107) by SZXEML454-HUB.china.huawei.com (10.82.67.197) with Microsoft SMTP Server (TLS) id 14.3.158.1; Wed, 28 May 2014 16:52:08 +0800 Received: from kernel-host.huawei (10.107.197.247) by lggeml411-hub.china.huawei.com (10.72.61.107) with Microsoft SMTP Server id 14.3.158.1; Wed, 28 May 2014 16:51:57 +0800 From: Wang Nan To: Russell King , Simon Horman , Will Deacon CC: , , , Geng Hui , Wang Nan Subject: [PATCH RESEND] ARM: kdump: 2nd kernel should use strict pfn_valid in SPARSEMEM platform Date: Wed, 28 May 2014 16:44:28 +0800 Message-ID: <1401266668-34365-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 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.178 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch removes an irrational limitation for crash dump kernel on ARM platform with SPARSEMEM enabled. Without this patch, crash reservation area for a crash dump kernel with SPARSEMEM selected must occupy a full section plus 1MiB. If not, elfcorehdr and some memory space used by the first kernel will unable to get accessed. This is caused by pfn_valid: fast pfn_valid ragards any pfn in a valid section as valid and prevents it to be ioremapped. This limitation wastes memory, because sections are always large and crash dump kernel should be as small as possible. This patch selects HAVE_ARCH_PFN_VALID for CRASH_DUMP, makes crash dump kernel to use strict version of pfn_valid(). Signed-off-by: Wang Nan --- This is the third time I post this patch. The previous records can be retrived from: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/256498.html http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/257472.html Different from previous version, this patch select HAVE_ARCH_PFN_VALID right after CRASH_DUMP config entry. --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c57ddcb..d5ffbb1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -2160,6 +2160,7 @@ config ATAGS_PROC config CRASH_DUMP bool "Build kdump crash kernel (EXPERIMENTAL)" + select HAVE_ARCH_PFN_VALID if SPARSEMEM help Generate crash dump after being started by kexec. This should be normally only set in special crash dump kernels which are