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: 143248 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp548652ljj; Wed, 1 Aug 2018 00:59:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdzDH6mVYXMh21liL55eNY5/ltsgo9BCkeYVtsxypx31vB+xDG4yPidkljnUBRGBh0Gzb7M X-Received: by 2002:a17:902:4201:: with SMTP id g1-v6mr15901113pld.203.1533110384561; Wed, 01 Aug 2018 00:59:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533110384; cv=none; d=google.com; s=arc-20160816; b=t5/p26QJ8IGnj6kI6LWFbOeBsOBI2z4pHIYZp4GPwqVUQXtFL7WedXqbTHvjg4gZEs 9JQFlo3PCBxrf4wk0bOyWN1ITziTl60fP2kMSfHD35de20CxiPXYvQCkDA6xi7LO+p8H sq0q3NeVSWmhZYYeJ14Kh7ilfutK5MX40E+YLEUukb58/CmjJYuTzjFIO2P83jIIjvIB 2hwiL8HCuEeMfFUHRudHK5zoq4faCG4dVTQEuzesHaCQntK6qYDdNyc9KAfjZTHHyDAs L+JJob/zA37YFtqEKptMKvKosVBn/Umu42fEskkLx85OTCcfKze+jQEDyLyw4TPsd9I+ QBug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=DIzV6aso3cBbRwIPS8DL9LqPtHHeWZam6wO8uhZIhTo=; b=s2mO4pdx9Fk/KSu/xK/tR71NtdinLFupWFEZ17rN65dAdsyQeSiZDT75T+66BN63xx Ig5PObo7Q3aMspmNxAkfszRYDk4DLfjEGkDX30BvTxFFtK911wY0ZyxHzKLzqMe++lAq CZjPkT+MAWs/tIKKhxKcd7XzEWcw0xMIIpQy1v3K7+lh3ZNnyiAGIBUU2ZGpoRa/OpzI 7bmbUQWafn7LUJCtJqPr/W6as4Gbuc27OEYjvr/RaFcleGlIT/ZrJtWm2oFzIakQu/ee cRr9b/SwKlZXUqm1CyD81p3OfFvkFrQMwkOjReI51o9vXjq7cDqHsxEzzEnQDaCNNCzy /lvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Uv6f8cOu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b34-v6si3314639plc.170.2018.08.01.00.59.44; Wed, 01 Aug 2018 00:59:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Uv6f8cOu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387803AbeHAJoH (ORCPT + 31 others); Wed, 1 Aug 2018 05:44:07 -0400 Received: from mail-pl0-f42.google.com ([209.85.160.42]:39700 "EHLO mail-pl0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387654AbeHAJoH (ORCPT ); Wed, 1 Aug 2018 05:44:07 -0400 Received: by mail-pl0-f42.google.com with SMTP id m1-v6so8398240plt.6 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=bDeYDD3TJZR098e7yKlaJyJYP2Z9zhjeeoyj9Ei32nDyyzhChuJdyL5DkQcvn0Q40L XKfdg0Pgud2+hOyv/U+fEMSTDwXfHJy37p5+uYfvYHJGS+6uk86qY2/3zTiXk/yw5Jjd 2DDcqkN6D0/KGn4dSvI3xu3bDKhtS4/qpAUgK268fTVtn03orp6IWsQVBE4pnzeWtj50 oLCgeP5BtIzydAg1oCNtJg9VsG4GaJDkyBwTfDBFVh03CqW9JQU18waXKH8IZydYbBqK JxZsfkdk+j3yJrmLgvLrIAizjCj5U4Khns5mQwQEBhvOIGwOxnM1Nnnl1x5xtOOhsWd3 fK2A== X-Gm-Message-State: AOUpUlGL/TEeVn//g0PXjJWFYx6HFXIfTYqrrGv3eoC2GuYDGow5Cn2M MWQOFnftR/8TBgV1fRBJe2Ng9g== 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 Cc: prudo@linux.ibm.com, ard.biesheuvel@linaro.org, james.morse@arm.com, bhsharma@redhat.com, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, AKASHI Takahiro 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.18.0 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;