From patchwork Thu Nov 15 05:52:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 10683525 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 CC84913B5 for ; Thu, 15 Nov 2018 05:53:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B80282C13A for ; Thu, 15 Nov 2018 05:53:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA4302C13D; Thu, 15 Nov 2018 05:53:05 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 497202C13A for ; Thu, 15 Nov 2018 05:53:05 +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=NS+ZCw6fbKekhvvOH4mAY4YQt2roqGuLTvFP5jXrwhE=; b=L7xyhPJzFnxWFr EvrutE2yg4FY1xao6p70BZRw/2EEd/3Wo4fpGxdSf9OPH5ot3mIjrQUNa6Mzke6OIhQqOBx7edCOt 9nT6GSzWw9Uw00qG3IdSzKTTqe77jEXLD35F9KJ7AuL9VvawgK4OukizSvfGDTR6kleWnYp2KVdVT PqSs4xJ2oNkHgZzg4B8KjJ4yQ4Ri+2g3cGng6+2RRT69bV1ovqmiyRsD6iEBEtuEoCEx9DtZAUhBq I3v0bAZqCLCaADNAkdLWusB2OAXBGscVerrrcKs5r/Zof77kfW24E25omZ+smOwly3RA1JxPhmeOk NX434yKfrfbpic/uKfIQ==; 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 1gNAaL-00061P-P2; Thu, 15 Nov 2018 05:53:01 +0000 Received: from mail-yw1-xc43.google.com ([2607:f8b0:4864:20::c43]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNAZt-0005Dr-8I for linux-arm-kernel@lists.infradead.org; Thu, 15 Nov 2018 05:52:34 +0000 Received: by mail-yw1-xc43.google.com with SMTP id k6-v6so8235652ywa.11 for ; Wed, 14 Nov 2018 21:52:22 -0800 (PST) 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=h11K0AmVrf07I+hu2nU8xySmOw+R/bUvf0+LW2Q+26k=; b=Byi9Ido6WYyA6ak3oOwmTntFN6ZvPrWq+jnerI2g4TBQeE/AuJ9l5Xgc5LS+yqFM/G cLqhfQmJrhw/n4hQwHh529vaPJWOjbTfW9xLSnpUzBEETZs1YUvjjGk1aQsxuVibqHrb vk2e/tcv6SvR7BsOGP2ME0lvkO0W/eiCtsD3k= 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=h11K0AmVrf07I+hu2nU8xySmOw+R/bUvf0+LW2Q+26k=; b=g69bNf+Xrqa0UtDgZ2sLuF964uIi//AGSZMu/shZdcsigBhB9W7PexKf5Ee8Q0LXBK xRfFefxdqFL3QoWjaXbB5cYRMfUNgDo/O7yVCKCxkrAAZBKz/SWE3jcxU7xPlKKvpKrA y8MLiKllxp7AHxPF9eit0i31WKbniGDym+diXfc8SgGMP1Nc8XLGmfYq7GBDw3G9fYbG X4+HDLtOC9o/CY/WC/A44tRuB05MEyfxFi5kJ9lte+1vTG+upYVEnOoqenTt2BXU7/21 SUmmVCCoUu8GcIA8UmxqBn4gzb/b1YM4YRYP+/O22W0oJ+/abT+YJquqGh09cUHP9yb2 vzqw== X-Gm-Message-State: AGRZ1gIkoWy1EqoC0aPs42WnK/Z4qLrsrahRbfWhyTs1UBLsYtkRV/WN ou6g01XplczfTe4dUdEubUB+UQ== X-Google-Smtp-Source: AJdET5dpmFtPJo2svldfEWKgza+frX4ezfcIY+u4OwC/s2LZ63sRh11skB0kFgfpgIYZ0IEqd8jVLw== X-Received: by 2002:a81:4bc1:: with SMTP id y184mr248875ywa.365.1542261142042; Wed, 14 Nov 2018 21:52:22 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id b186-v6sm9764855ywe.27.2018.11.14.21.52.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 21:52:21 -0800 (PST) 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 v16 02/16] kexec_file: make kexec_image_post_load_cleanup_default() global Date: Thu, 15 Nov 2018 14:52:41 +0900 Message-Id: <20181115055254.2812-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181115055254.2812-1-takahiro.akashi@linaro.org> References: <20181115055254.2812-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-20181114_215233_295287_33D812C8 X-CRM114-Status: GOOD ( 12.18 ) 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 35cf0ad29718..9ce6672f4fa3 100644 --- a/kernel/kexec_file.c +++ b/kernel/kexec_file.c @@ -76,7 +76,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;