Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Oct 2021 13:15:50 -0700
From:      John Baldwin <jhb@FreeBSD.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Warner Losh <imp@freebsd.org>, src-committers <src-committers@freebsd.org>, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 7881db834647 - main - Remove POWER_PM_TYPE_APM. It's now unused.
Message-ID:  <f13cc1dc-1435-76b8-ab4b-0670839ec7c4@FreeBSD.org>
In-Reply-To: <CANCZdfqPD3UCJQzfRE61j_YC713MonbWHZe5OEP=p1Aj2zZC3w@mail.gmail.com>
References:  <202110181445.19IEj36g019473@gitrepo.freebsd.org> <cbce2b0f-37ab-7b6e-29aa-28452e9167a4@FreeBSD.org> <CANCZdfqPD3UCJQzfRE61j_YC713MonbWHZe5OEP=p1Aj2zZC3w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/18/21 9:50 AM, Warner Losh wrote:
> On Mon, Oct 18, 2021 at 10:37 AM John Baldwin <jhb@freebsd.org> wrote:
> 
>> On 10/18/21 7:45 AM, Warner Losh wrote:
>>> The branch main has been updated by imp:
>>>
>>> URL:
>> https://cgit.FreeBSD.org/src/commit/?id=7881db83464759ba783454d2d2eb1b970e352cd3
>>>
>>> commit 7881db83464759ba783454d2d2eb1b970e352cd3
>>> Author:     Warner Losh <imp@FreeBSD.org>
>>> AuthorDate: 2021-10-18 14:41:17 +0000
>>> Commit:     Warner Losh <imp@FreeBSD.org>
>>> CommitDate: 2021-10-18 14:41:17 +0000
>>>
>>>       Remove POWER_PM_TYPE_APM. It's now unused.
>>>
>>>       Sponsored by:           Netflix
>>>       Reviewed by:            markj
>>>       Differential Revision:  https://reviews.freebsd.org/D32549
>>> ---
>>>    sys/sys/power.h | 1 -
>>>    1 file changed, 1 deletion(-)
>>>
>>> diff --git a/sys/sys/power.h b/sys/sys/power.h
>>> index 524bc3fabb24..b0535312d1f7 100644
>>> --- a/sys/sys/power.h
>>> +++ b/sys/sys/power.h
>>> @@ -34,7 +34,6 @@
>>>    #include <sys/_eventhandler.h>
>>>
>>>    /* Power management system type */
>>> -#define POWER_PM_TYPE_APM            0x00
>>>    #define POWER_PM_TYPE_ACPI          0x01
>>>    #define POWER_PM_TYPE_NONE          0xff
>>
>> Do we want to leave a comment that 0x00 was previously used?  I don't know
>> if we ever
>> exposed this value to userland as part of any ABI?
>>
> 
> Good question, but I believe the answer is no.
> 
> power_pm_type is static in sys/kern/subr_power.c. It's only exported from
> that module
> with power_pm_get_type(). This is only called from acpi.c to make decisions
> about
> whether or not to load, attach, or identify devices. There's also no sysctl
> that publish
> this, nor is this value used in userland in base. The whole sys/power.h
> file has the look
> of an internal kernel file because there's no #ifdef _KERNEL section around
> all the
> prototypes it defines.
> 
> Have I missed something?

No, that sounds about right.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f13cc1dc-1435-76b8-ab4b-0670839ec7c4>