Author: cem
Date: Fri Oct 18 03:01:21 2019
New Revision: 353714
URL: https://svnweb.freebsd.org/changeset/base/353714

Log:
  nvdimm_e820: Fix braino in size=all SPA hint
  
  The sentinel value for "use the rest of the region," -1, isn't zero modulo
  PAGE_SIZE.  Relax the check to permit the intended special value.
  
  X-MFC-With:   r353110
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/dev/nvdimm/nvdimm_e820.c

Modified: head/sys/dev/nvdimm/nvdimm_e820.c
==============================================================================
--- head/sys/dev/nvdimm/nvdimm_e820.c   Fri Oct 18 02:25:30 2019        
(r353713)
+++ head/sys/dev/nvdimm/nvdimm_e820.c   Fri Oct 18 03:01:21 2019        
(r353714)
@@ -138,8 +138,8 @@ nvdimm_e820_create_spas(device_t dev)
 
                hintaddr = (vm_paddr_t)hintaddrl;
                hintsize = (vm_size_t)hintsizel;
-               if ((hintaddr & PAGE_MASK) != 0 || (hintsize & PAGE_MASK) != 0)
-               {
+               if ((hintaddr & PAGE_MASK) != 0 ||
+                   ((hintsize & PAGE_MASK) != 0 && hintsize != HINT_ALL)) {
                        device_printf(dev, "hint.nvdimm_spa.%u addr or size "
                            "not page aligned\n", i);
                        continue;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to