gsmi: Log event for critical thermal thresholds
authorDuncan Laurie <dlaurie@chromium.org>
Wed, 18 Jul 2012 18:13:30 +0000 (11:13 -0700)
committerGerrit <chrome-bot@google.com>
Thu, 19 Jul 2012 16:59:12 +0000 (09:59 -0700)
commite492a53db4d530aef77d3d166b4f197ad80c0d35
treee865c436c5568c9850b226512b4dae76f26aa472
parentc604447a9b2b0780d196edba59e393c7148f81e4
gsmi: Log event for critical thermal thresholds

This registers a notifier for the new thermal notifier
introduced in a previous commit and logs a kernel shutdown
event when the notifier is called for crossing the
THERMAL_TRIP_CRITICAL threshold.

This change also adds an #ifdef around a variable that was
triggering an 'unused variable' warning when building
without CONFIG_EFI_VARS.

BUG=chrome-os-partner:9381
TEST=manual

1) Modify critical shutdown threshold in the BIOS
2) Generate a load on the system to increase temperature
3) Wait until system powers off
4) Power back on and read the event log:

4 | 2012-07-18 10:47:02 | Kernel Event | Critical Thermal Threshold
5 | 2012-07-18 10:47:06 | Kernel Event | Clean Shutdown
6 | 2012-07-18 10:47:06 | ACPI Enter | S5

Change-Id: I1bbda1b04888a467bf03e955a0e83e543b38c003
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27776
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
drivers/firmware/google/gsmi.c