From patchwork Wed Apr 25 06:26:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 134236 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp472771lji; Tue, 24 Apr 2018 23:29:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx499dDLZIQall5TvO32J+ahxVKnkhH1Ioh67tCMVP+Df8pLG1Q4AnCzSN7TQh7KUwaa2/omt X-Received: by 10.101.75.74 with SMTP id k10mr20948667pgt.227.1524637778945; Tue, 24 Apr 2018 23:29:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524637778; cv=none; d=google.com; s=arc-20160816; b=pZBCFifGb0gY3hboXIzt1aeVNN7CT8gCNrIXZTyb9m8tOey4T6FN2AYihP0gQm7LRt TRWvm/W4OYn2pLS2kFITr4SzGaEgwTAMmjJfFng4ISW/ZLz8gRG7/58T4KxZgSZi34VS +1fwXOr6AAqQAXTTQ836yg/Fh0CbxuzrR2A3FeqKmqiuoEDTHO5/fF6C6C13yLbuyw2s 8G7toBuNXgnZ9oYCfHWSXH6I9Lgu1W3vW/J3NgNLSvoO1UWddpio4jfZKLyE6wqZro81 f0xxi/tqEYSUTpHDn0mkA748ggv0X8XH8edz9ZiG+5WYCWOYv0GODOTJte+Fi1sxR6vh ruyw== 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=s3RbGgzhDsKg1yhv4ME5GjDWSW9jqtpalELaALG50C8=; b=GVHlm42CLs4bYqcL1ZfmsyDj0T/f9x5Cs5lRU0U746KhOC2GmWYDpRcVkSpUhp2C9W moQBOYgn84h1qCZRC2K3RbGnPgCkGofRHjf3Jmv8qcU+V7gofcGNsgBYLgNnMaG9uwVx gmwR68qb5m7lRy71MouMlW4o7m5Y9l13SGlL9vlWHxszWRWoOI7s9uuXfHv8/FJankD0 BgtycyvswU79qzNtjM91sDGVMXU3ge/oSJOIvitpF3E/wdOL6d2EATmohLoJBQGv5doW jNGvmrvzcBpO1UYn9Go/z0glRuAr0lbrcdgdUpnU+2JybkK4HjxXqB72AQ4KA+YRIkrH j7wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AbTMgnNy; 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 s10si13381616pge.41.2018.04.24.23.29.38; Tue, 24 Apr 2018 23:29:38 -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=AbTMgnNy; 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 S1751651AbeDYG3g (ORCPT + 29 others); Wed, 25 Apr 2018 02:29:36 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36905 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751320AbeDYG04 (ORCPT ); Wed, 25 Apr 2018 02:26:56 -0400 Received: by mail-pf0-f193.google.com with SMTP id p6so14307764pfn.4 for ; Tue, 24 Apr 2018 23:26:56 -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=s3RbGgzhDsKg1yhv4ME5GjDWSW9jqtpalELaALG50C8=; b=AbTMgnNyH7+y/nU/ztK4dGx1cJqczXFzGJhxlTMvnN9ehdJK2CJZaKEm4EOYLbqedP zeV7gKAC+10JXFna2HIgx/OuFUOlQ/k66UXT2u3wDfPt0/cchDeuis1Lxg/PhaU78JfL dtNKm8B4Vbzg9BAt4Gv5LMM9yeiPsGtGGVca8= 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=s3RbGgzhDsKg1yhv4ME5GjDWSW9jqtpalELaALG50C8=; b=rpB780aPLaYefCsZc+LgMF/T2bw1JqTCSTzRBRJwrNg/uOZXGnemKtbbN8jrnlmr/p aFzniE7JPW8SZ3LHcazywMEu2J/SMGegHGdbOZRC0TaGneOyN9kYNJuZB9C5QcsP/zyl mPlxRyrDqBZkrTfKW0ECxWHY2pDYphRFFDijYB9AoRSQJxDi1o2Hxs7sl7dkdN4e7phN GD3ttdib7wJB2KS2DCTOQ2pY4grHF3AKYJQj/myste7t0ki1Y5luc9m6NBSzJa+EtSeI hBZzQJZUINDLaGm3iR1nbEMpbel+LLs2rP418PbXrFud21txJBBYkwRt2w1f82B9q2A3 CC2w== X-Gm-Message-State: ALQs6tDwWARTE/9A2n3yZW0Z+gCPeZHwqd4qvd8vdAZ/FQN+wqWNXsqy 7C8LNh5Txca3fKaGC2dBS9KzcQ== X-Received: by 2002:a17:902:82ca:: with SMTP id u10-v6mr5170278plz.160.1524637616423; Tue, 24 Apr 2018 23:26:56 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id t1sm28193765pgs.47.2018.04.24.23.26.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 23:26:55 -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 Cc: 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 v9 02/11] kexec_file: make kexec_image_post_load_cleanup_default() global Date: Wed, 25 Apr 2018 15:26:20 +0900 Message-Id: <20180425062629.29404-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425062629.29404-1-takahiro.akashi@linaro.org> References: <20180425062629.29404-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 Cc: 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.17.0 Acked-by: Dave Young 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 75d8e7cf040e..eef89d9b1f03 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;