Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 May 2020 09:31:49 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r360957 - head/sys/amd64/amd64
Message-ID:  <202005120931.04C9Vn72090635@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Tue May 12 09:31:48 2020
New Revision: 360957
URL: https://svnweb.freebsd.org/changeset/base/360957

Log:
  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

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Tue May 12 09:04:57 2020	(r360956)
+++ head/sys/amd64/amd64/pmap.c	Tue May 12 09:31:48 2020	(r360957)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005120931.04C9Vn72090635>