Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3279516imu; Thu, 29 Nov 2018 19:42:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/V/lXiYpXxFVLuP1krO64Ln0k+Hc03nECWNKkP2QqnheBCPBGBE6EZFeZTtNakFg5pNSlhZ X-Received: by 2002:a63:dd15:: with SMTP id t21mr3357179pgg.347.1543549355570; Thu, 29 Nov 2018 19:42:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543549355; cv=none; d=google.com; s=arc-20160816; b=UdMuzOnreQU4sn8AZZwZO1gmir7O9rd/smXdlh/cgnGs3aZ52fuz/Fqu1qHqLPm0QU d5Wri4rtOvxlKhFeZb35bd9GoXfc106UQHBT5+iuC1NjinLrW4fqri6TKoit+Yhe42yW nTnY3yzwg5f9FvdGyCG45eDn5X1u7Hzcv36Xdx4EhJstJ3VffHYySQHx66yEHEXHtlW1 YWXmBQz05KJN5Fj3KbOZnCD5vyQG+b9ZM889SrxkmJJ2oBCj2GHO9OU39MlzEekPxDyx MOL3odGKWOPWznH2XXYKHKGsRt5bOa45aTMYIAMcwMPea2qGOBGYop72s+Cgs7Sdy/n3 /D1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=GrSAX8mFrmPmNs4wzL88mjcH57IL4knqeqKnlQxJ6fA=; b=oCFOzBQiRfE8zv0BW5tWWYbE0YUgZ71BgHaUCJjamVbWjS/ACHPiwXL5W5/uY8roA1 idlZqRi8aNlKSMh0BLKb3Fz3ti7g6+2Ta5I2QguuFh3j63oijgW0GEzm6tXs6Bp6dv72 D1NdvjGnk/mgG43NU202g5Uf4KqAwzSaIBrn+ylDe45Y4M0dPbAIy4lp0jRY4x9qNOab EIMjD8hBO94tEvb+p39EAXFotC4zzJ7zkGqhU5mECdZlnpSj8DcY9qjctd9xlAVhtV8x JnDrSjh/AC78XzrW12yw8GJU368Ib+IP0hEXhDDZly8pZo4BLAXRaDfiFU97GPXBPsxk XsQQ== 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 v25si3664454pgk.341.2018.11.29.19.42.20; Thu, 29 Nov 2018 19:42:35 -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 S1726637AbeK3Otg (ORCPT + 99 others); Fri, 30 Nov 2018 09:49:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51146 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726161AbeK3Otg (ORCPT ); Fri, 30 Nov 2018 09:49:36 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 66B8930024E2; Fri, 30 Nov 2018 03:41:44 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-100.pek2.redhat.com [10.72.12.100]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6C3427C82C; Fri, 30 Nov 2018 03:41:33 +0000 (UTC) Date: Fri, 30 Nov 2018 11:41:29 +0800 From: Dave Young To: Lianbo Jiang 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 Subject: Re: [PATCH 1/2 v8] resource: add the new I/O resource descriptor 'IORES_DESC_RESERVED' Message-ID: <20181130034129.GA26791@dhcp-128-65.nay.redhat.com> References: <20181129080956.20776-1-lijiang@redhat.com> <20181129080956.20776-2-lijiang@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181129080956.20776-2-lijiang@redhat.com> User-Agent: Mutt/1.9.5 (2018-04-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 30 Nov 2018 03:41:44 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :) > 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