From owner-svn-src-stable@FreeBSD.ORG Thu Feb 23 22:26:15 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F127106564A; Thu, 23 Feb 2012 22:26:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 846038FC08; Thu, 23 Feb 2012 22:26:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NMQFnP028328; Thu, 23 Feb 2012 22:26:15 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NMQFAB028321; Thu, 23 Feb 2012 22:26:15 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232226.q1NMQFAB028321@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 22:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232086 - stable/9/sys/dev/acpica X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 22:26:15 -0000 Author: jkim Date: Thu Feb 23 22:26:14 2012 New Revision: 232086 URL: http://svn.freebsd.org/changeset/base/232086 Log: MFC: r231161 - Give all clocks and timers on acpi0 the equal probing order. - Increase probing order for ECDT table to match HID-based probing. - Decrease probing order for HPET table to match HID-based probing. - Decrease probing order for CPUs and system resources. - Fix ACPI_DEV_BASE_ORDER to reflect the reality. Modified: stable/9/sys/dev/acpica/acpi.c stable/9/sys/dev/acpica/acpi_ec.c stable/9/sys/dev/acpica/acpi_hpet.c stable/9/sys/dev/acpica/acpi_timer.c stable/9/sys/dev/acpica/acpivar.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/acpica/acpi.c ============================================================================== --- stable/9/sys/dev/acpica/acpi.c Thu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpi.c Thu Feb 23 22:26:14 2012 (r232086) @@ -1815,23 +1815,29 @@ acpi_probe_children(device_t bus) static void acpi_probe_order(ACPI_HANDLE handle, int *order) { - ACPI_OBJECT_TYPE type; + ACPI_OBJECT_TYPE type; - /* - * 1. CPUs - * 2. I/O port and memory system resource holders - * 3. Embedded controllers (to handle early accesses) - * 4. PCI Link Devices - */ - AcpiGetType(handle, &type); - if (type == ACPI_TYPE_PROCESSOR) - *order = 1; - else if (acpi_MatchHid(handle, "PNP0C01") || acpi_MatchHid(handle, "PNP0C02")) - *order = 2; - else if (acpi_MatchHid(handle, "PNP0C09")) - *order = 3; - else if (acpi_MatchHid(handle, "PNP0C0F")) - *order = 4; + /* + * 0. CPUs + * 1. I/O port and memory system resource holders + * 2. Clocks and timers (to handle early accesses) + * 3. Embedded controllers (to handle early accesses) + * 4. PCI Link Devices + */ + AcpiGetType(handle, &type); + if (type == ACPI_TYPE_PROCESSOR) + *order = 0; + else if (acpi_MatchHid(handle, "PNP0C01") || + acpi_MatchHid(handle, "PNP0C02")) + *order = 1; + else if (acpi_MatchHid(handle, "PNP0100") || + acpi_MatchHid(handle, "PNP0103") || + acpi_MatchHid(handle, "PNP0B00")) + *order = 2; + else if (acpi_MatchHid(handle, "PNP0C09")) + *order = 3; + else if (acpi_MatchHid(handle, "PNP0C0F")) + *order = 4; } /* @@ -1892,7 +1898,7 @@ acpi_probe_child(ACPI_HANDLE handle, UIN * resources). */ ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "scanning '%s'\n", handle_str)); - order = level * 10 + 100; + order = level * 10 + ACPI_DEV_BASE_ORDER; acpi_probe_order(handle, &order); child = BUS_ADD_CHILD(bus, order, NULL, -1); if (child == NULL) Modified: stable/9/sys/dev/acpica/acpi_ec.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_ec.c Thu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpi_ec.c Thu Feb 23 22:26:14 2012 (r232086) @@ -295,7 +295,7 @@ acpi_ec_ecdt_probe(device_t parent) } /* Create the child device with the given unit number. */ - child = BUS_ADD_CHILD(parent, 0, "acpi_ec", ecdt->Uid); + child = BUS_ADD_CHILD(parent, 3, "acpi_ec", ecdt->Uid); if (child == NULL) { printf("%s: can't add child\n", __func__); return; Modified: stable/9/sys/dev/acpica/acpi_hpet.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_hpet.c Thu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpi_hpet.c Thu Feb 23 22:26:14 2012 (r232086) @@ -342,7 +342,7 @@ hpet_identify(driver_t *driver, device_t if (found) continue; /* If not - create it from table info. */ - child = BUS_ADD_CHILD(parent, ACPI_DEV_BASE_ORDER, "hpet", 0); + child = BUS_ADD_CHILD(parent, 2, "hpet", 0); if (child == NULL) { printf("%s: can't add child\n", __func__); continue; Modified: stable/9/sys/dev/acpica/acpi_timer.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_timer.c Thu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpi_timer.c Thu Feb 23 22:26:14 2012 (r232086) @@ -128,7 +128,7 @@ acpi_timer_identify(driver_t *driver, de acpi_timer_dev) return_VOID; - if ((dev = BUS_ADD_CHILD(parent, 0, "acpi_timer", 0)) == NULL) { + if ((dev = BUS_ADD_CHILD(parent, 2, "acpi_timer", 0)) == NULL) { device_printf(parent, "could not add acpi_timer0\n"); return_VOID; } Modified: stable/9/sys/dev/acpica/acpivar.h ============================================================================== --- stable/9/sys/dev/acpica/acpivar.h Thu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpivar.h Thu Feb 23 22:26:14 2012 (r232086) @@ -472,7 +472,7 @@ ACPI_HANDLE acpi_GetReference(ACPI_HANDL * probe order sorted so that things like sysresource are available before * their children need them. */ -#define ACPI_DEV_BASE_ORDER 10 +#define ACPI_DEV_BASE_ORDER 100 /* Default maximum number of tasks to enqueue. */ #ifndef ACPI_MAX_TASKS