aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_power.c
Commit message (Collapse)AuthorAgeFilesLines
* sys/kern: adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326271
* General consensus is that it would be even better to run this in aWarner Losh2005-11-091-1/+1
| | | | | | | | | | | thread context. While it doesn't matter too much at the moment, in the future we could be back in the same boat if/when more restrictions are placed (or enforced) in a SWI. Suggested by: njl, bde, jhb, scottl Notes: svn path=/head/; revision=152248
* Use intptr_t casts to convert void * <--> int to make 64-bit archs happy.John Baldwin2005-11-091-2/+2
| | | | Notes: svn path=/head/; revision=152246
* Kick off the suspend sequence from the keyboard in a SWI rather thanWarner Losh2005-11-091-2/+13
| | | | | | | | | | | | | | in the hardware interrupt context (even if it is likely just an ithread). We don't document that suspend/resume routines are run from such a context and some of the things that happen in those routines aren't interrupt safe. Since there's no real need to run from that context, this restores assumptions that suspend routines have made. This fixes Thierry Herbelot's 'Trying to sleep while sleeping is prohibited' problem. Notes: svn path=/head/; revision=152222
* Move the kernel power change printf under bootverbose since theNate Lawson2004-01-021-2/+5
| | | | | | | power_profile script now duplicates the message via syslog. Notes: svn path=/head/; revision=124079
* Use __FBSDID().David E. O'Brien2003-06-111-2/+3
| | | | Notes: svn path=/head/; revision=116182
* Use ISO 9X variadic macro format; arguments are not optional, justMark Murray2002-07-151-1/+1
| | | | | | | variable. Notes: svn path=/head/; revision=100112
* Add generalized power profile code.Mitsuru IWASAKI2002-03-041-0/+31
| | | | | | | | | | | | | | | | This makes other power-management system (APM for now) to be able to generate power profile change events (ie. AC-line status changes), and other kernel components, not only the ACPI components, can be notified the events. - move subroutines in acpi_powerprofile.c (removed) to kern/subr_power.c - call power_profile_set_state() also from APM driver when AC-line status changes - add call-back function for Crusoe LongRun controlling on power profile changes for a example Notes: svn path=/head/; revision=91640
* Some fix for the recent apm module changes.Mitsuru IWASAKI2001-11-011-0/+76
- Now that apm loadable module can inform its existence to other kernel components (e.g. i386/isa/clock.c:startrtclock()'s TCS hack). - Exchange priority of SI_SUB_CPU and SI_SUB_KLD for above purpose. - Add simple arbitration mechanism for APM vs. ACPI. This prevents the kernel enables both of them. - Remove obsolete `#ifdef DEV_APM' related code. - Add abstracted interface for Powermanagement operations. Public apm(4) functions, such as apm_suspend(), should be replaced new interfaces. Currently only power_pm_suspend (successor of apm_suspend) is implemented. Reviewed by: peter, arch@ and audit@ Notes: svn path=/head/; revision=85835