From owner-svn-src-all@freebsd.org Fri Aug 11 20:46:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AC1FDC528B; Fri, 11 Aug 2017 20:46:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35F4438F4; Fri, 11 Aug 2017 20:46:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id E406010AF0F; Fri, 11 Aug 2017 16:46:49 -0400 (EDT) From: John Baldwin To: Roger Pau =?ISO-8859-1?Q?Monn=E9?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r322403 - head/sys/x86/acpica Date: Fri, 11 Aug 2017 12:14:09 -0700 Message-ID: <1711735.ULtvsIt8zT@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201708111419.v7BEJt6O018664@repo.freebsd.org> References: <201708111419.v7BEJt6O018664@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 11 Aug 2017 16:46:50 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Aug 2017 20:46:58 -0000 On Friday, August 11, 2017 02:19:55 PM Roger Pau Monn=E9 wrote: > Author: royger > Date: Fri Aug 11 14:19:55 2017 > New Revision: 322403 > URL: https://svnweb.freebsd.org/changeset/base/322403 >=20 > Log: > acpi/srat: fix build without DMAP > =20 > Use pmap_mapbios to map memory used to store the cpus array. > =20 > Reported by:=09lwhsu > X-MFC-with:=09r322348 >=20 > Modified: > head/sys/x86/acpica/srat.c >=20 > Modified: head/sys/x86/acpica/srat.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > --- head/sys/x86/acpica/srat.c=09Fri Aug 11 14:19:31 2017=09(r322402)= > +++ head/sys/x86/acpica/srat.c=09Fri Aug 11 14:19:55 2017=09(r322403)= > @@ -443,7 +443,12 @@ parse_srat(void) > =09 ("Not enough memory for SRAT table items")); > =09phys_avail[idx + 1] =3D addr - 1; > =20 > -=09cpus =3D (struct cpu_info *)PHYS_TO_DMAP(addr); > +=09/* > +=09 * We cannot rely on PHYS_TO_DMAP because this code is also used = in > +=09 * i386, so use pmap_mapbios to map the memory, this will end up = using > +=09 * the default memory attribute (WB), and the DMAP when available= . > +=09 */ > +=09cpus =3D (struct cpu_info *)pmap_mapbios(addr, size); > =20 > =09/* > =09 * Make a pass over the table to populate the cpus[] and > @@ -529,6 +534,10 @@ srat_set_cpus(void *dummy) > =09=09=09printf("SRAT: CPU %u has memory domain %d\n", i, > =09=09=09 cpu->domain); > =09} > + > +=09/* Last usage of the cpus array, unmap it. */ > +=09pmap_unmapdev((vm_offset_t)cpus, sizeof(*cpus) * (max_apic_id + 1= )); Please pair pmap_mapbios with pmap_unmapbios. --=20 John Baldwin