[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAhV-H6sxNEOd-gBBkoWrVaicSviz9Qm1Srez9Qg0RP75jHy5w@mail.gmail.com>
Date: Thu, 29 Sep 2022 17:23:49 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Jianmin Lv <lvjianmin@...ngson.cn>
Cc: WANG Xuerui <kernel@...0n.name>, linux-kernel@...r.kernel.org,
loongarch@...ts.linux.dev
Subject: Re: [PATCH V4] LoongArch: Fix cpu name after s3/s4
Queued for loongarch-next since I have already sent the last PR for
6.0-final, thanks.
Huacai
On Thu, Sep 29, 2022 at 5:15 PM Jianmin Lv <lvjianmin@...ngson.cn> wrote:
>
> Don't overwrite the CPU name on coming back from S3/S4 if
> it is already initialized.
>
> Signed-off-by: Jianmin Lv <lvjianmin@...ngson.cn>
>
> diff --git a/arch/loongarch/kernel/cpu-probe.c b/arch/loongarch/kernel/cpu-probe.c
> index 529ab8f44ec6..255a09876ef2 100644
> --- a/arch/loongarch/kernel/cpu-probe.c
> +++ b/arch/loongarch/kernel/cpu-probe.c
> @@ -187,7 +187,9 @@ static inline void cpu_probe_loongson(struct cpuinfo_loongarch *c, unsigned int
> uint64_t *vendor = (void *)(&cpu_full_name[VENDOR_OFFSET]);
> uint64_t *cpuname = (void *)(&cpu_full_name[CPUNAME_OFFSET]);
>
> - __cpu_full_name[cpu] = cpu_full_name;
> + if (!__cpu_full_name[cpu])
> + __cpu_full_name[cpu] = cpu_full_name;
> +
> *vendor = iocsr_read64(LOONGARCH_IOCSR_VENDOR);
> *cpuname = iocsr_read64(LOONGARCH_IOCSR_CPUNAME);
>
> --
> 2.31.1
>
Powered by blists - more mailing lists