From patchwork Fri Jun 24 15:06:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 12894761 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 B2CDAC43334 for ; Fri, 24 Jun 2022 15:19:05 +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=SjHdbP7wfejKUWYTssPwZY37rtyo/Txu5LQN/IL9Ozk=; b=yxLjVQd3ZpsaQ8 l4hVTpCc0T8zNp1YoBbDcZgy/UnQ+PP5zM222Tz+Rh/S2x1jCdd1R0aD7a2t8AVfHs2J/O7XCHeMA XlL4jGWQDGMDGT1Lm+utrB4XyTOcudxO4dh6qlyPoJcce3JMDiRvn8SFRJ+yDMdy6rlv78JAK7fo/ JkHKJpmtRqPN1JGhv0xn4N9oDHgmNYTwwATuCMSIryEs3eSL6Mpf2yBoX3qRGXfDP/Zhrav4bWPPH HSCQtzBpF5z65XAKoouW17opUO7+Uo+y06Z8Joyby4BnLHAUtxwte6dq2G5P1ghsKHNzAhJisTkVE cLiTF68HGrdpOzh/8IHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4l46-002nSQ-La; Fri, 24 Jun 2022 15:17:46 +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 1o4kue-002ibx-Pv for linux-arm-kernel@lists.infradead.org; Fri, 24 Jun 2022 15:08:02 +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 7DA20B826EE; Fri, 24 Jun 2022 15:07:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62691C341C6; Fri, 24 Jun 2022 15:07:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656083278; bh=spuzcEpOzLucXw/XWBnP+9vTyaCMnPCSjSbXqwVTSXw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=imkiINQ94Z8xm9fXxEStbT2tGk5FoSJfpwCELEnu2V5GtTzifm19JPTzDkUfB69gf kRFC4b9geM1kqr5N53SaSyhXJy8MAq9uhRQVYGabnBEvBlo0tCv1eltDOqXorogcZx il53yLYTY5G+4D54PHhEtEymQQqAPyTm9VS0e1kQnN1rYZ58dUzzVQsAqHMHVSrzIb Z/HDMQlYHHaZo5Op7OOqAFr28QlCZ3ZxExwMzaZeH74WLE7w95ikubZWHlmmAwiBIh r1c57As2sE5iDHqN1YDa0ZRQvJbaRNFmDPfOEoXFiVSMm7rITrP3bdD/+As/tcGPXX E4rHoKs7pgHGg== 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 21/21] arm64: setup: drop early FDT pointer helpers Date: Fri, 24 Jun 2022 17:06:51 +0200 Message-Id: <20220624150651.1358849-22-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=1995; h=from:subject; bh=spuzcEpOzLucXw/XWBnP+9vTyaCMnPCSjSbXqwVTSXw=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBitdMK6zUbA6XTOleHxbAowfqGCZXFaEpywDdD89Xj ryghsdCJAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCYrXTCgAKCRDDTyI5ktmPJDBkDA CWDQ/n8VPAw/MRed1TXRarmqtOJOyc5/Eh9kIslgghTfCxTgHpKcfl6eZCGmP+x+Q9p+uh1xyF11RB zHVVw1mSio3dHTs6A3pPL5p+cJqFmvDSY51s/OLVJKFE2EkT/yDtMl3XGyhdaFawJboXvudkCaMEK6 4F7HVhgaLB3IM5hwKURccXKM7rlnwhsUYwJRIyV3FLj2Iu1nRFYMA7yKojVd8OcQW2UryD+jbtw1HF ag6e+ACMqN+RtHUxC16W2k57eObPycjjXymIPkRGCgr8crTLrUZP36cDvsPr+hRO8/QObOVIDFi3og 8gS8/BIhDhMcYqtgdfHGNGitZV2RujBQyh9IxJWlGNCdEpQMf56FfMH0blPFCkahRks2fXX6MH2hsU 1zm7i5OGdQIzAIeIh22auZrripAd+m/nWldTT/qWlMcseeeMGmgxIk5je3fXQKgC0VgMfOeB/88Sq4 le+GX9PEBXfn94k18v7ihUEGCfZx0XiExucfKgl7GdY5o= 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_080801_145318_FBF184B7 X-CRM114-Status: GOOD ( 12.79 ) 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 We no longer need to call into the kernel to map the FDT before calling into the kernel so let's drop the helpers we added for this. Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/setup.h | 3 --- arch/arm64/kernel/head.S | 2 -- arch/arm64/kernel/setup.c | 15 --------------- 3 files changed, 20 deletions(-) diff --git a/arch/arm64/include/asm/setup.h b/arch/arm64/include/asm/setup.h index 6437df661700..5f147a418281 100644 --- a/arch/arm64/include/asm/setup.h +++ b/arch/arm64/include/asm/setup.h @@ -5,9 +5,6 @@ #include -void *get_early_fdt_ptr(void); -void early_fdt_map(u64 dt_phys); - /* * These two variables are used in the head.S file. */ diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 5a2ff6466b6b..6bf685f988f1 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -446,8 +446,6 @@ SYM_FUNC_START_LOCAL(__primary_switched) #if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS) bl kasan_early_init #endif - mov x0, x21 // pass FDT address in x0 - bl early_fdt_map // Try mapping the FDT early mov x0, x22 // pass FDT address in x0 bl init_feature_override // Parse cpu feature overrides mov x0, x20 diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index fea3223704b6..d0e6c7a291da 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -163,21 +163,6 @@ static void __init smp_build_mpidr_hash(void) pr_warn("Large number of MPIDR hash buckets detected\n"); } -static void *early_fdt_ptr __initdata; - -void __init *get_early_fdt_ptr(void) -{ - return early_fdt_ptr; -} - -asmlinkage void __init early_fdt_map(u64 dt_phys) -{ - int fdt_size; - - early_fixmap_init(); - early_fdt_ptr = fixmap_remap_fdt(dt_phys, &fdt_size, PAGE_KERNEL); -} - static void __init setup_machine_fdt(phys_addr_t dt_phys) { int size;