Re: [PATCH v2 1/3] x86/devmem: Remove duplicate range_is_allowed() definition
From: Dan Williams
Date: Thu Apr 17 2025 - 14:34:23 EST
Naveen N Rao wrote:
[..]
> > The pat_enabled check was originally added as a *bypass* of additional
> > logic in phys_mem_access_prot_allowed() [1] to validate that /dev/mem was
> > establishing compatible mappings of "System-RAM" via /dev/mem. This
> > patch maintains that expectation that phys_mem_access_prot_allowed()
> > returns immediately when there is no potential cache conflict.
>
> Thanks for the background, that makes sense.
>
> Do we also no longer need the devmem_is_allowed() checks in pat.c if PAT
> is enabled and !CONFIG_STRICT_DEVMEM?
The only one that is left is the one in phys_mem_access_prot_allowed()
and that one properly compiles away to nothing in the
!CONFIG_STRICT_DEVMEM case.