Re: arm64 mrs and system registers

From: Warner Losh <imp_at_bsdimp.com>
Date: Mon, 08 Apr 2024 20:31:17 UTC
On Mon, Apr 8, 2024 at 9:03 PM Paul Floyd <pjfloyd@wanadoo.fr> wrote:

> Hi
>
> I've been looking at this bugzilla item
>
> https://bugs.kde.org/show_bug.cgi?id=392146
>
> Is there any difference between Linux and FreeBSD when it comes to what
> registers and fields are exposed by the kernel (see comment 17 in the
> link above).
>

I don't think so. We've not seen issues with other drivers on aarch64 except
when they were written on x86 and didn't have the synchronization needed
for the weaker memory models in aarch64 systems.


> I did have a poke around the kernel code but it's a bit hard to tell
> exactly which of the access macros are being used, without exhaustively
> grepping for them one by one.
>

Yea, I think that there's missing atomics on the state transitions and/or
some missing locking that "magically" provides barriers that make it work
on x86.

Warner