From patchwork Fri Sep 28 06:48:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 10619051 Return-Path: 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 E365C15A6 for ; Fri, 28 Sep 2018 06:56:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5DE72AEAD for ; Fri, 28 Sep 2018 06:56:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C91D72AF28; Fri, 28 Sep 2018 06:56:56 +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 041B52AEAD for ; Fri, 28 Sep 2018 06:56:52 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=wyy4GUy6TdCN+AxjpRVKBQdlAa1zP6iusUVwKZ0iSJ8=; b=dClALSrez3r2/I vd3BNfUstwJ3g5AYbvQXqlytg5ss7hwidtw0WqdbwiLlwPqUYP+8I6k+jEGE7H4lamTrwe+Tfdftc 1oDJ1+6bvY/V+Hn5lct5CWh14FKtmrHneVPLyvoie/RRXqGkNs61322PyXOlHdzX1hbDZ4jT/+8go QxDnNDFr4aG0xttIlH64EC3Ak4xO0ntCns3OEKTtjV2e28yL1BDNDCikur6cq/DHOkSMYSbcnJHSX 2AaS3bpbXf9wMKOpedxCxJzm1SJ/IwioWdscvaT3MQz50eEomVL/Te3AZDLKbGzrvrSOVfae+LVni OXQjuu3w5JeXjYkgW8mw==; 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 1g5mhm-0002hf-AL; Fri, 28 Sep 2018 06:56:50 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5mZo-0004fB-KR for linux-arm-kernel@lists.infradead.org; Fri, 28 Sep 2018 06:48:42 +0000 Received: by mail-pg1-x52d.google.com with SMTP id r77-v6so3734418pgr.5 for ; Thu, 27 Sep 2018 23:48:05 -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 :mime-version:content-transfer-encoding; bh=SFnjB8OZwPCkN/cF+2XtrYPYnwjUqNvYjNJ7CAWxc5o=; b=NOu5gWVY0xlMpxIclXnxjYR6bEPT29dU0ZklbtpXSY5Ypq8qCjjvQMi2SgJVNEJjEP YjEWlJKbjI/9XcoxOVGYN5Q1V5+A2MHBdjMa4vVEreAt9quWR2PwMrjes2N0vi6SeW66 3wKxN/9fSi1KQdhlDw7G7H7TV99dhfTxGOYoQ= 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:mime-version:content-transfer-encoding; bh=SFnjB8OZwPCkN/cF+2XtrYPYnwjUqNvYjNJ7CAWxc5o=; b=OlkO/5Fho4tW5F12mzcpHSZFI9qnxC2DR7EBxyqvQgNPJOdKJPgORIkamaTHNc/KWM JXu/gdZbFvsj3b0V3kmOs+XFp13Iuqt9ysyDyw+6R8htS5/BeSthRCUP2UrVNilhcb4Z NuKQuaxncVTedVsrJ5zBXZ+NPrTC6ujLTJSlKZq1A7D0Is+ybn5OOjP8x614mnl3lSog TG142WrERrGITLaM4Etpghmvpvx3MyTW5MKZuniim7cHLQ6UNyZKlRb9ovuNRf5m0qxB NMRhP9L+IAqNWOhW/xkMKohoBQ/YogCpHniO/atohT4UqO3E6Najs6pCQjimlditeIZh YvlA== X-Gm-Message-State: ABuFfoi7jK70HztAMNi1rZmHpRKNAdiSiubydEpzHJfYWKrfryaPUeRr oDFFnOq957cUiBqGMM1THOoAcA== X-Google-Smtp-Source: ACcGV62wHSCQDbe2gCAXySgK0gjx4k7VnV1SvMRCcldq9IaLlCj1mgGONJsIMITlezJ/ohUP9yWyoA== X-Received: by 2002:aa7:8895:: with SMTP id l21-v6mr2833137pfo.74.1538117284863; Thu, 27 Sep 2018 23:48:04 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id a1-v6sm9770651pfc.28.2018.09.27.23.48.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 23:48:03 -0700 (PDT) From: AKASHI Takahiro 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 v15 02/16] kexec_file: make kexec_image_post_load_cleanup_default() global Date: Fri, 28 Sep 2018 15:48:27 +0900 Message-Id: <20180928064841.14117-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180928064841.14117-1-takahiro.akashi@linaro.org> References: <20180928064841.14117-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_234836_725039_E0227C02 X-CRM114-Status: GOOD ( 12.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ard.biesheuvel@linaro.org, bhsharma@redhat.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, prudo@linux.ibm.com, AKASHI Takahiro , james.morse@arm.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Change this function from static to global so that arm64 can implement its own arch_kimage_file_post_load_cleanup() later using kexec_image_post_load_cleanup_default(). Signed-off-by: AKASHI Takahiro Acked-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He --- include/linux/kexec.h | 1 + kernel/kexec_file.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 9e4e638fb505..49ab758f4d91 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@ -143,6 +143,7 @@ extern const struct kexec_file_ops * const kexec_file_loaders[]; int kexec_image_probe_default(struct kimage *image, void *buf, unsigned long buf_len); +int kexec_image_post_load_cleanup_default(struct kimage *image); /** * struct kexec_buf - parameters for finding a place for a buffer in memory diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c index c6a3b6851372..63c7ce1c0c3e 100644 --- a/kernel/kexec_file.c +++ b/kernel/kexec_file.c @@ -78,7 +78,7 @@ void * __weak arch_kexec_kernel_image_load(struct kimage *image) return kexec_image_load_default(image); } -static int kexec_image_post_load_cleanup_default(struct kimage *image) +int kexec_image_post_load_cleanup_default(struct kimage *image) { if (!image->fops || !image->fops->cleanup) return 0;