From patchwork Tue Jul 24 06:57:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 10541351 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 37C2514BC for ; Tue, 24 Jul 2018 06:58:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2373F2873D for ; Tue, 24 Jul 2018 06:58:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16B7328740; Tue, 24 Jul 2018 06:58:16 +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 B19D32873D for ; Tue, 24 Jul 2018 06:58:15 +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=C6GJ9Kj94P+azyvpW6Uva7b6SY tumxcLatf33P4onik9Kik6v7MqSBmi6hKjYEmT3/2TAQrL1+EUdEQeP9T0m2KPEXs66hZQ0nk8fNt 6jhqld2WQNTfWdu73aWaS32O8H9Xy07+aHe+BTMDZSAv0ej9D32J/npmDTKHHITmqfglArDJAMtoo QsFvt+Qnj1LE0h5d0aPsV48ZGnjvxcuBmPWU+r5anKoHett8PQS38hogBZwztM0RtZSqprWdlXpgY Mqus4o5/ARC4NjHjfc4yHzUt3ztdMV/4vJc/78TKXewSdPfZtqYH5ej2CSvmVlLg+pohITmRg8GSd jrhHAl5Q==; 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 1fhrGn-0001oS-Uk; Tue, 24 Jul 2018 06:58:05 +0000 Received: from mail-pl0-x229.google.com ([2607:f8b0:400e:c01::229]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhrGF-0000wl-CJ for linux-arm-kernel@lists.infradead.org; Tue, 24 Jul 2018 06:57:36 +0000 Received: by mail-pl0-x229.google.com with SMTP id s17-v6so1326467plp.7 for ; Mon, 23 Jul 2018 23:57:21 -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=cxgjVzY3MX0woauM2mQ0DdwelCWnuhJ3LX8wat27L/s2w/g2I5byL+3gKHF6y9iFVA HSpNiUSQsbulmADcHfeQ3KBclHJadIajI1bNqZwznx3JvdbU0PnhNY6dpzou+JJTZLpa fFvq3a6BiD/aBwwtqo4dCjGCLHdqEb59HY8pY= 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=kQznQND0mwnP4N1gp1W7WLIDAkgthlCKwo/0pU6cNrorSOnnXgrbLcCNTg9O/U6ZAN JHpu+viPmsc2VFmUuCrDAMvmd15NY0f6t7XLO1eHKVriE2uBAK6D4wApyBbO4LL3l/j9 R3l8vACi4cSGZ9KVOTJGOzC7QUHjsRdohuDrLvUcBqY+qrxSXwICNYqr9OvN97NoZJD2 O81Tj2wuxYPq05NHv/kub8/pAXu6MaSBDTfrK9t6FOt4ymEcUQCUsFiLXZZ03jXAzu5k Y8CgKFG6BAfEIELK0fS9vdi5+LXw/MygzWYFFanH8bboM2w81TWM4E0mk1eqmQFxu4ga Lhsw== X-Gm-Message-State: AOUpUlFqQgOZ/Vk5iBfV7lASVZ2ftPgMtq4UvUVEifCvGLx6td3nlq0O 7odu1KubxT9TjB8AV8f/pfthWA== X-Google-Smtp-Source: AAOMgpccEHK0X4LG2sCssROyMS3DTku3sl+Su6+x8gDwvPTU9oeupQxycIsl3XZpnapXnzG5Z/MvIw== X-Received: by 2002:a17:902:8f96:: with SMTP id z22-v6mr15898099plo.190.1532415440585; Mon, 23 Jul 2018 23:57:20 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id f126-v6sm15721472pgc.88.2018.07.23.23.57.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jul 2018 23:57:20 -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 v12 02/16] kexec_file: make kexec_image_post_load_cleanup_default() global Date: Tue, 24 Jul 2018 15:57:45 +0900 Message-Id: <20180724065759.19186-3-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-20180723_235731_948810_49030F4F X-CRM114-Status: GOOD ( 12.67 ) 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;