Print this page
PSARC 2009/104 Hot-Plug Support for ACPI-based Systems
6846955 Device tree creation and acpi virtual nexus driver for acpi based x86 systems
6849408 device match rule in ppm.conf is not flexible
@@ -17,16 +17,14 @@
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* ppm driver subroutines
*/
#include <sys/open.h>
@@ -397,10 +395,13 @@
ppm_lookup_dev(dev_info_t *dip)
{
char path[MAXNAMELEN];
ppm_domain_t *domp;
ppm_db_t *dbp;
+#ifdef __x86
+ char *devtype = NULL;
+#endif /* __x86 */
PPM_GET_PATHNAME(dip, path);
for (domp = ppm_domain_p; domp; domp = domp->next) {
if (PPM_DOMAIN_UP(domp)) {
for (dbp = domp->conflist; dbp; dbp = dbp->next) {
@@ -409,10 +410,29 @@
* its full name
*/
if (dip == ddi_root_node() &&
strcmp(dbp->name, "/") == 0)
return (domp);
+
+#ifdef __x86
+ /*
+ * Special rule to catch all CPU devices on x86.
+ */
+ if (domp->model == PPMD_CPU &&
+ strcmp(dbp->name, "/") == 0 &&
+ ddi_prop_lookup_string(DDI_DEV_T_ANY, dip,
+ DDI_PROP_DONTPASS, "device_type",
+ &devtype) == DDI_SUCCESS) {
+ if (strcmp(devtype, "cpu") == 0) {
+ ddi_prop_free(devtype);
+ return (domp);
+ } else {
+ ddi_prop_free(devtype);
+ }
+ }
+#endif /* __x86 */
+
if (ppm_match_devs(path, dbp) == 0)
return (domp);
}
}
}