Bump MAX_HWCNT and MAX_EXCNT.
These limits are hit on the ThunderX. Also make arm_physmem_exclude_region() panic rather than fail silently if the limit on excluded regions is reached. PR: 231064 Reviewed by: andrew Approved by: re (kib) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17073
This commit is contained in:
parent
5a7f993702
commit
88db0afa82
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338537
@ -48,8 +48,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
|
||||
|
||||
#if defined(__arm__)
|
||||
#define MAX_PHYS_ADDR 0xFFFFFFFFull
|
||||
@ -359,7 +359,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;
|
||||
|
||||
@ -371,8 +372,9 @@ void arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t exflags)
|
||||
pa = trunc_page(pa);
|
||||
sz = round_page(sz + adj);
|
||||
|
||||
if (excnt < nitems(exregions))
|
||||
excnt = insert_region(exregions, excnt, pa, sz, exflags);
|
||||
if (excnt >= nitems(exregions))
|
||||
panic("failed to exclude region %#lx-%#lx", pa, pa + sz);
|
||||
excnt = insert_region(exregions, excnt, pa, sz, exflags);
|
||||
}
|
||||
|
||||
size_t
|
||||
|
Loading…
Reference in New Issue
Block a user