Message ID | 20180724065759.19186-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 77D2D14E2 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 24 Jul 2018 07:54:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 674932871A for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 24 Jul 2018 07:54:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5903D28776; Tue, 24 Jul 2018 07:54:23 +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 DF4EB2871A for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 24 Jul 2018 07:54:22 +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=9dAlmITsvpeIeG16oqlCApTA3/HN5UcM9ghwbTVTyO0=; b=Rn0+ijjslHU7H9s6/58z3C/aau 2xjvE51ds53zPqs71FknFrtWPUeOjz1In7nEYxC67pWEXE/tybxpPA4qX7ZNZR9/3qn5sDo3QFIUF eL0yKiMeBlE4JapFD38O5MT5ExiazCjEd6TTW6hxE6qz8A4xbLxG3ge6o6ssaNQCW5c4xwJ5DtJGt lEUgE1M3c+kMNqtsLp3PfNNOXcuj/MjME5zIlbOFvVg7lNNZwJRBoPSpkxpsbsBbUV0o8BF48Rce+ Itlif7p6+4tMBJ4yL7GlkZpD6IId2eMrDe+DOgor31gz7N8W50bnFAxbszvuk6TlCZ3FN4kq5pFh+ zUoreNoA==; 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 1fhs9D-0001kB-8g; Tue, 24 Jul 2018 07:54:19 +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 1fhs8H-0000PI-Gk for linux-arm-kernel@bombadil.infradead.org; Tue, 24 Jul 2018 07:53:21 +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=qX+9ZLjYleTqiYTR/9AsWjndzTTMAgGfRwkaazjqic0=; b=XgQGbhMR7ZZAAhI+/KE2dzmif 5g9Y3mAp9MSClVItZIzEUjWYf2hwLmwyqFWXYufFI6GgGAIBi7e1mzZitxPC0gNK/tHn7mchpeaym 1G9sUEt0Ey6hhTJAKrcqRZDuAY9+MrAI2KObv52sdnQqIH9nr5EG/DKX2CPS8mCvQsIJRUyNMyLi6 IhXpGmU+Jgx4LYxqH9hIferB2FuOv3qOO0SKVZhtAFM5xa+IVu/XFgt/Zzh6svbZdg3xEv0EU6PuB pdpPnY18LKYi8ACJaj43ZAIumFMRFBxmnaXrn0hoPabgRuL8jSWGsYRUs7WcKdxKXW9cLvKI4hZAi CWyRSpUYA==; Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhrGm-0005bE-VH for linux-arm-kernel@lists.infradead.org; Tue, 24 Jul 2018 06:58:05 +0000 Received: by mail-pf1-x444.google.com with SMTP id k19-v6so624015pfi.1 for <linux-arm-kernel@lists.infradead.org>; Mon, 23 Jul 2018 23:57:54 -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=qX+9ZLjYleTqiYTR/9AsWjndzTTMAgGfRwkaazjqic0=; b=Gjx6vY7EwRTKIrVY9J55sUQ34HHFlTe4FmpRadgter9yKeBuzeehOo01GQ1nzj7rQx IZZnGZQGxgEy+Nyb24xy4H0OmFFN3qMUY2CgDgPuxd6PM27plx5Ier0qF4WBMg74Y3nR 3/P+rUjJOAnix3Ymmp41EkC6E95ZGNa/i+SuY= 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=qX+9ZLjYleTqiYTR/9AsWjndzTTMAgGfRwkaazjqic0=; b=oAhy7whpLhTE6mnI4rLxyoawlWyOj6zMlMGWHFezwItufHiaoX++5QreMHt2IjW6eN n17kf8m5GItOQffdyp6iXhxm8+0ZHyTkeWxtHVU1FYU7s0oUtSk79D7mB3RjzSeyP9ia dw/Mjs1OupSiirvP60KN93aFUmQcxQqpaaM/qjaIPLtgRcT99BBRfJiYha7loPFNxcjI gRU4QaLf8wNMJI0I6J2PxGRA0nHzH2g+zuo34UwH0X2YQesMjGhCY1YJKi5yPHuaTTlx 4fNXHuP2SK8wvmHVD9L1Zq3H5+Ow79qbpzuLAE+d73zuBycHpfEo4/ahOflLgCQ7mELI bKHA== X-Gm-Message-State: AOUpUlF5F5C/66wAT1eB9RRLRtVynkYS1NMkYZNuLHiRibkBtPtXfplr yAevW3S4mSIGV89GpL2F5Nyb8g== X-Google-Smtp-Source: AAOMgpcwmDaP8xLQtGFckK/ZRQpKdN3DRNQMvSg+7bcNGgWpnLXaKTUCf/2WglReEBbUlrEb8a4cew== X-Received: by 2002:a63:f756:: with SMTP id f22-v6mr14890781pgk.289.1532415472243; Mon, 23 Jul 2018 23:57:52 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id u185-v6sm16092326pfu.134.2018.07.23.23.57.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jul 2018 23:57:51 -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 v12 05/16] kexec_file: kexec_walk_memblock() only walks a dedicated region at kdump Date: Tue, 24 Jul 2018 15:57:48 +0900 Message-Id: <20180724065759.19186-6-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180724065759.19186-1-takahiro.akashi@linaro.org> References: <20180724065759.19186-1-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180724_025805_039726_D536792D X-CRM114-Status: GOOD ( 14.62 ) 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 |
Series |
arm64: kexec: add kexec_file_load() support
|
expand
|
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c index 2f0691b0f8ad..bb23f9280a7a 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 memblock 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(+)