From patchwork Mon Jan 25 19:19:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 12044141 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.6 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 D1DFDC433DB for ; Mon, 25 Jan 2021 19:20:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6709120E65 for ; Mon, 25 Jan 2021 19:20:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6709120E65 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 3E0028D002D; Mon, 25 Jan 2021 14:19:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 393298D0023; Mon, 25 Jan 2021 14:19:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1C3808D002D; Mon, 25 Jan 2021 14:19:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0244.hostedemail.com [216.40.44.244]) by kanga.kvack.org (Postfix) with ESMTP id F10898D0023 for ; Mon, 25 Jan 2021 14:19:57 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B2B303622 for ; Mon, 25 Jan 2021 19:19:57 +0000 (UTC) X-FDA: 77745262434.20.smell13_340d4fd27588 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 79D0B180C060E for ; Mon, 25 Jan 2021 19:19:57 +0000 (UTC) X-HE-Tag: smell13_340d4fd27588 X-Filterd-Recvd-Size: 5763 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Mon, 25 Jan 2021 19:19:57 +0000 (UTC) Received: by mail-qv1-f53.google.com with SMTP id s6so6712584qvn.6 for ; Mon, 25 Jan 2021 11:19:56 -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=bntzwWb0HnF+pu1wTRlxa4nGPd0MURNpYR8uZbvPwl4=; b=aznWjElVYsHK1zXw38ZeQN4JK2jZE1LCcfMo91RU+SnIfejFZOlOFF6GnXfHtUxTuB nx+vd0X1j3aObV6HjWaRTYR3YFz3OMIKiMzQsFdP8O//rc3JyHEGvZ1eza4Hx9FhM9Xu MLPWDXzEokhcrZo7iPjKXIf8uyiVouOu6eWmBrQdBUyASn920C6UxGCP11uwpZJnT8Aq c0PQ22aHJcWhVfHa+IuSyf3iqMVoSgtM7PDqmk74MOJ5xqFyGUnmJ1Dw4Bg7hGJGR+Jq o7Vrk/rs5TNslgwP46rBg/KriUXV461e/WvbyR+EfD1Cn1cQnLm6i4tN3YvEpNTWjQwh psfA== 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=bntzwWb0HnF+pu1wTRlxa4nGPd0MURNpYR8uZbvPwl4=; b=Xa62eRmPQ5hOXPUTQYyUABOyRMW262focPXzwGXLfUVB9uuYZZMTnx+vL7XXUDu+Ny 0WxE+Ry5dbZr1Pf392O5g5sPzwX6WD3kNW4ODL9vULUWPro5PvWe5pV3l7GNfG+XFNpg 477mBOwQwgC3WK/q46UdpCwBBkokKl9nPAvQWLzWWRh6UhEJsirwNIcZTPDLeLQCT4XC HsHdfQwemh1gEwpZiDpUAUxqnMi/v/YHPnrWrlaoyxZJVHpVs91ELPSOOQU8LZ8CZcdt fn2o38BUlU2lSnUlHf876nlAgznZ9JCdeT8ZGyhGeArdB3FO3SIpH1eeZjipFaa2e1uW Xv5A== X-Gm-Message-State: AOAM531VFf8uaOAtxVKTkb4a3zngGPI8ruvh0nCcBRW8+chT82z2igOz 1HS7Tr8lciyP+vbM0VPM+asEPg== X-Google-Smtp-Source: ABdhPJytuTHdBIVuiybjpt5hI8b1ljcElIFMcTl+j/BWrIjw/SnfAX/Yl/DjO9FsYiUxo5xvziJ1Kw== X-Received: by 2002:a05:6214:138e:: with SMTP id g14mr2241683qvz.7.1611602396408; Mon, 25 Jan 2021 11:19:56 -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 s6sm9047638qtx.63.2021.01.25.11.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 11:19:55 -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 v10 18/18] arm64: kexec: remove head from relocation argument Date: Mon, 25 Jan 2021 14:19:23 -0500 Message-Id: <20210125191923.1060122-19-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210125191923.1060122-1-pasha.tatashin@soleen.com> References: <20210125191923.1060122-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 dc1b7e5a54fb..c2dff232a85b 100644 --- a/arch/arm64/kernel/machine_kexec.c +++ b/arch/arm64/kernel/machine_kexec.c @@ -168,7 +168,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;