[PATCH v2 04/25] mm: enhance region_is_ram() to distinguish 'unknown' vs 'mixed'

From
Toshi Kani <hidden>
Date
2015-07-28 21:34:45
Also in
linux-arch, lkml, nvdimm
Reply to
Dan Williams, 2015-07-25
On Fri, 2015-07-24 at 22:38 -0400, Dan Williams wrote:
region_is_ram() is used to prevent the establishment of aliased mappings
to physical "System RAM" with incompatible cache settings.  However, it
uses "-1" to indicate both "unknown" memory ranges (ranges not described
by platform firmware) and "mixed" ranges (where the parameters describe
a range that partially overlaps "System RAM").

Fix this up by explicitly tracking the "unknown" vs "mixed" resource
cases. In addition to clarifying that "-1" means the requested spanned
RAM and non-RAM resource, this re-write also adds support for detecting
when the requested range completely covers all of a resource.
Agreed - this is a good enhancement.
Finally, the implementation treats overlaps between "unknown" and RAM as
RAM.
This sounds right for this interface.  iomem_map_sanity_check() checks the
boundary condition with the resource table.
Cc: Toshi Kani <redacted>
Signed-off-by: Dan Williams <redacted>
The changes look good as well.

Reviewed-by: Toshi Kani <redacted>

Thanks,
-Toshi
Thread (67 messages) 67 messages, 10 authors, last reply 2016-04-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help