lkml.org 
[lkml]   [2021]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arm64/cpuinfo: Show right CPU architecture information
On Tue, Jan 19, 2021 at 06:55:10PM +0800, Liguang Zhang wrote:
> CPU architecture is assigned to be a fixed value, it should be obtained
> from midr register.
>
> Signed-off-by: Liguang Zhang <zhangliguang@linux.alibaba.com>
> ---
> arch/arm64/kernel/cpuinfo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> index 77605aec25fe..0bd11e0fe9f2 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -191,7 +191,7 @@ static int c_show(struct seq_file *m, void *v)
>
> seq_printf(m, "CPU implementer\t: 0x%02x\n",
> MIDR_IMPLEMENTOR(midr));
> - seq_printf(m, "CPU architecture: 8\n");
> + seq_printf(m, "CPU architecture: %d\n", MIDR_ARCHITECTURE(midr));

Huh? Won't this always return 0xf?

Will

\
 
 \ /
  Last update: 2021-01-19 14:41    [W:0.242 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site