mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/4] ARM64: qemu-virt64: remove dead CPU identification code
@ 2021-03-08 19:32 Ahmad Fatoum
  2021-03-08 19:32 ` [PATCH 2/4] ARM64: qemu-virt64: migrate to generic DT image Ahmad Fatoum
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2021-03-08 19:32 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

cpu_is_arm(cpu) masks the read_cpuid_id() return value and compares with
a CPU-specific value. The used masks for the Cortex A53/57 zeroes bits
that are set in the value, so the comparison will never return true.

In fact the compiler already optimizes it away completely, because
read_cpuid_id() is only implemented for ARM32 anyway.

Drop the dead code.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/boards/qemu-virt64/init.c |  5 -----
 arch/arm/include/asm/system_info.h | 11 -----------
 2 files changed, 16 deletions(-)

diff --git a/arch/arm/boards/qemu-virt64/init.c b/arch/arm/boards/qemu-virt64/init.c
index 19cfcae1f0d8..c2e7af77bba1 100644
--- a/arch/arm/boards/qemu-virt64/init.c
+++ b/arch/arm/boards/qemu-virt64/init.c
@@ -51,11 +51,6 @@ static int virt_core_init(void)
 {
 	char *hostname = "virt64";
 
-	if (cpu_is_cortex_a53())
-		hostname = "virt64-a53";
-	else if (cpu_is_cortex_a57())
-		hostname = "virt64-a57";
-
 	barebox_set_model("ARM QEMU virt64");
 	barebox_set_hostname(hostname);
 
diff --git a/arch/arm/include/asm/system_info.h b/arch/arm/include/asm/system_info.h
index a27b79e6dd08..1e3dfc845c8d 100644
--- a/arch/arm/include/asm/system_info.h
+++ b/arch/arm/include/asm/system_info.h
@@ -42,12 +42,6 @@
 #define CPU_IS_CORTEX_A15	0x410fc0f0
 #define CPU_IS_CORTEX_A15_MASK	0xff0ffff0
 
-#define CPU_IS_CORTEX_A53	0x410fd034
-#define CPU_IS_CORTEX_A53_MASK	0xff0ffff0
-
-#define CPU_IS_CORTEX_A57	0x411fd070
-#define CPU_IS_CORTEX_A57_MASK	0xff0ffff0
-
 #define CPU_IS_PXA250		0x69052100
 #define CPU_IS_PXA250_MASK	0xfffff7f0
 
@@ -125,11 +119,6 @@
 #else
 #define ARM_ARCH CPU_ARCH_ARMv8
 #endif
-#define cpu_is_cortex_a53() cpu_is_arm(CORTEX_A53)
-#define cpu_is_cortex_a57() cpu_is_arm(CORTEX_A57)
-#else
-#define cpu_is_cortex_a53() (0)
-#define cpu_is_cortex_a57() (0)
 #endif
 
 #ifndef __ASSEMBLY__
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-11  9:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08 19:32 [PATCH 1/4] ARM64: qemu-virt64: remove dead CPU identification code Ahmad Fatoum
2021-03-08 19:32 ` [PATCH 2/4] ARM64: qemu-virt64: migrate to generic DT image Ahmad Fatoum
2021-03-09 22:39   ` [PATCH] doc: qemu-virt64: fix reST literal block syntax Roland Hieber
2021-03-08 19:32 ` [PATCH 3/4] ARM64: qemu-virt64: enable Virt IO and other useful options Ahmad Fatoum
2021-03-08 19:32 ` [PATCH 4/4] ARM64: board-dt-2nd: adopt kernel image header Ahmad Fatoum
2021-03-11  9:53 ` [PATCH 1/4] ARM64: qemu-virt64: remove dead CPU identification code Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox