Use M_NOWAIT when allocating memory for the ACPI wakeup handler.

If the allocation attempt fails, we may otherwise VM_WAIT after a failed
attempt to reclaim contiguous memory in the requested range. After r297466,
this results in the thread going to sleep, causing a hang during boot.

Reviewed by:	jkim, kib
Approved by:	re (gjb)
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D6945
This commit is contained in:
Mark Johnston 2016-06-23 19:24:38 +00:00
parent 948c30e565
commit c722a89a63
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=302147

View File

@ -322,7 +322,7 @@ acpi_alloc_wakeup_handler(void)
* page-aligned.
*/
wakeaddr = contigmalloc((ACPI_PAGETABLES + 1) * PAGE_SIZE, M_DEVBUF,
M_WAITOK, 0x500, 0xa0000, PAGE_SIZE, 0ul);
M_NOWAIT, 0x500, 0xa0000, PAGE_SIZE, 0ul);
if (wakeaddr == NULL) {
printf("%s: can't alloc wake memory\n", __func__);
return (NULL);