From patchwork Tue Feb 9 18:21:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: nramas X-Patchwork-Id: 379378 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp489087jah; Tue, 9 Feb 2021 10:35:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJz8xJ5dKiGDElr4K5UkKuwlhJKTEyqgLx4dj7KgWJ1rDjLzZzwNbmc2CD0cc9lvRsWQzvAB X-Received: by 2002:a17:906:fc5:: with SMTP id c5mr23008974ejk.538.1612895758002; Tue, 09 Feb 2021 10:35:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612895757; cv=none; d=google.com; s=arc-20160816; b=0bPuciuGCTTrE9J/Nxwd6gUWK2NHA+mtKcie6KRQS+VKVpEBAkeTZwgn9hnxcS4DYn Ou4L2N6RD4p7XUYIM37EVPYDHBz4+S5WpIZ1qyB5eRN8t3Beg5VwAjgX4c9mVfwi9P/p M8WRBg/HknTHfcxsUE/b6Qke7y4LO7s/6sSjyVMFRBvn0ULXKZ3xJwCORQmcMiBuoOz6 kp49+iB2O5wFZ0y1HQetW6psZbTThnA+ErsLd1vj0Z8PTFpK1VAfBpUH9kdyHcvoOyuU RY1UbX+HeP5oW/E/NaX8uuIgPesDW/NtpB1ooAUk9T9ac/h6KgXaZaDY93KwEop5ZKHJ lhXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=wqW3xwsp9Cq77lvYiiXd1zv1yJERqbx7C93NSrMrSUg=; b=j1mEN74f3v010OUQURBlOcEPPIh63JU+qUCedjmfE0dQTkNwEy6RDsRNir0viaeEfy HO34+F9+Lia7PowqAQ8WabSjTS+h2PWfZb06Jd4LRhgO8vkwrzHuRuuVJqEfwbj0Q1tz UFtCIIWxdyIlciSNNL0AdmnSHcbB5ZKnvcRlLxLvgSRrR+8fGxiFK0ysLXtZ/kzi5bJL hk458PP78bwGDg1ZDi6KPqvSryCgo0yvOalKk8tWgOV1M7RmgLTo7b/VvSVlw2vOPlf4 fH86wK3cKfyVnCCgBQbxq1pE8Hh4Bnm/DpAl4oced7p3obUOhbPaeHyXW9b0n4eUOC9N prLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=SrrgUTg0; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a23si15951473eda.386.2021.02.09.10.35.57; Tue, 09 Feb 2021 10:35:57 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=SrrgUTg0; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233077AbhBIS3c (ORCPT + 6 others); Tue, 9 Feb 2021 13:29:32 -0500 Received: from linux.microsoft.com ([13.77.154.182]:57666 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233365AbhBISXK (ORCPT ); Tue, 9 Feb 2021 13:23:10 -0500 Received: from localhost.localdomain (c-73-42-176-67.hsd1.wa.comcast.net [73.42.176.67]) by linux.microsoft.com (Postfix) with ESMTPSA id 4BF462020E9D; Tue, 9 Feb 2021 10:22:29 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4BF462020E9D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1612894949; bh=wqW3xwsp9Cq77lvYiiXd1zv1yJERqbx7C93NSrMrSUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SrrgUTg0bZQW+g3u6ZlXP0I4yeCLtDpWmx/AeP0ePIv4JdJmZ4h6nQO9pF81gTrVA tWLCms4R3CdXNwV6vEZqYb8TsK4JLwtfnBcMkC9pa2kJ0rdsAmey/xSpxIR7aEB79F /1Z2XyD12UGPP6doQndmwaq4WH7IG6FRPURGOsAA= From: Lakshmi Ramasubramanian To: zohar@linux.ibm.com, bauerman@linux.ibm.com, robh@kernel.org, takahiro.akashi@linaro.org, gregkh@linuxfoundation.org, will@kernel.org, joe@perches.com, catalin.marinas@arm.com, mpe@ellerman.id.au Cc: james.morse@arm.com, sashal@kernel.org, benh@kernel.crashing.org, paulus@samba.org, frowand.list@gmail.com, vincenzo.frascino@arm.com, mark.rutland@arm.com, dmitry.kasatkin@gmail.com, jmorris@namei.org, serge@hallyn.com, pasha.tatashin@soleen.com, allison@lohutok.net, masahiroy@kernel.org, mbrugger@suse.com, hsinyi@chromium.org, tao.li@vivo.com, christophe.leroy@c-s.fr, prsriva@linux.microsoft.com, balajib@linux.microsoft.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v17 01/10] powerpc: Rename kexec elfcorehdr_addr to elf_headers_mem Date: Tue, 9 Feb 2021 10:21:51 -0800 Message-Id: <20210209182200.30606-2-nramas@linux.microsoft.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210209182200.30606-1-nramas@linux.microsoft.com> References: <20210209182200.30606-1-nramas@linux.microsoft.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Rob Herring The architecture specific field, elfcorehdr_addr in struct kimage_arch, that holds the address of the buffer in memory for ELF core header for powerpc has a different name than the one used for arm64. This makes it hard to have a common code for setting up the device tree for kexec system call. Rename elfcorehdr_addr to elf_headers_mem to align with arm64 name so common code can use it. Signed-off-by: Rob Herring Reviewed-by: Thiago Jung Bauermann Reviewed-by: Lakshmi Ramasubramanian --- arch/powerpc/include/asm/kexec.h | 2 +- arch/powerpc/kexec/file_load.c | 4 ++-- arch/powerpc/kexec/file_load_64.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) -- 2.30.0 diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h index 55d6ede30c19..dbf09d2f36d0 100644 --- a/arch/powerpc/include/asm/kexec.h +++ b/arch/powerpc/include/asm/kexec.h @@ -108,7 +108,7 @@ struct kimage_arch { unsigned long backup_start; void *backup_buf; - unsigned long elfcorehdr_addr; + unsigned long elf_headers_mem; unsigned long elf_headers_sz; void *elf_headers; diff --git a/arch/powerpc/kexec/file_load.c b/arch/powerpc/kexec/file_load.c index 9a232bc36c8f..e452b11df631 100644 --- a/arch/powerpc/kexec/file_load.c +++ b/arch/powerpc/kexec/file_load.c @@ -45,7 +45,7 @@ char *setup_kdump_cmdline(struct kimage *image, char *cmdline, return NULL; elfcorehdr_strlen = sprintf(cmdline_ptr, "elfcorehdr=0x%lx ", - image->arch.elfcorehdr_addr); + image->arch.elf_headers_mem); if (elfcorehdr_strlen + cmdline_len > COMMAND_LINE_SIZE) { pr_err("Appending elfcorehdr= exceeds cmdline size\n"); @@ -263,7 +263,7 @@ int setup_new_fdt(const struct kimage *image, void *fdt, * Avoid elfcorehdr from being stomped on in kdump kernel by * setting up memory reserve map. */ - ret = fdt_add_mem_rsv(fdt, image->arch.elfcorehdr_addr, + ret = fdt_add_mem_rsv(fdt, image->arch.elf_headers_mem, image->arch.elf_headers_sz); if (ret) { pr_err("Error reserving elfcorehdr memory: %s\n", diff --git a/arch/powerpc/kexec/file_load_64.c b/arch/powerpc/kexec/file_load_64.c index c69bcf9b547a..a05c19b3cc60 100644 --- a/arch/powerpc/kexec/file_load_64.c +++ b/arch/powerpc/kexec/file_load_64.c @@ -815,7 +815,7 @@ static int load_elfcorehdr_segment(struct kimage *image, struct kexec_buf *kbuf) goto out; } - image->arch.elfcorehdr_addr = kbuf->mem; + image->arch.elf_headers_mem = kbuf->mem; image->arch.elf_headers_sz = headers_sz; image->arch.elf_headers = headers; out: @@ -851,7 +851,7 @@ int load_crashdump_segments_ppc64(struct kimage *image, return ret; } pr_debug("Loaded elf core header at 0x%lx, bufsz=0x%lx memsz=0x%lx\n", - image->arch.elfcorehdr_addr, kbuf->bufsz, kbuf->memsz); + image->arch.elf_headers_mem, kbuf->bufsz, kbuf->memsz); return 0; }