From patchwork Wed Aug 1 07:58:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 10551797 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 5B286157D for ; Wed, 1 Aug 2018 08:00:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D9572AD03 for ; Wed, 1 Aug 2018 08:00:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4BB4D2AE4D; Wed, 1 Aug 2018 08:00:17 +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 E10F42AFA4 for ; Wed, 1 Aug 2018 08:00:16 +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=2lpyGd3njXQWO6NaEzM8LSzZb/0StDiNmH2jVwLsPOs=; b=dftFNxRqaVShrmt4MY/aPMIdgM /KEh9Cg4szv6kkupBIH7c7U/9i1BCzp1xe1QlUETnm8S5CW4qjCLehJhuEST6sokJdjVeNH0A1nmS EYVM21FLwaSGhRP5K5AGUEDswDkrPhyiw7ICR5XQP09cAUIl4HQW+EHTG+YNm0bgYbEdt3BtC9Zo8 yQx5/qVop42NkBpdnOHM8/2JYpTwtHgIRZZugbmPGyrabp8npn6PVgJdm8/1kWL4/XBs066bKm6BZ oihgNNPReEuKD6tsB5ImI/lou1I8YqNOUDfqg0iQHVWqP3GmebgYx8+qHmdqaX7pXMK+vYWcD5HpJ XuZsO/7g==; 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 1fkm3H-0003M8-Eo; Wed, 01 Aug 2018 08:00:11 +0000 Received: from mail-pl0-x22a.google.com ([2607:f8b0:400e:c01::22a]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkm2y-0002ex-1b for linux-arm-kernel@lists.infradead.org; Wed, 01 Aug 2018 07:59:54 +0000 Received: by mail-pl0-x22a.google.com with SMTP id d5-v6so2870240pll.4 for ; Wed, 01 Aug 2018 00:59:41 -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=DIzV6aso3cBbRwIPS8DL9LqPtHHeWZam6wO8uhZIhTo=; b=Uv6f8cOuilyrUsJMwLSlGkRsQmaIQ1ADH2CRLyaqS1MpDoCDg9EIg/Yyi8CKwZN531 Pg27JoHeDbf/rAIG+ng9/UAhO78LOa0MbUIO9GrNUNlODrSUcS5Q48gdezcN/n5aBrfv +/r0CXt9deoc5LYcWq5DhwNbdofl3xb/8IY+s= 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=DIzV6aso3cBbRwIPS8DL9LqPtHHeWZam6wO8uhZIhTo=; b=PLfNU8scvq/iJ28JLtYv+YJ5XxkD/9OGZ/xc2XF38HV+L9ikj01+xTbeg5yHNKx+gm UnGBR8V736zCwREhmr5UvN8KJjskZ6VvYCUGqO2o2a/9Wfrb1mkg/nluQbMSSXLhC3uN TC7sFOELJoAYGXPt6iqS/s5KWb3RQK05za48Rtb3nYtuwgpEptWL5FtqtcvlXJoUALRy 3EoO65IEv3svfORqAQmVcfHkZM29c4m1F4hOy9s1+SVHfak4UScmicWLKTdpTREfVQM7 JHR1uaGwtW5cYSOkaMDU7c4HNOqwM7t9503xcO7crwbSYlXYrqFxcbTyIvW0Jj3yz2uC St/A== X-Gm-Message-State: AOUpUlGGSTNvZX8Q+pFeT2swW8ZfJur5p9IakuSa5R7FPfTZ7/38m873 5XmwKhdFBEZ8dRKqZh3/5zBHRg== X-Google-Smtp-Source: AAOMgpdCoqC3WH5zP0l3/qAhWJAeT4udXTWZ1D4XtyoLYSRRcAjuK0Li0jr7sPr18Th8I29AYe3RUg== X-Received: by 2002:a17:902:5617:: with SMTP id h23-v6mr23475174pli.324.1533110381241; Wed, 01 Aug 2018 00:59:41 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id r11-v6sm23617948pgn.62.2018.08.01.00.59.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Aug 2018 00:59:40 -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 v13 02/16] kexec_file: make kexec_image_post_load_cleanup_default() global Date: Wed, 1 Aug 2018 16:58:06 +0900 Message-Id: <20180801075820.3753-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801075820.3753-1-takahiro.akashi@linaro.org> References: <20180801075820.3753-1-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180801_005952_390669_FDAA744C X-CRM114-Status: GOOD ( 12.60 ) 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 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;