From patchwork Thu Nov 15 05:52:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 151164 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6593479ljp; Wed, 14 Nov 2018 21:52:25 -0800 (PST) X-Google-Smtp-Source: AJdET5eGIhL7naXe4TBCLflS2viOXm7Tcsv4ChlfPoXXT6IUVl0+TRd1pltKQf+RRqdv71bHMsjX X-Received: by 2002:a17:902:9692:: with SMTP id n18-v6mr4816271plp.41.1542261144980; Wed, 14 Nov 2018 21:52:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542261144; cv=none; d=google.com; s=arc-20160816; b=mr/Gh/OwandKBlF/o9ejrVhGzMqF4a8+tz8Fjf695Bzr+cZ91KdgUg3dMbcdNZHMBi 8zTgtiR6DyAf0VsERyv3Iw6s9rNftPLVMRUWYq1VUYVMmK94hlUo+vPTIvJKUcPClxXB tStEYU8vK4P/CYJOnHEq4uRTDYABSv9XADmOLTgyO4N3Ofwkz9h3+9GjRqucm9Q22zUU jyf/gAAPxPGdSZsj1lEBYUq9edg68Y0qQyH35awKWch0BYW5R2lc+9BM7XQqYrJYC9ga bnOuZrPxGO/RfXs0AQYCpVIobJjakx1hdIxlZEJBzyy6fsrXxPB1QNdtd29pHMaX/XM7 fHUQ== 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=h11K0AmVrf07I+hu2nU8xySmOw+R/bUvf0+LW2Q+26k=; b=Rz0FLNw+SWi+bzv/5sOS4SdhzpwtJrV6++ndyHy0JDyTE9hx17yDhYEyaDlsVxByYK hSq7afevbhZRkbw+YcPYUH2Ad0TP8P8Baps59hDFn9QGa6+LktnEuU486OmHSrNWwJvm nKUJ4/egdwrlDz/E4TiOb58OpkF5A2Yw7h3YOgl/+6qlX2PmvcDoTJa9yE7YpTPaYZGV lloJ2WTI1bacD2cyqmfu9hFz1t19+AxkgsGJode/gxwXbHwAXerhwuS3E+e/pu7xOBMN CFuCjAcfzMs/vJQQvC/7khkSU7WavJlf/OVtOIwcc8AcFWonrqGW6eaRbOkOAsS3PY2/ XyBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Byi9Ido6; 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 o3-v6si25467979plk.360.2018.11.14.21.52.24; Wed, 14 Nov 2018 21:52:24 -0800 (PST) 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=Byi9Ido6; 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 S1728639AbeKOP6s (ORCPT + 32 others); Thu, 15 Nov 2018 10:58:48 -0500 Received: from mail-yw1-f68.google.com ([209.85.161.68]:38094 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728468AbeKOP6s (ORCPT ); Thu, 15 Nov 2018 10:58:48 -0500 Received: by mail-yw1-f68.google.com with SMTP id i20so879669ywc.5 for ; Wed, 14 Nov 2018 21:52:22 -0800 (PST) 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=h11K0AmVrf07I+hu2nU8xySmOw+R/bUvf0+LW2Q+26k=; b=Byi9Ido6WYyA6ak3oOwmTntFN6ZvPrWq+jnerI2g4TBQeE/AuJ9l5Xgc5LS+yqFM/G cLqhfQmJrhw/n4hQwHh529vaPJWOjbTfW9xLSnpUzBEETZs1YUvjjGk1aQsxuVibqHrb vk2e/tcv6SvR7BsOGP2ME0lvkO0W/eiCtsD3k= 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=h11K0AmVrf07I+hu2nU8xySmOw+R/bUvf0+LW2Q+26k=; b=PlE9yOaW2n49MzkfhTUO/XWWRbE3awfAh4eKlojgBhU+0uITrvP14SOK9vXVtsX7ww Afa8z4/Pfh+Z3DO17S+V31cUjXOY7gkBx7g0ZlOPcH+kYgkpI7CfayZ6pwgbJVxTvpf5 E+u0cmoWw0npWXxyX9D1JXqDuCAm36T+pZToox6JtVBo6uAPwFeYqRAOzzKoZUxwACM6 ic0UtOeN+u8Kouay3ORCfS5vmkEoYkaUtunhyb3Qg993CAVTHiusJkv5by5nIg7CLmnh AcBYy5JQvo+g6ujDBG3uXml0mEH2TGE6RmDhC3KEFeW8mbOEN+VONqsZHsHc6UsKXglf nIuw== X-Gm-Message-State: AGRZ1gLjwcZhTeMCN9hLtKaNxrKUTs8cRpUFsPCjQ01LBZPj/NSMh1Cw cwuN0hHwLifUxMhfujA9Z+ajBA== X-Received: by 2002:a81:4bc1:: with SMTP id y184mr248875ywa.365.1542261142042; Wed, 14 Nov 2018 21:52:22 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id b186-v6sm9764855ywe.27.2018.11.14.21.52.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 21:52:21 -0800 (PST) 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 v16 02/16] kexec_file: make kexec_image_post_load_cleanup_default() global Date: Thu, 15 Nov 2018 14:52:41 +0900 Message-Id: <20181115055254.2812-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181115055254.2812-1-takahiro.akashi@linaro.org> References: <20181115055254.2812-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 35cf0ad29718..9ce6672f4fa3 100644 --- a/kernel/kexec_file.c +++ b/kernel/kexec_file.c @@ -76,7 +76,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;