Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Sep 2018 18:01:15 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r338694 - stable/11/sys/arm/arm
Message-ID:  <201809151801.w8FI1FXd040112@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Sat Sep 15 18:01:15 2018
New Revision: 338694
URL: https://svnweb.freebsd.org/changeset/base/338694

Log:
  MFC r338537, r338539:
  Bump MAX_HWCNT and MAX_EXCNT.

Modified:
  stable/11/sys/arm/arm/physmem.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/arm/arm/physmem.c
==============================================================================
--- stable/11/sys/arm/arm/physmem.c	Sat Sep 15 13:07:43 2018	(r338693)
+++ stable/11/sys/arm/arm/physmem.c	Sat Sep 15 18:01:15 2018	(r338694)
@@ -46,8 +46,8 @@ __FBSDID("$FreeBSD$");
  * that can be allocated, or both, depending on the exclusion flags associated
  * with the region.
  */
-#define	MAX_HWCNT	10
-#define	MAX_EXCNT	10
+#define	MAX_HWCNT	16
+#define	MAX_EXCNT	16
 
 #define	MAX_PHYS_ADDR	0xFFFFFFFFull
 
@@ -326,7 +326,8 @@ arm_physmem_hardware_region(uint64_t pa, uint64_t sz)
 /*
  * Add an exclusion region.
  */
-void arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t exflags)
+void
+arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t exflags)
 {
 	vm_offset_t adj;
 
@@ -338,8 +339,10 @@ void arm_physmem_exclude_region(vm_paddr_t pa, vm_size
 	pa  = trunc_page(pa);
 	sz  = round_page(sz + adj);
 
-	if (excnt < nitems(exregions))
-		insert_region(exregions, excnt++, pa, sz, exflags);
+	if (excnt >= nitems(exregions))
+		panic("failed to exclude region %#jx-%#jx", (uintmax_t)pa,
+		    (uintmax_t)(pa + sz));
+	insert_region(exregions, excnt++, pa, sz, exflags);
 }
 
 /*



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