From patchwork Fri Sep 7 07:56:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 10591843 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 4205B112B for ; Fri, 7 Sep 2018 08:07:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 344B92AA89 for ; Fri, 7 Sep 2018 08:07:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 288EF2AD5B; Fri, 7 Sep 2018 08:07:27 +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 67AFF2AA89 for ; Fri, 7 Sep 2018 08:07:26 +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=Ht8PEnVZitit1RYDlIly8aU578 koeQdYx9C27ErgoBHQI8HkgWZyASu4GMmwyfZm1XkEgiynAzhu6Y3chUu3SlZFJs/qZfcJcdzII0C w0IeIL+90KBLCunnmE7bfEn/iyXX9csC7G6n/Gzc2ynYnoenZuIEHW44gY4CcJGuQprdQprX11Bf2 1+He5GuaejEn9Nx1mKyRPjAuJl0uxcAAvsMSR1uZierH3I7gONt0/eUJPTSsly7faBvrOTta0iJDS y4ZMOBX/M3MZv7Tq9Sd0uzxt7UG7/Z63Jd1MnjQpkltpgl8hRCNAeYpEi89swvWI+4VG3C7Glx/mU njYZGpzg==; 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 1fyBlH-00043R-DF; Fri, 07 Sep 2018 08:05:03 +0000 Received: from mail-pg1-f172.google.com ([209.85.215.172]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fyBh3-0000ud-UI for linux-arm-kernel@lists.infradead.org; Fri, 07 Sep 2018 08:00:48 +0000 Received: by mail-pg1-f172.google.com with SMTP id 2-v6so6603172pgo.4 for ; Fri, 07 Sep 2018 00:58:30 -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=QT7DAb1VW3TTiSKno3oN+Ds4oOesrprs8hlPrzWly0uu8ex49FZI44yQkoCeR0AXlO rybOkj+45dEks0DMV0i9PMQOIkw6nwa/FjlkvSv4OVSPeAJXQMgs3oMmfIxbSwMei4TJ ARQiZQOCdCx9TdJVynK7qupICR+kH/Nwc/Ic8= 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=qDFVHwb++iBv1V5C3NOZwAkIPGDyDc/qYhzecdmCWwGbmABgMcYvLKmj225myPHlsw SSAFNtcpSyviNBVgRzltigcPasNu+SYL8O3ViwaiXIdTUQ7bJhU/Bc5Mh4nI/LTqKExb ekLUwiwnpo8D9tHr3S217LRZFQHI5F2H//YLY4sjBeemJt4HS8CalXjkab2ndlCsp1s7 sOYKeFZ4BaFKIOQcnyRZXujtsz/TO27MOm2iSW96UO6UHZwiNNftPmqIU6XOXO4f76br mGvRfglta5IjgTfPRjOCYO59DVLQk6kSUJR8NuA6kIXGEUWbg7trOxkB07FWJuF0XEFr crqQ== X-Gm-Message-State: APzg51B2vbEpFZ4uN4vc4/ZdXIZ3Ino198I42Dcao6IxnJTREPJlmfpZ IzG/Qa+ZOSKV+a22+Mjf+LxWhg== X-Google-Smtp-Source: ANB0VdZKCSZYPTHErK18CnoV+IImlHiXf3hiM7VeJ1mpWoKXKrCERdaZAtds77TdKqODX62E2tFSiA== X-Received: by 2002:a63:555c:: with SMTP id f28-v6mr6968922pgm.37.1536307050029; Fri, 07 Sep 2018 00:57:30 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id q26-v6sm12593771pfj.127.2018.09.07.00.57.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 00:57:29 -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 v14 02/16] kexec_file: make kexec_image_post_load_cleanup_default() global Date: Fri, 7 Sep 2018 16:56:39 +0900 Message-Id: <20180907075653.4696-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180907075653.4696-1-takahiro.akashi@linaro.org> References: <20180907075653.4696-1-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180907_010042_019577_37DDE346 X-CRM114-Status: GOOD ( 12.25 ) 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;