From patchwork Tue Jul 24 06:57:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 142688 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp6917971ljj; Mon, 23 Jul 2018 23:57:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcJkV1Lt+dwMuMGLTUVZCK/X9V80j+GX6dyyvCERmHRYl3HlEXD9AHgud5EAk1YQTbcVMCo X-Received: by 2002:a65:60cd:: with SMTP id r13-v6mr15139557pgv.232.1532415445136; Mon, 23 Jul 2018 23:57:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532415445; cv=none; d=google.com; s=arc-20160816; b=r+UvWxfuJddowl5L/PAM7cphI/qXrpgQhO2Io+ucDaEuC2Tb8oqoD3XHkHWfkKiZsD MY2YNov1Yxz2WRFbnE2liPSZVdcUu37y3+kmkCMXavj/S/quBoC4M9w0lHQD8iUhyro7 ykfV7o1NZ+8aF8a6IJ/ZwC+OecB1w9+V/civ+X6v4HFeJFrEkI4aMaBtHOquYTp2WqH1 sZcr2LDc27KIEmxF2U0qJEPxz5BF6U9tQEJ5O4n2cL6SK0TGKDRO3p7p+66rmIOlo6KN K9wQEz9c/OzMB29JpsqUkdLu9vrdcgGI0A21RtkFkl0ACtfaRpAL0aRHZol0Eb/2nrrA IH/w== 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=Auh1lslZ/YZvI1+WxKKHdp30wCJG6HcZVeqIAXwlu86p8tP98wn236KGM0XcVmKj5t BrE2Sq0tTWXTGf27HEGjRs3zX2z7EI+jWQ5+8sJK5vCLwrdxomMDEZ16rOWYKkaD19Li iUqgwrYo5E9MYCNuzQDJXFb9fGlyQvfC2WICL+EguuBrPppjC4XlJYrl3GOgsYszFJwh QRIAFy1nfctWdCrLHr6WYQwDtJTKHnvFT1maW+WpocgQQVg8keO8oVTB0HFfGwVguYIi 0ERhMeMM5FkRisRc5x0jcYd/c3gHajK1xH1R5dUYYIKDSixTVj+gm0OgtOoXOwTZIUq7 5qVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cxgjVzY3; 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 q16-v6si2181825pll.425.2018.07.23.23.57.24; Mon, 23 Jul 2018 23:57:25 -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=cxgjVzY3; 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 S2388430AbeGXICS (ORCPT + 31 others); Tue, 24 Jul 2018 04:02:18 -0400 Received: from mail-pl0-f46.google.com ([209.85.160.46]:45481 "EHLO mail-pl0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388245AbeGXICS (ORCPT ); Tue, 24 Jul 2018 04:02:18 -0400 Received: by mail-pl0-f46.google.com with SMTP id j8-v6so1264647pll.12 for ; Mon, 23 Jul 2018 23:57:20 -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=cxgjVzY3MX0woauM2mQ0DdwelCWnuhJ3LX8wat27L/s2w/g2I5byL+3gKHF6y9iFVA HSpNiUSQsbulmADcHfeQ3KBclHJadIajI1bNqZwznx3JvdbU0PnhNY6dpzou+JJTZLpa fFvq3a6BiD/aBwwtqo4dCjGCLHdqEb59HY8pY= 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=r3SLCsjVH2AMvpsY+Gih9vjqYk7za3Nv1kRyH0CWbwwOX0M6+3y/xHtFRpVji1+yL/ DcSKJEf89Pm+bZIAoTweurnnsG/RzbvnhD29Jx259fdckKdRNtp9pO1EAgndbjc87UWf xBQuHfqk2ulTTIl9ax7oTmkzLQ4vVU+Z/8vAXUAvYg5e+hv0o+QQ/ntB0dZm1rOaJiH2 Gb5sJkkqPmVFLUrGwXWgTBXMg8hFpJahgkYiinY4iWEoAJuYmsfOpwb0hm9ye8gNjAb6 pxxgaDKi6zURjxHZPBlXHajEm2kHGSC2oqmGtnl/wkMZR3xcf7cmjjAvSSiwM4BfYILd scHQ== X-Gm-Message-State: AOUpUlGdf94XQtcIHICoRzlLdaVMkug3Rv8m6s/1BL9zjhC9eBSEiC5a AgAclTfmgNaqC/DpVghjYIlhrQ== X-Received: by 2002:a17:902:8f96:: with SMTP id z22-v6mr15898099plo.190.1532415440585; Mon, 23 Jul 2018 23:57:20 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id f126-v6sm15721472pgc.88.2018.07.23.23.57.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jul 2018 23:57:20 -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: 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 v12 02/16] kexec_file: make kexec_image_post_load_cleanup_default() global Date: Tue, 24 Jul 2018 15:57:45 +0900 Message-Id: <20180724065759.19186-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180724065759.19186-1-takahiro.akashi@linaro.org> References: <20180724065759.19186-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;