From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 10 Oct 2022 08:14:17 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ohm3O-0033in-Ha for lore@lore.pengutronix.de; Mon, 10 Oct 2022 08:14:17 +0200 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ohm3M-0001dx-Ix for lore@pengutronix.de; Mon, 10 Oct 2022 08:14:17 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=s+Wb0duQn+4y4IbnhsfzZsNzxl9duPXP14bDeo34R30=; b=4+1b9m5q1SP564frP4m/gDl9Sg DVFBySjf6MgWXbVcnH3ir2RraqPzmV17LnLbLGqKnZwi4gmoKoz5xDW9xJa5SCMal5D1eVDfciQm0 LNM1CArL69Vv53g1ryeA+thbcbDG9DZxUQSEwW7xxSJ2SaqN7yHmlc72oy842pFIkTdLT7j3Ncpqi 60ANiTyw/mm7/eCt+OeNo9Dhj6xT5xKPsiZ4voLCJ9O4CfmY4MnNGn5Pq1EJl4AkEFjbwR3V6Erge tWRv6E1aHHwDAKFkeoD+b2d2upTTGY+JmmD2mumf8aPph2OCpKTO/U/oH1vgNRGewywP0jWLE0/Ok UVW0m00g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohm1t-00HBQ4-79; Mon, 10 Oct 2022 06:12:45 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohm1m-00HBNX-T0 for barebox@lists.infradead.org; Mon, 10 Oct 2022 06:12:40 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ohm1l-0000wc-IX; Mon, 10 Oct 2022 08:12:37 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1ohm1k-000dYi-Sc; Mon, 10 Oct 2022 08:12:36 +0200 Received: from afa by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1ohm1j-008kJ4-Vw; Mon, 10 Oct 2022 08:12:35 +0200 From: Ahmad Fatoum To: barebox@lists.infradead.org Cc: bst@pengutronix.de, lst@pengutronix.de, Ahmad Fatoum Date: Mon, 10 Oct 2022 08:12:35 +0200 Message-Id: <20221010061235.2084562-2-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221010061235.2084562-1-a.fatoum@pengutronix.de> References: <20221010061235.2084562-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221009_231238_973084_F2D98C55 X-CRM114-Status: GOOD ( 12.89 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-4.5 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [RFT PATCH 2/2] ARM: start: drop support for machine type casted to boarddata pointer X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.ext.pengutronix.de) Commit 84d28cec7f49 ("ARM: add a machine number mechanism for boarddata") added in 2015 added a struct barebox_arm_boarddata mechanism for PBL to pass machine type to barebox proper without going the legacy router of casting the machine type integer to a pointer directly. The legacy way with casting was mostly broken two years ago with commit 390bc7834ffc ("ARM: start: check for machine type last"). Only user that complained about it was using an in-tree board that has in the meantime been fixed to use struct barebox_arm_boarddata instead. Take this as indication that the code is dead and can be safely removed. This may introduce regressions for boards that happened to work, despite their machine type integer being dereferenced as a pointer. If you happen to have such a board, please pass a pointer to a struct barebox_arm_boarddata instead. Signed-off-by: Ahmad Fatoum --- arch/arm/cpu/start.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c index 672f26e0063c..f9b617aa855a 100644 --- a/arch/arm/cpu/start.c +++ b/arch/arm/cpu/start.c @@ -189,18 +189,6 @@ __noreturn __no_sanitize_address void barebox_non_pbl_start(unsigned long membas } else if (blob_is_arm_boarddata(boarddata)) { totalsize = sizeof(struct barebox_arm_boarddata); name = "machine type"; - } else if ((unsigned long)boarddata < 8192) { - struct barebox_arm_boarddata *bd; - uint32_t machine_type = (unsigned long)boarddata; - unsigned long mem = arm_mem_boarddata(membase, endmem, - sizeof(*bd)); - pr_debug("found machine type %d in boarddata\n", - machine_type); - bd = barebox_boarddata = (void *)mem; - barebox_boarddata_size = sizeof(*bd); - bd->magic = BAREBOX_ARM_BOARDDATA_MAGIC; - bd->machine = machine_type; - malloc_end = mem; } if (totalsize) { -- 2.30.2