Re: [PATCH v2] loongarch/mm: disable WUC for pgprot_writecombine as same as ioremap_wc

From: Xi Ruoyao
Date: Fri Oct 13 2023 - 09:53:34 EST


On Fri, 2023-10-13 at 21:15 +0800, Xi Ruoyao wrote:
> Again, why this is only an issue with AMD or ATI GPUs?
>
> Can you provide some detailed documentations about this hardware issue
> so the community can help to figure out a solution?

3 years ago we had https://lkml.org/lkml/2020/8/10/255:

In this case the patch is a clear NAK since you haven't root caused the
issue and are just working around it in a very questionable manner.

and

But when the hardware doesn't correctly implement WC for PCIe BARs, then
this is a violation of the PCIe spec and a bit more serious issue for
the whole platform.

So do we know the root cause now? <rant>Or in all the 3 years we just
keep carrying a problematic workaround downstream, burying the head into
the sand like an ostrich, and self comforting with "oh they don't
understand our hardware"?!</rant>

Even if the problem is really "they don't understand our hardware" you
need to provide some materials to help people understanding the hardware
better.

If we cannot figure out the root cause or a proper fix is too difficult,
we should *at least* have a cmdline option and/or a configuration option
to allow the user to decide, like how we treat these spectre-like bugs.
"Should the option be enabled or disabled by default" can be debated
later.

And please try to fix the hardware, to me it will be a compelling reason
to pay some money for an upgrade :).

--
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University