From owner-freebsd-acpi@FreeBSD.ORG Wed Jun 20 16:44:47 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 790F0106566C; Wed, 20 Jun 2012 16:44:47 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id 2419C8FC17; Wed, 20 Jun 2012 16:44:47 +0000 (UTC) Received: from [IPv6:::1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q5KGi8qI031100; Wed, 20 Jun 2012 09:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1340210649; bh=ty5wrM8xyapNlyQqA2HCMe+hA/5p8YRGof/78+uP004=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=w1P1ebKp3knfFbe86Fh4h7skiTIWFmpzMF3Fz0zfyFRch2uW1zdHOBVjbf4B8I8DA yYbns6DBLm3ir+c8uePpjEJ+0tgpFBAjsO35EF6RT0i/52fQFUZt+MP80GaKEB0Jrr 1/NsNahQts3aVPymDp6YJi5imCJrMeYpKw0dbL24= From: Sean Bruno To: "sbruno@freebsd.org" In-Reply-To: <1340121728.5203.8.camel@powernoodle> References: <1340121728.5203.8.camel@powernoodle> Content-Type: text/plain; charset="UTF-8" Date: Wed, 20 Jun 2012 09:44:08 -0700 Message-ID: <1340210648.2858.9.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 210649002 Cc: "freebsd-acpi@freebsd.org" Subject: Re: [CFT] Sparse Cstate Support -- Its possible, that I don't know what I'm doing. X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2012 16:44:47 -0000 On Tue, 2012-06-19 at 09:02 -0700, Sean Bruno wrote: > http://people.freebsd.org/~sbruno/acpi_cpu_cstate_sparse.txt also, I wanted to point out that I'm returning BUS_PROBE_GENERIC here. I want to emulate the Intel acpi_idle code that exists in linux-land and I *thought* that I could setup an acpi_cpu_idle module that would come in at a higher priority on Intel cpus, however there's some SYSINIT() hackery going on that I don't know how to handle gracefully. I'm not sure how to proceed with a different idle module here. thoughts? e.g. static void acpi_cpu_postattach(void *unused __unused) { device_t *devices; int err; int i, n; err = devclass_get_devices(acpi_cpu_devclass, &devices, &n); if (err != 0) { printf("devclass_get_devices(acpi_cpu_devclass) failed\n"); return; } for (i = 0; i < n; i++) bus_generic_probe(devices[i]); for (i = 0; i < n; i++) bus_generic_attach(devices[i]); free(devices, M_TEMP); } SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, acpi_cpu_postattach, NULL);