From patchwork Wed Jan 27 17:27:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 12050665 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B4CEC433E0 for ; Wed, 27 Jan 2021 17:27:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9BFCB64DA6 for ; Wed, 27 Jan 2021 17:27:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BFCB64DA6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 096756B0078; Wed, 27 Jan 2021 12:27:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 01F466B007B; Wed, 27 Jan 2021 12:27:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E04336B007D; Wed, 27 Jan 2021 12:27:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0150.hostedemail.com [216.40.44.150]) by kanga.kvack.org (Postfix) with ESMTP id A19996B0078 for ; Wed, 27 Jan 2021 12:27:43 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4A3DA180AD822 for ; Wed, 27 Jan 2021 17:27:43 +0000 (UTC) X-FDA: 77752237206.01.team85_05149b127598 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id 32E101004A081 for ; Wed, 27 Jan 2021 17:27:19 +0000 (UTC) X-HE-Tag: team85_05149b127598 X-Filterd-Recvd-Size: 5752 Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Wed, 27 Jan 2021 17:27:18 +0000 (UTC) Received: by mail-qv1-f52.google.com with SMTP id p5so1420847qvs.7 for ; Wed, 27 Jan 2021 09:27:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=cfSnNSnfVduFxCPOvWfs9p+QSvXlJihsz/H5U3Y4H1U=; b=JSF/HlHCJzShZn7ALunS0BkmdIvbsb31kLfU+RnIPOJjHHHbnPC+hKp5GzFf5aNfG0 PCnd0hUx8KnQTQJAs7hc3j8UjBo0nhsavr2YgBKj48WT2dlprkP86SX5YogstiQFgEW1 fQXmcUFNK/whrTvXsAd2ttbgakW8eugEXjKNmuKRJBUbncvkUaYlDCqNXZhKNp4QGgZi s9l3aBEqnDiNAea7t1MlSQvIt3uOdGGZZwDbfriUGm56jfCILeRPYfkcC4aBIVfBChfU myBdivbvXZCSHraxlvN/kcYnz6cOQzbdEGPqEKU9R4Tk+vISJcmeJUo2Io2EH78AfPDL BLQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cfSnNSnfVduFxCPOvWfs9p+QSvXlJihsz/H5U3Y4H1U=; b=emQPSYN+UlkkDhr5YVnqhV1MIsAAKN9iEebyif8nYjP9svjPp+jbr+q03Rd0dZaQ5I GBB2yy2+nhB7tOAtD7o7LZBF9w7B90CR8a6Am89XW6rEBSou/U9rX9wheLn9OymLMU3T WIf+YdIuOPgzUMLoYVmoUo1X0hiF6PbhT51wVhKVxcG1ymliRTE8WqC7WGLWOU6esPv3 jGvRQbJURq0bwvJiXJEhpcAh+XfU7bqFEFWTssWBMm2pWj6dbcThRWWXsfXB7rgVH8sj hXoc6L/buqql6bmF9Ucao3JIEDCn8QuXR/AQoxKSjnVEwVprl3Ec3P16LTKUmzxRr8H8 faVw== X-Gm-Message-State: AOAM5307U+q4ngTup7mZKYtH8Ded6tiSfHDeDc2l4+ghyvKx2hdhFb6X UC6iO7LA371jc5WUMLwnP9ibqQ== X-Google-Smtp-Source: ABdhPJwHsa1PlzOcEErpv+fEXO2+H7UWl48S+Yfvc0TUYpC69d2qgqgALhqP+OIOSgJyhuzsv33wBA== X-Received: by 2002:a0c:99c4:: with SMTP id y4mr11377443qve.9.1611768437920; Wed, 27 Jan 2021 09:27:17 -0800 (PST) Received: from localhost.localdomain (c-73-69-118-222.hsd1.nh.comcast.net. [73.69.118.222]) by smtp.gmail.com with ESMTPSA id z2sm1728019qtz.71.2021.01.27.09.27.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 09:27:17 -0800 (PST) From: Pavel Tatashin To: pasha.tatashin@soleen.com, jmorris@namei.org, sashal@kernel.org, ebiederm@xmission.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, maz@kernel.org, james.morse@arm.com, vladimir.murzin@arm.com, matthias.bgg@gmail.com, linux-mm@kvack.org, mark.rutland@arm.com, steve.capper@arm.com, rfontana@redhat.com, tglx@linutronix.de, selindag@gmail.com, tyhicks@linux.microsoft.com Subject: [PATCH v11 6/6] arm64: kexec: remove head from relocation argument Date: Wed, 27 Jan 2021 12:27:06 -0500 Message-Id: <20210127172706.617195-7-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210127172706.617195-1-pasha.tatashin@soleen.com> References: <20210127172706.617195-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Now, that relocation is done using virtual addresses, reloc_arg->head is not needed anymore. Signed-off-by: Pavel Tatashin --- arch/arm64/include/asm/kexec.h | 2 -- arch/arm64/kernel/asm-offsets.c | 1 - arch/arm64/kernel/machine_kexec.c | 1 - 3 files changed, 4 deletions(-) diff --git a/arch/arm64/include/asm/kexec.h b/arch/arm64/include/asm/kexec.h index 049cde429b1b..2fa4109bd582 100644 --- a/arch/arm64/include/asm/kexec.h +++ b/arch/arm64/include/asm/kexec.h @@ -97,7 +97,6 @@ extern const char arm64_kexec_el2_vectors[]; /* * kern_reloc_arg is passed to kernel relocation function as an argument. - * head kimage->head, allows to traverse through relocation segments. * entry_addr kimage->start, where to jump from relocation function (new * kernel, or purgatory entry address). * kern_arg0 first argument to kernel is its dtb address. The other @@ -113,7 +112,6 @@ extern const char arm64_kexec_el2_vectors[]; * copy_len Number of bytes that need to be copied */ struct kern_reloc_arg { - phys_addr_t head; phys_addr_t entry_addr; phys_addr_t kern_arg0; phys_addr_t kern_arg1; diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c index 06278611451d..94f050ad6471 100644 --- a/arch/arm64/kernel/asm-offsets.c +++ b/arch/arm64/kernel/asm-offsets.c @@ -153,7 +153,6 @@ int main(void) BLANK(); #endif #ifdef CONFIG_KEXEC_CORE - DEFINE(KEXEC_KRELOC_HEAD, offsetof(struct kern_reloc_arg, head)); DEFINE(KEXEC_KRELOC_ENTRY_ADDR, offsetof(struct kern_reloc_arg, entry_addr)); DEFINE(KEXEC_KRELOC_KERN_ARG0, offsetof(struct kern_reloc_arg, kern_arg0)); DEFINE(KEXEC_KRELOC_KERN_ARG1, offsetof(struct kern_reloc_arg, kern_arg1)); diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c index 9588c91f67c6..07da8d623d8e 100644 --- a/arch/arm64/kernel/machine_kexec.c +++ b/arch/arm64/kernel/machine_kexec.c @@ -166,7 +166,6 @@ int machine_kexec_post_load(struct kimage *kimage) memcpy(reloc_code, __relocate_new_kernel_start, reloc_size); kimage->arch.kern_reloc = __pa(reloc_code) + func_offset; kimage->arch.kern_reloc_arg = __pa(kern_reloc_arg); - kern_reloc_arg->head = kimage->head; kern_reloc_arg->entry_addr = kimage->start; kern_reloc_arg->kern_arg0 = kimage->arch.dtb_mem;