mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/4] ARM64: qemu-virt64: remove dead CPU identification code
Date: Thu, 11 Mar 2021 10:53:30 +0100	[thread overview]
Message-ID: <20210311095330.GC23724@pengutronix.de> (raw)
In-Reply-To: <20210308193214.32573-1-a.fatoum@pengutronix.de>

On Mon, Mar 08, 2021 at 08:32:11PM +0100, Ahmad Fatoum wrote:
> 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(-)

Applied, thanks

Sascha

> 
> 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
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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


      parent reply	other threads:[~2021-03-11  9:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
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 ` Sascha Hauer [this message]

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=20210311095330.GC23724@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=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