From patchwork Wed Jul 11 07:41:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 10519071 Return-Path: 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 5E0A26028E for ; Wed, 11 Jul 2018 07:56:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FDB428E06 for ; Wed, 11 Jul 2018 07:56:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43A4C28E6C; Wed, 11 Jul 2018 07:56:11 +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 DFEA528E06 for ; Wed, 11 Jul 2018 07:56:10 +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=PF91lVUoyE9JExgAtYPzEgsB6vclADjMX56D1oeudi0=; b=FU9vsRYdc2RyQlRNWrAOez4NKP 135njW49n3l8WsHIFVkcAC2I7WFy2ETGXX6rNrhmvQG5PsVFCT20OeX2oOLgctKzODSCCS1zy2vEy zzr1+NAvPkKOWIJDNr8PC4d2B96jKRFiTEmFFjN4lX6oNTqHwhmxbBcfCLGXEYHHV0i111vInTSVc 2nE543Qxt2e+o3HLCaOeEmM0/8npY3a7eY0YjuWFWarSgq6bbTboQPSzrcrnBobjr8nHnc+2wJG+N +Ju7ce9uEC7PhzoZi9zWGO0q0UJZpwrWk25YBn5DNLaswYoqSFunvEz1O4nkfTJocARBdyg6utids 0Lwyed9Q==; 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 1fd9yr-0005fi-R9; Wed, 11 Jul 2018 07:56:09 +0000 Received: from mail-pf0-x236.google.com ([2607:f8b0:400e:c00::236]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fd9ks-0003v1-IS for linux-arm-kernel@lists.infradead.org; Wed, 11 Jul 2018 07:41:45 +0000 Received: by mail-pf0-x236.google.com with SMTP id u16-v6so17858166pfh.3 for ; Wed, 11 Jul 2018 00:41:32 -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=+CuyitM4U+PQMgPnwkmGxBBf2FkG58yPNy8pZ5fB6pc=; b=HRWt8TQ3Cl6oR0kcTXEgGxozpWcG8baNcKuE3hUjeWekTYbX/K612I9/00RKjjn/nt w48krRd3k5N/YCrjzCEWqZREhCx/lVfmhLWttOU9Ot0b/XAXa7Ji7lVc7DsPWeX/7XA1 zJrrsE5i6W+57sRp/SRgUED9kq1NfsPaMIu8U= 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=+CuyitM4U+PQMgPnwkmGxBBf2FkG58yPNy8pZ5fB6pc=; b=mwEmHqX0Sf9go2h3kN81sll2Bzwd0yDVNW6jlHZKuaDzqWZy2r3Qz1QS/rn8irZwzw N1Cc/Ht8VuRvtO6lBICIZZdffa5YPCemJQaEQ7J+r8jegbUqho1bQrfjqBC57sZgX9X/ mq6WxXuM0msS7xhDx6vRkpe3kf8Gm/1z1AXo446G91iLhgYXfalZVhHzCABJBY7+rTgc yEOpL4b0PNxinjAA/z6DSVzY5Ps7SugUrvULBeAEDlhe6Lt7BHMos8RXydTBLo4MVRz7 Mi8l/JL+gnkvqr6jONIOmfzCeNhgS6zeKGJIdsgZoTEH6qS0u1KvvpHAOOKkLhWfAOZs nAzg== X-Gm-Message-State: APt69E1KEkw18WDOE2IJaI/+uHmzmudKYRmG3iaqVmJupkBXCpSypR5C 0RhNyULawwRIPeKI78gr+9Praw== X-Google-Smtp-Source: AAOMgpcVJh+R2IcdiYaPapIbulJWPGyUFLzPCpxwQCf+sotDDzx0HwKJD3jzNRcJYIR1xiCCqwQZIw== X-Received: by 2002:a63:4e5f:: with SMTP id o31-v6mr23988056pgl.256.1531294891841; Wed, 11 Jul 2018 00:41:31 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id a191-v6sm4362266pge.45.2018.07.11.00.41.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 00:41:31 -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 Subject: [PATCH v11 02/15] kexec_file: make kexec_image_post_load_cleanup_default() global Date: Wed, 11 Jul 2018 16:41:50 +0900 Message-Id: <20180711074203.3019-3-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_004142_874378_89351AAF X-CRM114-Status: GOOD ( 12.14 ) 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, AKASHI Takahiro , james.morse@arm.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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;