Date: Sun, 25 Aug 2019 21:01:40 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351495 - head/sys/amd64/amd64 Message-ID: <201908252101.x7PL1eu1087636@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sun Aug 25 21:01:40 2019 New Revision: 351495 URL: https://svnweb.freebsd.org/changeset/base/351495 Log: amd64: loose constraints on the APs dpcpu and nmi/dbg stack allocations. Use DOMAINSET_PREF() instead of DOMAINSET_FIXED(), to gracefully fallback in case of memory-less domain. Reported and tested by: bcran Reviewed by: markj Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/mp_machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Sun Aug 25 20:57:39 2019 (r351494) +++ head/sys/amd64/amd64/mp_machdep.c Sun Aug 25 21:01:40 2019 (r351495) @@ -483,10 +483,10 @@ native_start_all_aps(void) M_ZERO); mce_stack = (char *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO); nmi_stack = (char *)kmem_malloc_domainset( - DOMAINSET_FIXED(domain), PAGE_SIZE, M_WAITOK | M_ZERO); + DOMAINSET_PREF(domain), PAGE_SIZE, M_WAITOK | M_ZERO); dbg_stack = (char *)kmem_malloc_domainset( - DOMAINSET_FIXED(domain), PAGE_SIZE, M_WAITOK | M_ZERO); - dpcpu = (void *)kmem_malloc_domainset(DOMAINSET_FIXED(domain), + DOMAINSET_PREF(domain), PAGE_SIZE, M_WAITOK | M_ZERO); + dpcpu = (void *)kmem_malloc_domainset(DOMAINSET_PREF(domain), DPCPU_SIZE, M_WAITOK | M_ZERO); bootSTK = (char *)bootstacks[cpu] +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908252101.x7PL1eu1087636>