···256256 Writing a "1" enables this printing while writing a "0"257257 disables it. The default value is "0". Reading from this file258258 will display the current value.259259+260260+What: /sys/power/pm_wakeup_irq261261+Date: April 2015262262+Contact: Alexandra Yates <alexandra.yates@linux.intel.org>263263+Description:264264+ The /sys/power/pm_wakeup_irq file reports to user space the IRQ265265+ number of the first wakeup interrupt (that is, the first266266+ interrupt from an IRQ line armed for system wakeup) seen by the267267+ kernel during the most recent system suspend/resume cycle.268268+269269+ This output is useful for system wakeup diagnostics of spurious270270+ wakeup interrupts.
+14-2
drivers/base/power/wakeup.c
···2525 */2626bool events_check_enabled __read_mostly;27272828+/* First wakeup IRQ seen by the kernel in the last cycle. */2929+unsigned int pm_wakeup_irq __read_mostly;3030+2831/* If set and the system is suspending, terminate the suspend. */2932static bool pm_abort_suspend __read_mostly;3033···9491 if (!ws)9592 return NULL;96939797- wakeup_source_prepare(ws, name ? kstrdup(name, GFP_KERNEL) : NULL);9494+ wakeup_source_prepare(ws, name ? kstrdup_const(name, GFP_KERNEL) : NULL);9895 return ws;9996}10097EXPORT_SYMBOL_GPL(wakeup_source_create);···157154158155 wakeup_source_drop(ws);159156 wakeup_source_record(ws);160160- kfree(ws->name);157157+ kfree_const(ws->name);161158 kfree(ws);162159}163160EXPORT_SYMBOL_GPL(wakeup_source_destroy);···871868void pm_wakeup_clear(void)872869{873870 pm_abort_suspend = false;871871+ pm_wakeup_irq = 0;872872+}873873+874874+void pm_system_irq_wakeup(unsigned int irq_number)875875+{876876+ if (pm_wakeup_irq == 0) {877877+ pm_wakeup_irq = irq_number;878878+ pm_system_wakeup();879879+ }874880}875881876882/**