Message ID | 20180907075653.4696-6-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-2.web.codeaurora.org (Postfix) with ESMTP id 7F0B0112B for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 7 Sep 2018 08:09:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 704BC2ADC6 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 7 Sep 2018 08:09:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63FDD2ADD2; Fri, 7 Sep 2018 08:09:02 +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,RCVD_IN_DNSWL_NONE 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 F03872ADC6 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 7 Sep 2018 08:09:01 +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=1dCNhZc73WeIz2z0zseZdpfr/EoSzT8gtkFmenZiZDQ=; b=G5OgHu+O6dNZ7HDZ+5wcnzJpS2 8mMSdI0AZQpH6BsTXimbZNkYAzbTKX91mIpg/sEtL/pG2pWQQ/WvhpcbkbgT09wdAH8/BTK6NB+Aw UKOOsePmwVIB1mYL7rr+uGNLiScU9BBZzH/IchBqerV3VAyWAOblwhNakmXiMCUeiPiZZTJ8mhs47 sPKyXtd6yEEMtsM0uQxSqrdr4RtKzgJ88SfhdReWqQgQlC1jX+TL2u0+j+L4dtFeg3DyLFGoMHB/d EFcI/z/a+BnC0VXxIxM3bUHFAXqefKl90OfYRyvk0eAzjzgHlk3r9bA3Tiib7Z6wbHpb+dullETqU rn6IJMSw==; 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 1fyBoo-0006mz-G4; Fri, 07 Sep 2018 08:08:42 +0000 Received: from merlin.infradead.org ([205.233.59.134]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fyBho-000321-BL for linux-arm-kernel@bombadil.infradead.org; Fri, 07 Sep 2018 08:01:28 +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=jeWHjhWZzqcn992r+CjxadoTg1glUklXZIt+KkbfGzY=; b=XRcpeNoTnML0qxwuabxoAUN83 A7ACpKXiKZSkw/cUUZXOPlkQINNmIL1yBuy4yg6mSzVB5iQXE7TrGbOXrLMJVFzMZS/POONejmpWC T5gW59050luRrEqbLwvI+BylaUQYrvR3VLtmFJA3nh6jSbsxL4D1Go1GdksAPFYJbqw2ahjm+JadN mti3QIyUpMGCLgT7AF3IA6MA+eLuhANszg8DTHjnbZ3hRkLBX4zIX8EjgP91iTVWFQeMI1tPfN68C SSt5EC44QCDJsGPVst6EMb6IEQfQE8ZGt7WnRlEpXq/mKKsPRzyCtKX2scI7NdfByocewFqeBNE1J 0Fjda3RvQ==; 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 1fyBfg-0007xT-6o for linux-arm-kernel@lists.infradead.org; Fri, 07 Sep 2018 07:59:16 +0000 Received: by mail-pg1-x544.google.com with SMTP id v66-v6so6580546pgb.10 for <linux-arm-kernel@lists.infradead.org>; Fri, 07 Sep 2018 00:59:04 -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=jeWHjhWZzqcn992r+CjxadoTg1glUklXZIt+KkbfGzY=; b=Iw6FIM/UTbLuebPjiA4jQVIGzj1ZOSMVexZ11oWFVNDZ/ufvkYBdyX+BbPZ/5aYKuB r7XPHSCEgPMikmy/gv+Bo0F7HsfeRIQE/WRc+OOPgtR5GjEeC+1fc0e67z4kIxqGHvFI 9s44tc/wjbhJiYdjVD0GmiWIk9iV8rl4OPZWo= 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=jeWHjhWZzqcn992r+CjxadoTg1glUklXZIt+KkbfGzY=; b=csf2JmrgZ/9AS6WKRnX24tuc3HgTeiZE/JRvq0uDYYFn+5cz1fMjli/umxrjCUcweH aQNhhLViwiAx1DU9jIMgzcylFKljJgZV6unrwdjgRZ7Kqc+kBoPYF6fZOpSWGl4+vh0A VGBxlXLU8BJBESRGuT/7fJGs930kr4TZUX348Eo7AJhFrVT+RfBA4XHCCHp0TRLwk9mi BHKdoU8GhxVsQ1BL28wA/yCtjychMt3Dvg3B2bRmIwCuo8foVNu3GASgtJ8wnAaxy5hp PLcL4d72YrLFD8YGOoeVMkWEbw8dZxNJshPGgS4gzYe2tn6d/j3TU1hljF6nw/Lso6VF hZYw== X-Gm-Message-State: APzg51Dq0sP6/BovMdV/LALZGYmVM+1R7CBKZUbPJl0OAe3gnIOrvXNH PEHeEJFJZ2e6t7F4XiaWHhaeYQ== X-Google-Smtp-Source: ANB0VdZrG69yj9ElBSyC2eZg1/EFcPXyz/rqBMU49wEU/gT4vQCwnzRYWUbh+3xhlWJ+NispINZ47A== X-Received: by 2002:a62:56d9:: with SMTP id h86-v6mr7152853pfj.229.1536307082476; Fri, 07 Sep 2018 00:58:02 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id l185-v6sm18675979pga.5.2018.09.07.00.58.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 00:58:01 -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, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com Subject: [PATCH v14 05/16] kexec_file: kexec_walk_memblock() only walks a dedicated region at kdump Date: Fri, 7 Sep 2018 16:56:42 +0900 Message-Id: <20180907075653.4696-6-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180907075653.4696-1-takahiro.akashi@linaro.org> References: <20180907075653.4696-1-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180907_035916_308583_E0372B73 X-CRM114-Status: GOOD ( 15.90 ) 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, prudo@linux.ibm.com, 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 |
Series |
subject: arm64: kexec: add kexec_file_load() support
|
expand
|
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c index 370d7eab49fe..2f615a7968dd 100644 --- a/kernel/kexec_file.c +++ b/kernel/kexec_file.c @@ -511,8 +511,11 @@ 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, + for_each_free_mem_range_reverse(i, NUMA_NO_NODE, MEMBLOCK_NONE, &mstart, &mend, NULL) { /* * In memblock, end points to the first byte after the @@ -526,8 +529,8 @@ static int kexec_walk_memblock(struct kexec_buf *kbuf, break; } } else { - for_each_free_mem_range(i, NUMA_NO_NODE, 0, &mstart, &mend, - NULL) { + for_each_free_mem_range(i, NUMA_NO_NODE, MEMBLOCK_NONE, + &mstart, &mend, NULL) { /* * In memblock, end points to the first byte after the * range while in kexec, end points to the last byte
In kdump case, there exists only one dedicated memblock region as usable memory (crashk_res). With this patch, kexec_walk_memblock() runs a given callback function on this region. Cosmetic change: 0 to MEMBLOCK_NONE at for_each_free_mem_range*() 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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)