From owner-svn-src-all@FreeBSD.ORG Sat Sep 20 04:31:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0885A563; Sat, 20 Sep 2014 04:31:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE49C8A8; Sat, 20 Sep 2014 04:31:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8K4VC6h050708; Sat, 20 Sep 2014 04:31:12 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8K4VCDa050706; Sat, 20 Sep 2014 04:31:12 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409200431.s8K4VCDa050706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 20 Sep 2014 04:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271889 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Sat, 20 Sep 2014 04:31:13 -0000 Author: adrian Date: Sat Sep 20 04:31:12 2014 New Revision: 271889 URL: http://svnweb.freebsd.org/changeset/base/271889 Log: Populate the device info string with _PXM (proximity domain) information. This is primarily useful for debugging right now - it'll show up in devinfo. Reviewed by: jhb Modified: head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_pci.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Sat Sep 20 02:35:21 2014 (r271888) +++ head/sys/dev/acpica/acpi.c Sat Sep 20 04:31:12 2014 (r271889) @@ -851,11 +851,18 @@ acpi_child_location_str_method(device_t size_t buflen) { struct acpi_device *dinfo = device_get_ivars(child); + char buf2[32]; + int pxm; - if (dinfo->ad_handle) - snprintf(buf, buflen, "handle=%s", acpi_name(dinfo->ad_handle)); - else - snprintf(buf, buflen, "unknown"); + if (dinfo->ad_handle) { + snprintf(buf, buflen, "handle=%s", acpi_name(dinfo->ad_handle)); + if (ACPI_SUCCESS(acpi_GetInteger(dinfo->ad_handle, "_PXM", &pxm))) { + snprintf(buf2, 32, " _PXM=%d", pxm); + strlcat(buf, buf2, buflen); + } + } else { + snprintf(buf, buflen, "unknown"); + } return (0); } Modified: head/sys/dev/acpica/acpi_pci.c ============================================================================== --- head/sys/dev/acpica/acpi_pci.c Sat Sep 20 02:35:21 2014 (r271888) +++ head/sys/dev/acpica/acpi_pci.c Sat Sep 20 04:31:12 2014 (r271889) @@ -149,12 +149,19 @@ acpi_pci_child_location_str_method(devic size_t buflen) { struct acpi_pci_devinfo *dinfo = device_get_ivars(child); + int pxm; + char buf2[32]; pci_child_location_str_method(cbdev, child, buf, buflen); - + if (dinfo->ap_handle) { - strlcat(buf, " handle=", buflen); - strlcat(buf, acpi_name(dinfo->ap_handle), buflen); + strlcat(buf, " handle=", buflen); + strlcat(buf, acpi_name(dinfo->ap_handle), buflen); + + if (ACPI_SUCCESS(acpi_GetInteger(dinfo->ap_handle, "_PXM", &pxm))) { + snprintf(buf2, 32, " _PXM=%d", pxm); + strlcat(buf, buf2, buflen); + } } return (0); }