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: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/4] ARM64: qemu-virt64: remove dead CPU identification code
Date: Mon,  8 Mar 2021 20:32:11 +0100	[thread overview]
Message-ID: <20210308193214.32573-1-a.fatoum@pengutronix.de> (raw)

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


             reply	other threads:[~2021-03-08 19:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 19:32 Ahmad Fatoum [this message]
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

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=20210308193214.32573-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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