From patchwork Fri Jun 24 15:06:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 12894742 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41067C43334 for ; Fri, 24 Jun 2022 15:08:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Zo5hhiWTMCkLM4dV3eiybIatFo55IoXdJasfxAPmq1A=; b=wpH7cSjdOSZBFz XxF0Um+OLPj7+9E1oWDuLZQDpQTc32U32UyAkh4pMC4mJEjrEBdS6K/8nZWa6uNFy8ptr+vJA5+Ag 0bo9PP/qANrxToR9rUaAIyWHuqr1WXCbGi0cX+lU8riGP0NBNG56QjbK1b9FXYVMD7i4mArc3wL5N /sw36sSQLl/Bgj/TyuyuG7aSl1EIfmf8Jwb1RMFcUfO2Loc+cqnStQlKXbI8QpFHYjpcO360LzuHZ TH8pbdjiLx7voMBYo8WLn8dAYe7OG4eoDUiKj70KXi9/VYfxN5a2U/tCO2utyQ2rMSWGXQJKpo8Bg m8IFIAjkr0U0QvXWeBrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4ku3-002iNL-S3; Fri, 24 Jun 2022 15:07:23 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4ktu-002iKW-AK for linux-arm-kernel@lists.infradead.org; Fri, 24 Jun 2022 15:07:15 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 04874B826EE; Fri, 24 Jun 2022 15:07:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E033EC341C6; Fri, 24 Jun 2022 15:07:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656083231; bh=nQj+OXIbaKKle65XIN24cL4njBHpj6xT59hY56xesN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P0SGRMiTSYbWTrQuDse2RtbnER8pU1AEcBK7O6k2rUEO8rpI03++Vj6RvXiit5AzI rcPP2DSo+/kUmyyfLDYlzyEvMulIaGWKpx2vSvq2VZhs6lGfhKX9bk9hJm8nI0H42C qTLrg/VS7hKksMCisKKP2E/tDjrJoJAGABalgzPXUZG61SDM7EU8Pmt+cOrNqg3vVR X5F1gkDrWQgN0KBktN4Oql7T+kggdu8s5HvhzDjpQ94B52W8kWp+D5FRLAsG8MJ1tR c0nKR5vH1lngFj+3CqHJbzImHc687O//5cp4NggNoxNSI4k0mVUscA6i0E1XCDhWzE TBLSSpnb8yIDQ== From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: Ard Biesheuvel , Marc Zyngier , Will Deacon , Mark Rutland , Kees Cook , Catalin Marinas , Mark Brown , Anshuman Khandual Subject: [PATCH v5 01/21] arm64: head: move kimage_vaddr variable into C file Date: Fri, 24 Jun 2022 17:06:31 +0200 Message-Id: <20220624150651.1358849-2-ardb@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220624150651.1358849-1-ardb@kernel.org> References: <20220624150651.1358849-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1366; h=from:subject; bh=nQj+OXIbaKKle65XIN24cL4njBHpj6xT59hY56xesN4=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBitdLoKosfleHve3BLHvB4clHclk1ueoW+2bjkGDak BzVvWlOJAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCYrXS6AAKCRDDTyI5ktmPJMpWDA CNX9kIIaCvtGWcLnQGcqdnSHHAQ8We34regs/SRQZwYF82TUnSplZ2BHX260MgKwprQyHOMQWu2+05 ZpvkmDcW+nwj44xTPJsOlY48bncxN3tq6Ycx8Nn8oKqZK24OwMOdUZOD9SfHidDLhtYlv7x9WLDYi2 eb1QhFTE9jvEozXbXjeMluF6bae8AlJw5keOeCiI2L9QPx/Qq6tXuxtrhe8+DZjP89SUJQj1hNjE7J yhjYkNRC3eFdiPnVl8eUOklvHsb46DeEt8DyJg6EnY15/Ga7IcRgM72EKe/7pA3QfcQUlOTuwcnr69 bxdazF43YOV0Sqp/ZMnCee18xIwre6g5xZiTuh98S45aufW+IzOfIhIQaFd0fK8HNAAGCZ4nwQCwuv EkwR7d30/+0rXFIREL424hdc+TClIC6cEftOmYHCS4Q7+juX2CBeG05YmBrb+z6XCwTcUWpioFOpu8 exMnZCHLmUWWPlRgXVHE1rFx1k0NkSJ84ygVW4HIYGTPs= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220624_080714_559495_EA87F88C X-CRM114-Status: GOOD ( 12.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This variable definition does not need to be in head.S so move it out. Signed-off-by: Ard Biesheuvel Reviewed-by: Anshuman Khandual Acked-by: Mark Rutland --- arch/arm64/kernel/head.S | 7 ------- arch/arm64/mm/mmu.c | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 6a98f1a38c29..1cdecce552bb 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -469,13 +469,6 @@ SYM_FUNC_START_LOCAL(__primary_switched) ASM_BUG() SYM_FUNC_END(__primary_switched) - .pushsection ".rodata", "a" -SYM_DATA_START(kimage_vaddr) - .quad _text -SYM_DATA_END(kimage_vaddr) -EXPORT_SYMBOL(kimage_vaddr) - .popsection - /* * end early head section, begin head code that is also used for * hotplug and needs to have the same protections as the text region diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index c5563ff990da..7148928e3932 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -49,6 +49,9 @@ u64 idmap_ptrs_per_pgd = PTRS_PER_PGD; u64 __section(".mmuoff.data.write") vabits_actual; EXPORT_SYMBOL(vabits_actual); +u64 kimage_vaddr __ro_after_init = (u64)&_text; +EXPORT_SYMBOL(kimage_vaddr); + u64 kimage_voffset __ro_after_init; EXPORT_SYMBOL(kimage_voffset);