Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3317761imu; Thu, 29 Nov 2018 20:45:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/UlsooZOdiUyPYGZck2Aa35j7zh2S1tLZ+6/Db1IQuUDvazIUp8rUVI47GtwB5BKc2WqSJc X-Received: by 2002:a62:5ec5:: with SMTP id s188mr4087631pfb.145.1543553139965; Thu, 29 Nov 2018 20:45:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543553139; cv=none; d=google.com; s=arc-20160816; b=twUimeLJ18GJUkLtRYyhZwMA4MfEgXdGTMa5WfeEre94af3/yjGmTh20obOe5bXosF uyk8wyl4KEOEH5STsqrPp6/G1fb83Gz5dyDQWbgiZDMAlCZRtC0sbMO8LsljcrveK0Hd ClGsFvZuup5EKQKJ3+kg/5D/xsHOHfI35bzZaItXAZo4Jj2hWGyf8HX/qH2aL3emK6S9 H9NyDhZ2+cxzXxfcivNDzyYijQc3CibtR0WMYh8wFrHZo1c51UmDsu8QG6+wmTdhAwXp HrhGiOVP8eHVc6PqROzxw8YLvO/QXITuenUhcX2PRTvQ9H+zW/5KJNNAB24Ty9eorTQm DCTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ZLUcbGvwujvr25h1bJdmisIQ60CWZbH7Dc6tzkH4t9s=; b=UfqGHL33S88g1NKmgL8EjdbyTURelNNvwBGnuodXe2/CrJmldZ3BfGAoOVi+M3PjmU xQynVUfcqv2WqJs7Jb0QDeVeaQUL2RYvrcxm01xsqXeiBEUA6C1bHCo8KyNQuCKePyHF rG/MLEkXNN3F8lvkMiEqIpxxlnY2dDg/41MfKnPlejBZjGKoFXh2nVYy3IDMFdzO5tgJ AfxxxRbVDG0lowj0b5sTKR7iPcW1/wqMt/LOs2dkImoJL9gEHlli4bjm0oJdM2qk9oXY aeckFIaWCdsFaTU4LCME5YSnsU3KQElPQombiQ4cjUFiY7dCBWz0EGdmNaKfN+xKbKWk BmRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u186si3708973pgd.131.2018.11.29.20.45.24; Thu, 29 Nov 2018 20:45:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726498AbeK3Pww (ORCPT + 99 others); Fri, 30 Nov 2018 10:52:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53466 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726355AbeK3Pww (ORCPT ); Fri, 30 Nov 2018 10:52:52 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2912E31256D9; Fri, 30 Nov 2018 04:44:51 +0000 (UTC) Received: from localhost.localdomain (ovpn-12-125.pek2.redhat.com [10.72.12.125]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 41EEA19940; Fri, 30 Nov 2018 04:44:39 +0000 (UTC) Subject: Re: [PATCH 1/2 v8] resource: add the new I/O resource descriptor 'IORES_DESC_RESERVED' To: Dave Young Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org, x86@kernel.org, linux-ia64@vger.kernel.org, linux-efi@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, akpm@linux-foundation.org, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, ard.biesheuvel@linaro.org, tony.luck@intel.com, fenghua.yu@intel.com, bhe@redhat.com References: <20181129080956.20776-1-lijiang@redhat.com> <20181129080956.20776-2-lijiang@redhat.com> <20181130034129.GA26791@dhcp-128-65.nay.redhat.com> From: lijiang Message-ID: <5bda3bfe-8ab2-3c3e-fc4d-6322d372e9ae@redhat.com> Date: Fri, 30 Nov 2018 12:44:34 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181130034129.GA26791@dhcp-128-65.nay.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 30 Nov 2018 04:44:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2018年11月30日 11:41, Dave Young 写道: > On 11/29/18 at 04:09pm, Lianbo Jiang wrote: >> When doing kexec_file_load, the first kernel needs to pass the e820 >> reserved ranges to the second kernel. But kernel can not exactly >> match the e820 reserved ranges when walking through the iomem resources >> with the descriptor 'IORES_DESC_NONE', because several e820 types( >> e.g. E820_TYPE_RESERVED_KERN/E820_TYPE_RAM/E820_TYPE_UNUSABLE/E820 >> _TYPE_RESERVED) are converted to the descriptor 'IORES_DESC_NONE'. It >> may pass these four types to the kdump kernel, that is not desired result. >> >> So, this patch adds a new I/O resource descriptor 'IORES_DESC_RESERVED' >> for the iomem resources search interfaces. It is helpful to exactly >> match the reserved resource ranges when walking through iomem resources. >> >> In addition, since the new descriptor 'IORES_DESC_RESERVED' is introduced, >> these code originally related to the descriptor 'IORES_DESC_NONE' need to >> be updated. Otherwise, it will be easily confused and also cause some >> errors. Because the 'E820_TYPE_RESERVED' type is converted to the new >> descriptor 'IORES_DESC_RESERVED' instead of 'IORES_DESC_NONE', it has been >> changed. >> >> Suggested-by: Dave Young > > This was suggested by Boris instead :) > Sorry for this, i forgot to change it. And i will correct this in next version. Thanks. >> Signed-off-by: Lianbo Jiang >> --- >> arch/ia64/kernel/efi.c | 4 ++++ >> arch/x86/kernel/e820.c | 2 +- >> arch/x86/mm/ioremap.c | 13 ++++++++++++- >> include/linux/ioport.h | 1 + >> kernel/resource.c | 6 +++--- >> 5 files changed, 21 insertions(+), 5 deletions(-) >> >> > [snip] > > Thanks > Dave >