mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: bst@pengutronix.de, lst@pengutronix.de,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [RFT PATCH 2/2] ARM: start: drop support for machine type casted to boarddata pointer
Date: Mon, 10 Oct 2022 08:12:35 +0200	[thread overview]
Message-ID: <20221010061235.2084562-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20221010061235.2084562-1-a.fatoum@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 <a.fatoum@pengutronix.de>
---
 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




  reply	other threads:[~2022-10-10  6:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10  6:12 [RFT PATCH master 1/2] ARM: MXS: fix breakage for non-DT boards Ahmad Fatoum
2022-10-10  6:12 ` Ahmad Fatoum [this message]
2022-10-10  9:53 ` Bastian Krause

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221010061235.2084562-2-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=bst@pengutronix.de \
    --cc=lst@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox