From patchwork Fri Sep 28 06:48:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 147768 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp370919lji; Thu, 27 Sep 2018 23:48:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV62FItWJjHC8dWtq6No4qCiwecLn2X+l+IBhE/VQojj8Gr2gwVlFIyuy1TV6BPNqVT5OJqho X-Received: by 2002:a63:7506:: with SMTP id q6-v6mr4248860pgc.137.1538117287855; Thu, 27 Sep 2018 23:48:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538117287; cv=none; d=google.com; s=arc-20160816; b=oCuzZugwfkoL9Aog1HHotEzIuOaeSW2lFZDzNpf5ofkim5dmISE5P13R3GMZ9HXn/g MSGia96L+Y6NxD8LhDKbxfzLm4fUCxsi/Eq9HQ9bB6Q6ga1biHHhhJrig1Sir40l9ooU QWfeSkmM5S5YweZT5SKuBDevGx9jINbUI2jPHeMu+TTIa6HpnJ7j5tUB2kAQZNp4nHU7 IszY8kCSKNeM1k6m6DovtElXQRoOEAeF2D486giv9iq5NAlpUaVM3aF6p+/ZHrGV2REf Gnijar51EPM192LC238t+OvrCklkuZMaTVorxKkLKN98PSVfZ+R0CgcIVxKbWKJZXjr/ V4oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SFnjB8OZwPCkN/cF+2XtrYPYnwjUqNvYjNJ7CAWxc5o=; b=k9mXLgM+899McJV6vTjooV7saJJuf24oOR25uqrjt3Fr5JC265o7g4p7bN7JHQN6sF tR690gyYi0ofzK/zM7waanByFwDWdSCdM2onBGEk+bmvpfcm9Tfe2V579TPEbzRlWmxD rbZy3ly9sI/pgPVc6oYQSB04duGlzipZ6ySbiRJcTHcUc6aG8ewj7LqCr7/wu78U8lgG Mi1W6sukoMTdExIRPI3rllTW44Xoe1uAXrKqk4QVlbNFfOHaL2/Tefa5R2I95BbkZPni E473QoLqi1kkpi1qACkqDV5Eyc6YwE+un7HTBfXno5PeXduvs1CmVRk+9/7r00mR0b8E SMGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NOu5gWVY; 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 q197-v6si3843544pgq.526.2018.09.27.23.48.07; Thu, 27 Sep 2018 23:48:07 -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=NOu5gWVY; 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 S1728986AbeI1NKT (ORCPT + 32 others); Fri, 28 Sep 2018 09:10:19 -0400 Received: from mail-pg1-f173.google.com ([209.85.215.173]:42593 "EHLO mail-pg1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726473AbeI1NKT (ORCPT ); Fri, 28 Sep 2018 09:10:19 -0400 Received: by mail-pg1-f173.google.com with SMTP id i4-v6so3116249pgq.9 for ; Thu, 27 Sep 2018 23:48:05 -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 :mime-version:content-transfer-encoding; bh=SFnjB8OZwPCkN/cF+2XtrYPYnwjUqNvYjNJ7CAWxc5o=; b=NOu5gWVY0xlMpxIclXnxjYR6bEPT29dU0ZklbtpXSY5Ypq8qCjjvQMi2SgJVNEJjEP YjEWlJKbjI/9XcoxOVGYN5Q1V5+A2MHBdjMa4vVEreAt9quWR2PwMrjes2N0vi6SeW66 3wKxN/9fSi1KQdhlDw7G7H7TV99dhfTxGOYoQ= 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=SFnjB8OZwPCkN/cF+2XtrYPYnwjUqNvYjNJ7CAWxc5o=; b=CTL/ijlo/RkZY0JqLWhgAAbLSK+IwWNCcES6+edTCpjS6eaVEyEWlLZBW/VHfN/z2o Kw0+H/O+w+R+8u3aS3g7MDvwdJ5t2KYtgtnSjUeulML4zX6ga8DtRf/zNk+DQ4XwuFKr 8jhkrEEr8QiXJooLgSCVYBKOIBvL305uP812maGviDPfc7lZI9HJ+xg9xFcgwxwDMq24 NcEi+txtJddS4UA0OjJ7SAlaUTqdSv28Cqr8LMsRl0oUjpdsLTL5d7M1mP3TwxjbZbP3 NH7dcwzSLRtJOWW7AEQo4uUzVMW2pCk/PgeUhlZWTn5lXeThNQu7PhtZwdcK2vfaoHWH BwmQ== X-Gm-Message-State: ABuFfojfu0Q4c+g7yFToYnsWBKoBrIUvtF1B208nKLvrSmPiQqaQT8IC NtcWHinmCLQ2QpMUSMDgK4Ngkw== X-Received: by 2002:aa7:8895:: with SMTP id l21-v6mr2833137pfo.74.1538117284863; Thu, 27 Sep 2018 23:48:04 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id a1-v6sm9770651pfc.28.2018.09.27.23.48.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 23:48:03 -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 v15 02/16] kexec_file: make kexec_image_post_load_cleanup_default() global Date: Fri, 28 Sep 2018 15:48:27 +0900 Message-Id: <20180928064841.14117-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180928064841.14117-1-takahiro.akashi@linaro.org> References: <20180928064841.14117-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 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.19.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;