[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMhs-H9O=EagT-6296-CMQFBYFfekj2agrH9a8JpHzeC36EiUg@mail.gmail.com>
Date: Fri, 11 Feb 2022 07:50:29 +0100
From: Sergio Paracuellos <sergio.paracuellos@...il.com>
To: Chuanhong Guo <gch981213@...il.com>
Cc: "open list:MIPS" <linux-mips@...r.kernel.org>,
Rui Salvaterra <rsalvaterra@...il.com>,
Ilya Lipnitskiy <ilya.lipnitskiy@...il.com>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
linux-arm-kernel@...ts.infradead.org,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] MIPS: ralink: mt7621: do memory detection on KSEG1
Hi Guo,
On Fri, Feb 11, 2022 at 4:56 AM Chuanhong Guo <gch981213@...il.com> wrote:
>
> It's reported that current memory detection code occasionally detects
> larger memory under some bootloaders.
> Current memory detection code tests whether address space wraps around
> on KSEG0, which is unreliable because it's cached.
>
> Rewrite memory size detection to perform the same test on KSEG1 instead.
> While at it, this patch also does the following two things:
> 1. use a fixed pattern instead of a random function pointer as the magic
> value.
> 2. add an additional memory write and a second comparison as part of the
> test to prevent possible smaller memory detection result due to
> leftover values in memory.
>
> Fixes: 139c949f7f0a MIPS: ("ralink: mt7621: add memory detection support")
> Reported-by: Rui Salvaterra <rsalvaterra@...il.com>
> Signed-off-by: Chuanhong Guo <gch981213@...il.com>
> ---
> arch/mips/ralink/mt7621.c | 36 +++++++++++++++++++++++-------------
> 1 file changed, 23 insertions(+), 13 deletions(-)
Thanks! Nothing seems to be broken after these changes, at least for
my boards :)
Tested-by: Sergio Paracuellos <sergio.paracuellos@...il.com>
Best regards,
Sergio Paracuellos
Powered by blists - more mailing lists