Message ID | 20180711074203.3019-5-takahiro.akashi@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 302F56032A for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 11 Jul 2018 08:54:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C81728A04 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 11 Jul 2018 08:54:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E67B28D1A; Wed, 11 Jul 2018 08:54:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A17B528A04 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 11 Jul 2018 08:54:04 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=jL93Jno7pflD1JDHqhnOX0iqXLv3aqg0sl4q8Y1MRIk=; b=F+/1be3K8kkcR3jMxkuswTeWyH tTwnvRO4A6eEjqo8oGHdIx4ZjirrsZyO3mmK1T7SRWCHPp7yhTblkhAkyA3O7T8DUc1Ws0RAmG6Hn pTiXFp3psnJ/hxmeft/WIjoLzPMUF1g2QkU2ueX0OpFmLqacaaXNKwIcQT2XbFC3HKeKyEIewQw2j b5yk+8LpRBzZYxJ/0dR6Zov86I6mp5dm7qSgCx+tkGpq0FojbVf9oL3HUNWp1QnvfmSwhQoxa/eMP XnBdDkUqbnaHCosLeggvvzc0b/EJTZ34PcHEZSFvZuR9XefadnIoIBFGz8qbLc4VinNl4ma42KsXh R939Fyuw==; 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 1fdAsp-0003Sw-0l; Wed, 11 Jul 2018 08:53:59 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdAsa-0002v0-OV for linux-arm-kernel@bombadil.infradead.org; Wed, 11 Jul 2018 08:53:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PItXgTakqtWpQdCyBHziU3bBiq2X1/Ekd+7Czkvk2eo=; b=edYXAptVV7in+u8oU4JPIGqRL 9DKVNAULGjfb8aql20oCIv7cBL+W7SpsV+5VBmEzSs3cSieuYgaO6lrQqHyrzVG09TQerjTyZP7GR gnQs8AzqAvf9HO6prnJz1unD/Eo+HK7FvwfDClWo6JA+1FvBqbSwd4i935FEivHjL5SYKy64OhZpZ xKFajELgkQsBoQbDvNttj+9ObZpQZzZkh5CkAxp3z3EcgLn8kSDCFVYtRb7rcLY5R1cOv3KQgo70W Obo0++1g5AZxVc/o9YwyZY9F6q5UVzoP7RR5e9SX8yi1BkjIjbmXrUDq1IDS43BYRuQllnqg8AtpK rxtO9mxVw==; Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fd9lG-0004UE-4y for linux-arm-kernel@lists.infradead.org; Wed, 11 Jul 2018 07:42:07 +0000 Received: by mail-pg1-x544.google.com with SMTP id r1-v6so2686837pgp.11 for <linux-arm-kernel@lists.infradead.org>; Wed, 11 Jul 2018 00:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PItXgTakqtWpQdCyBHziU3bBiq2X1/Ekd+7Czkvk2eo=; b=J4yi+GBUU3ZdD5V4QCTl0/VkFq/9LrXzrTTb2HIvOgzhrh/gTY46d4Uqtztfl1/Twb 8Ld6FN7tnjq+cMQvaZKFpTifxHsmR7SCzzSWO68TGLBVO+sSrRKZwsqxMr0B9u97hoQT iP7C1slL0HeldBkE4fSunJLeI+cYDK9ISaY7E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PItXgTakqtWpQdCyBHziU3bBiq2X1/Ekd+7Czkvk2eo=; b=bwbJFyvd385ry9fqRUQ0QElhnazmR2TosVWifkx/Jbu0ChM2FAYlqAGr/0WR+MlFsE rYZ988IMcW635vEhpIykJZW2NRVOcv747SNcCvl4TOq3IEUx7+joojdkbephWzKB/16k 1u/UiqgO3j2yjVM2TuKuJZVyB2gESXo6fUg9KWT8XOsXu1/7Evbl8tVU9g7i6D+oH56M lZ+oyX39zPo5qwOYT26x5Z7YUmvyQwsjo5jLRFvemgzPAKC8ndMDNI76mqoUo1TEVElu wBSOx48I7MIjEt4gxwv2EyFlhRd1fms2txworuTs0QBSbXVY11SRtLtBBp7FR+BmU7E7 lBPw== X-Gm-Message-State: APt69E3jOdmLY9vjlZAIHbZ14sv+jW79BOuD7VOHpJKRvfJUDmTsauce 3iNbHlEzZ5jkqNAFgdi4HE9IAA== X-Google-Smtp-Source: AAOMgpefz8mOdK8ZGM6jri9hzMiv+EHqTvGtd3jBnKRw3BiTe9GT351x2i4CU9+pIcFvXuqbWwobNw== X-Received: by 2002:a65:5bc4:: with SMTP id o4-v6mr19428518pgr.448.1531294911472; Wed, 11 Jul 2018 00:41:51 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id s144-v6sm4342686pfs.123.2018.07.11.00.41.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 00:41:50 -0700 (PDT) From: AKASHI Takahiro <takahiro.akashi@linaro.org> To: catalin.marinas@arm.com, will.deacon@arm.com, dhowells@redhat.com, vgoyal@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net, dyoung@redhat.com, bhe@redhat.com, arnd@arndb.de Subject: [PATCH v11 04/15] kexec_file: kexec_walk_memblock() only walks a dedicated region at kdump Date: Wed, 11 Jul 2018 16:41:52 +0900 Message-Id: <20180711074203.3019-5-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180711074203.3019-1-takahiro.akashi@linaro.org> References: <20180711074203.3019-1-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180711_034206_222951_2CB7D115 X-CRM114-Status: GOOD ( 14.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: ard.biesheuvel@linaro.org, bhsharma@redhat.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, AKASHI Takahiro <takahiro.akashi@linaro.org>, james.morse@arm.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c index b088324fb3ad..ebf06c3e168d 100644 --- a/kernel/kexec_file.c +++ b/kernel/kexec_file.c @@ -511,6 +511,9 @@ static int kexec_walk_memblock(struct kexec_buf *kbuf, phys_addr_t mstart, mend; struct resource res = { }; + if (kbuf->image->type == KEXEC_TYPE_CRASH) + return func(&crashk_res, kbuf); + if (kbuf->top_down) { for_each_free_mem_range_reverse(i, NUMA_NO_NODE, 0, &mstart, &mend, NULL) {
In kdump case, there exists only one dedicated memoblock region as usable memory (crashk_res). With this patch, kexec_walk_memblock() runs a given callback function on this region. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Cc: Dave Young <dyoung@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Baoquan He <bhe@redhat.com> --- kernel/kexec_file.c | 3 +++ 1 file changed, 3 insertions(+)