amd64/pmap: unbreak !NUMA case for fictitious pages

A fictitious page can have a physical address beyond the end of the RAM.
In the NUMA case there is some special code to handle such pages, but in
the other case the pages are handled the same as normal pages.  So, we
cannot assert that the physical address is within RAM addresses.

Suggested by:	kib
Reviewed by:	kib
X-MFC note:	NUMA support has not been MFC-ed
This commit is contained in:
Andriy Gapon 2020-05-12 09:31:48 +00:00
parent 54904c38f8
commit c4b4e8cd4e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=360957

View File

@ -323,12 +323,12 @@ pmap_pku_mask_bit(pmap_t pmap)
#endif
#undef pa_index
#ifdef NUMA
#define pa_index(pa) ({ \
KASSERT((pa) <= vm_phys_segs[vm_phys_nsegs - 1].end, \
("address %lx beyond the last segment", (pa))); \
(pa) >> PDRSHIFT; \
})
#ifdef NUMA
#define pa_to_pmdp(pa) (&pv_table[pa_index(pa)])
#define pa_to_pvh(pa) (&(pa_to_pmdp(pa)->pv_page))
#define PHYS_TO_PV_LIST_LOCK(pa) ({ \
@ -340,6 +340,7 @@ pmap_pku_mask_bit(pmap_t pmap)
_lock; \
})
#else
#define pa_index(pa) ((pa) >> PDRSHIFT)
#define pa_to_pvh(pa) (&pv_table[pa_index(pa)])
#define NPV_LIST_LOCKS MAXCPU