]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vm_kern: Avoid sign extension in the KVA_QUANTUM definition
authorMark Johnston <markj@FreeBSD.org>
Mon, 22 Feb 2021 20:50:09 +0000 (15:50 -0500)
committerMark Johnston <markj@FreeBSD.org>
Thu, 25 Feb 2021 15:54:17 +0000 (10:54 -0500)
commit5ad3a9988cc89e41f4c471d7ca5d8b19d216144f
treede623e4a0b733a319c0b4b474edcd6fa4a369920
parent8305d6906fe983ae470184127b5e42cc6f91493a
vm_kern: Avoid sign extension in the KVA_QUANTUM definition

Otherwise, on a powerpc64 NUMA system with hashed page tables, the
first-level superpage reservation size is large enough that the value of
the kernel KVA arena import quantum, KVA_NUMA_IMPORT_QUANTUM, is
negative and gets sign-extended when passed to vmem_set_import().  This
results in a boot-time hang on such platforms.

Approved by: re (gjb)
Reported by: bdragon

(cherry picked from commit 23e875fd97fb9f17b3f5dc2b26082f25e1a86b6f)
(cherry picked from commit 0486986ad81dbbfca291acf5b15f94d67d8a61bd)
sys/vm/vm_kern.c