Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153077572
D15413.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15413.diff
View Options
Index: head/sys/dev/acpica/acpi.c
===================================================================
--- head/sys/dev/acpica/acpi.c
+++ head/sys/dev/acpica/acpi.c
@@ -2958,6 +2958,7 @@
if (sc->acpi_sleep_delay > 0)
DELAY(sc->acpi_sleep_delay * 1000000);
+ suspendclock();
intr = intr_disable();
if (state != ACPI_STATE_S1) {
sleep_result = acpi_sleep_machdep(sc, state);
@@ -3028,6 +3029,8 @@
* process. This handles both the error and success cases.
*/
backout:
+ if (slp_state >= ACPI_SS_SLP_PREP)
+ resumeclock();
if (slp_state >= ACPI_SS_GPE_SET) {
acpi_wake_prep_walk(state);
sc->acpi_sstate = ACPI_STATE_S0;
Index: head/sys/kern/kern_clocksource.c
===================================================================
--- head/sys/kern/kern_clocksource.c
+++ head/sys/kern/kern_clocksource.c
@@ -698,6 +698,22 @@
spinlock_exit();
}
+void
+suspendclock(void)
+{
+ ET_LOCK();
+ configtimer(0);
+ ET_UNLOCK();
+}
+
+void
+resumeclock(void)
+{
+ ET_LOCK();
+ configtimer(1);
+ ET_UNLOCK();
+}
+
/*
* Switch to profiling clock rates.
*/
Index: head/sys/sys/systm.h
===================================================================
--- head/sys/sys/systm.h
+++ head/sys/sys/systm.h
@@ -333,6 +333,8 @@
void stopprofclock(struct proc *);
void cpu_startprofclock(void);
void cpu_stopprofclock(void);
+void suspendclock(void);
+void resumeclock(void);
sbintime_t cpu_idleclock(void);
void cpu_activeclock(void);
void cpu_new_callout(int cpu, sbintime_t bt, sbintime_t bt_opt);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 19, 11:58 PM (20 m, 9 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31809781
Default Alt Text
D15413.diff (1 KB)
Attached To
Mode
D15413: stop and restart kernel event timers in the suspend / resume cycle
Attached
Detach File
Event Timeline
Log In to Comment