[PATCH 1/4] ARM64: qemu-virt64: remove dead CPU identification code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux