Skip to contentSkip to conversation

arm: boot: head-sharpsl.S: don't rely on MACH_TYPE_* of removed boards

PATCH New Ethan Nelson-Moore 1 participant 1 message May 9 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: boot: head-sharpsl.S: don't rely on MACH_TYPE_* of removed boards

Code in head-sharpsl.S relies on the MACH_TYPE_* constants for five boards that are no longer supported by the kernel. They were removed in commit d6df7df7ae5a ("ARM: pxa: remove unused board files"). This prevents the removal of boards no longer present in the kernel from mach-types. Replace the MACH_TYPE_* references with hardcoded values. (If the IDs were simply removed, these boards would be detected as other supported machines, causing incorrect behavior. The kernel will abort on detecting an unsupported machine ID.)

---
 arch/arm/boot/compressed/head-sharpsl.S | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
arch/arm/boot/compressed/head-sharpsl.S +11 -5
index 992e784500fa..da05e01903e2 100644
@@ -103,16 +103,22 @@ __SharpSL_start:
 	.word 	0x08010000		@ w100 Chip ID Reg Address
 .SCOOP2ADDR:
 	.word	0x08800040
+/*
+ * These five machines are no longer supported by the kernel, but if checks for
+ * them were removed, they would be detected as other supported machines,
+ * causing incorrect behavior. The kernel will abort on detecting an unsupported
+ * machine ID.
+ */
 .POODLEID:
-	.word	MACH_TYPE_POODLE
+	.word	424			@ MACH_TYPE_POODLE
 .CORGIID:
-	.word	MACH_TYPE_CORGI
+	.word	423			@ MACH_TYPE_CORGI
 .SHEPHERDID:
-	.word	MACH_TYPE_SHEPHERD
+	.word	545			@ MACH_TYPE_SHEPHERD
 .HUSKYID:
-	.word	MACH_TYPE_HUSKY
+	.word	543			@ MACH_TYPE_HUSKY
 .TOSAID:
-	.word	MACH_TYPE_TOSA
+	.word	520			@ MACH_TYPE_TOSA
 .SPITZID:
 	.word	MACH_TYPE_SPITZ
 .AKITAID:
Signature · 1 line
2.43.0