From owner-freebsd-acpi@FreeBSD.ORG Wed Jun 20 23:29:10 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD856106566C; Wed, 20 Jun 2012 23:29:10 +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 7F6578FC14; Wed, 20 Jun 2012 23:29:10 +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 q5KNSa7A071150; Wed, 20 Jun 2012 16:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1340234917; bh=p0Z153vY9sOCFsmYgLiZ2ZVqvSwf2i9Unv/Qo7sbjl4=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=VnV4cqJEzqdVX+wVYqEN9uO5SZnizcupjKue7wmOOxZPFTf/UDyEHyYRyt5DawZiW uGnq05MReko04n97uZt2fNJsqgamxUI4kEBo/R/rfdhT/OVHqCV6mdiZPEp4InlrRg o9txsPhSN/8T5qlisY+2csW0sfn1HskJ34zaHawY= From: Sean Bruno To: "sbruno@freebsd.org" In-Reply-To: <1340210648.2858.9.camel@powernoodle.corp.yahoo.com> References: <1340121728.5203.8.camel@powernoodle> <1340210648.2858.9.camel@powernoodle.corp.yahoo.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 20 Jun 2012 16:28:36 -0700 Message-ID: <1340234916.2858.29.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: 234916001 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 23:29:10 -0000 On Wed, 2012-06-20 at 09:44 -0700, Sean Bruno wrote: > 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); > > Ohhhhhh ... right. This entire idea is stupid and fully demonstrates my lack of understanding. bus_probe/attach can't be used, there's no BUS here. So, SYSINIT() to the rescue. Ok, that changes things around a lot for me. This BUS_PROBE_GENERIC idea is a dud. /me goes back to reading first and typing second Sean