On Fri, Sep 08, 2023 at 02:58:49PM +0200, Linus Walleij wrote:
> Hi Zhizhou,
>
> wow a great patch! I'm surprised no-one has been hit by this before.
> I guess we were lucky.
>
> On Thu, Sep 7, 2023 at 4:33 PM Zhizhou Zhang <[email protected]> wrote:
>
> > From: Zhizhou Zhang <[email protected]>
> >
> > flush_cache_all() save registers to stack at function entry.
> > If it's called after cache disabled, the data is written to
> > memory directly. So the following clean cache operation corrupted
> > registers saved by flush_cache_all(), including lr register.
> > calling flush_cache_all() before turn off cache fixed the problem.
> >
> > Signed-off-by: Zhizhou Zhang <[email protected]>
>
> Reviewed-by: Linus Walleij <[email protected]>
>
> I would also add
> Cc: [email protected]
>
> Then please put this into Russell's patch tracker once review
> is complete.
However, it makes a total nonsense of the comment, which explains
precisely why the flush_cache_all() is where it is. Moving it before
that comment means that the comment is now rediculous.
So, please don't put it in the patch system.
The patch certainly needs to be tested on TI Keystone which is the
primary user of this code.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!