loongson: apm(4) resume event

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

loongson: apm(4) resume event

Jeremie Courreges-Anglas-2

I'd like to use resume events in apmd(8) to throttle autoaction (-z/-Z).
The acpi(4) code already sends the appropriate APM_NORMAL_RESUME event to
userland, and the i386 apm(4) seems to do the same.

Could someone with a loongson please build a kernel with the following
diff?  If you want to test runtime, run apmd -d and look for an

  apmevent 3 index xxx

message after resume.

oks welcome too.


Index: sys/arch/loongson/dev/apm.c
===================================================================
RCS file: /d/cvs/src/sys/arch/loongson/dev/apm.c,v
retrieving revision 1.33
diff -u -p -r1.33 apm.c
--- sys/arch/loongson/dev/apm.c 31 Dec 2019 13:48:31 -0000 1.33
+++ sys/arch/loongson/dev/apm.c 15 Feb 2020 07:54:08 -0000
@@ -434,5 +434,7 @@ apm_suspend(int state)
  wsdisplay_resume();
 #endif
 
+ apm_record_event(APM_NORMAL_RESUME, "System", "resumed from sleep");
+
  return rv;
 }


--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE