From owner-freebsd-acpi@FreeBSD.ORG Tue Aug 16 17:59:49 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 77D4016A41F; Tue, 16 Aug 2005 17:59:49 +0000 (GMT) (envelope-from nate@root.org) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23B0543D46; Tue, 16 Aug 2005 17:59:49 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.33] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j7GHxoo5026695 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 16 Aug 2005 10:59:51 -0700 Message-ID: <4302298F.6080407@root.org> Date: Tue, 16 Aug 2005 10:59:43 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Hajimu UMEMOTO References: <20050814023842.C0D845D07@ptavv.es.net> <4300C5DF.40409@root.org> <43013C90.7040901@root.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: acpi@freebsd.org Subject: Re: Annoyances with passive thermal code (acpi_thermal) 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: Tue, 16 Aug 2005 17:59:49 -0000 Hajimu UMEMOTO wrote: > No, I need to save a cpu level only when raising prio to PRIO_KERN > from lower prio. But, I realized that my privious patch was > insufficient. If dev.cpu.0.freq was not set by sysctl(8), cpu level > was never saved. > > Index: sys/kern/kern_cpu.c > diff -u -p sys/kern/kern_cpu.c.orig sys/kern/kern_cpu.c > --- sys/kern/kern_cpu.c.orig Mon Apr 11 04:11:23 2005 > +++ sys/kern/kern_cpu.c Tue Aug 16 14:22:10 2005 > @@ -336,7 +336,7 @@ cf_set_method(device_t dev, const struct > */ > if (sc->curr_level.total_set.freq != CPUFREQ_VAL_UNKNOWN && > sc->saved_level.total_set.freq == CPUFREQ_VAL_UNKNOWN && > - priority > sc->curr_priority) { > + priority > CPUFREQ_PRIO_USER && priority > sc->curr_priority) { > CF_DEBUG("saving level, freq %d prio %d\n", > sc->curr_level.total_set.freq, sc->curr_priority); > sc->saved_level = sc->curr_level; I'm ok with you committing this. > In anyway, we should make this as stack some day. That would be nice for the future. -- Nate