From patchwork Fri Sep 7 07:56:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 146191 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp859919ljw; Fri, 7 Sep 2018 00:57:33 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYs29hHKdRubi9xFwqA+xdo7ehWnRIoVwvbEXS+/qystCTYCgKWcq2NZ2E5moVXrIwhDMj0 X-Received: by 2002:a17:902:76c5:: with SMTP id j5-v6mr6713030plt.140.1536307053047; Fri, 07 Sep 2018 00:57:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536307053; cv=none; d=google.com; s=arc-20160816; b=X5Se0GmYLpDPh94OCXEe9N5OAU7vpfkotEiweIOH5Q6yyUT9jAW3gIOi5LgHbLj34G +xAKNiMMh1YabvkB5LZhcvISQfFapUAkRkGMdwvAnSTrUTYCcCIi6tYHjAH/PdG5/dZc GdrMABrKFLaJN031fd7YUsKRpb0NzsDDMXOLijkKpuOgoJ8DsTFJdyj2rJAe6VMoge11 eHHpEgaANMwbAwVU+vbX43roG8h9vsPP2ISyDFSkWRq3eAns1KiKUIf9W7TztW3w5cg8 4BD8g+aoFRt/11/CInW/XDLMqId95ow67UaVywN9MFb4WdzhDyVFHsXBEuzOawVxL3sT Jxvg== 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; bh=DIzV6aso3cBbRwIPS8DL9LqPtHHeWZam6wO8uhZIhTo=; b=h6rucEoRTBeK2+d8S1cbUlueGxzS7pJTss9jFXqsEclPgP5C9KHGHsIKcozKohpcMx xHs9fp4lwS3+7H7xIYW82XM/g3GWKEtW1Y2JWcNBS6KibUQ66WeV5Tvix4f3AAB/n12T RN2YxygWM0D145Dxw+0n2kWjD6wQZnOrQtSrb8/Mn2+eFYw831WS52OctHFO8smtMDG2 caagUNIewp4x+LuhWgmAVF05FQk0j7EFDgcwMjz9yC4efB3z5i/O1xUhEBaG1zsoVety 92MsL2rYQzJfegcH6r+8zxiiJ3ZdsScUUJARIamtS/wGuoCNz7aFnIw1SADh3x/ILuJj hrGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QT7DAb1V; 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 x7-v6si7680254pgh.595.2018.09.07.00.57.32; Fri, 07 Sep 2018 00:57:33 -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=QT7DAb1V; 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 S1728027AbeIGMhO (ORCPT + 32 others); Fri, 7 Sep 2018 08:37:14 -0400 Received: from mail-pf1-f177.google.com ([209.85.210.177]:38870 "EHLO mail-pf1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727822AbeIGMhO (ORCPT ); Fri, 7 Sep 2018 08:37:14 -0400 Received: by mail-pf1-f177.google.com with SMTP id x17-v6so6638673pfh.5 for ; Fri, 07 Sep 2018 00:57:30 -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=QT7DAb1VW3TTiSKno3oN+Ds4oOesrprs8hlPrzWly0uu8ex49FZI44yQkoCeR0AXlO rybOkj+45dEks0DMV0i9PMQOIkw6nwa/FjlkvSv4OVSPeAJXQMgs3oMmfIxbSwMei4TJ ARQiZQOCdCx9TdJVynK7qupICR+kH/Nwc/Ic8= 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=Er/4BgXdGvmt0dHg/LsU8lN36xXYcnydi4XKUWRQn4xi0tTrK1HjLXbZnmdnj0ycGk BGDuunAvyzyZWyaxWl2nwkdIHYVCr0MWPtlbY3P3EAeg92C9g/PmTKc6LBk9BPYX8JOb jKQ949pCSV0g9INW8GfG9cPbCd3qkZQjtjuSIVLFA4HYXyAt0WzMNiMB3HFUVK4sveIo 8JkYHUQRrZ9gb581mVlbVItx5HTEbXLniwU2fDZgOvnNeAx+AOZR+8BSVvYnNr9x3A7B IP65gcmvOZpB4tcvyrXP7QDdVV/i+V9PVIomTyUGSxl0XC41JNXWvO6R7zW01h6CnJY4 OcKQ== X-Gm-Message-State: APzg51DUTUna0lpif/uPz1f8nqCalHKtcvs7L3Tnlbc/HomQpYrEyN0j 93/YCDnQV6q7XqZCCbJXPOfU3Q== X-Received: by 2002:a63:555c:: with SMTP id f28-v6mr6968922pgm.37.1536307050029; Fri, 07 Sep 2018 00:57:30 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id q26-v6sm12593771pfj.127.2018.09.07.00.57.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 00:57:29 -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 v14 02/16] kexec_file: make kexec_image_post_load_cleanup_default() global Date: Fri, 7 Sep 2018 16:56:39 +0900 Message-Id: <20180907075653.4696-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180907075653.4696-1-takahiro.akashi@linaro.org> References: <20180907075653.4696-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;