Ville Syrjälä
368e21aebe
rtc: cmos: Don't enable interrupts in the middle of the interrupt handler
Using spin_lock_irq()/spin_unlock_irq() from within the interrupt
handler is a no-no. Let's save/restore the flags to avoid turning on
interrupts prematurely.
We hit this in a bunch of our CI systems, but for whatever reason I
wasn't able to reproduce on my own machine, so this fix is just
based on the backtrace.
[ 202.634918] WARNING: CPU: 0 PID: 0 at kernel/locking/lockdep.c:2729 trace_hardirqs_on_caller+0x113/0x1b0
[ 202.634919] DEBUG_LOCKS_WARN_ON(current->hardirq_context)
[ 202.634929] Modules linked in: snd_hda_intel i915 x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel lpc_ich snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_codec snd_hwdep i2c_designware_platform i2c_designware_core snd_hda_core mei_me mei snd_pcm r8169 mii sdhci_acpi sdhci mmc_core i2c_hid [last unloaded: i915]
[ 202.634930] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G U 4.9.0-rc1-CI-CI_DRM_1734+ #1
[ 202.634931] Hardware name: GIGABYTE M4HM87P-00/M4HM87P-00, BIOS F6 12/10/2014
[ 202.634933] ffff88011ea03d68 ffffffff8142dce5 ffff88011ea03db8 0000000000000000
[ 202.634934] ffff88011ea03da8 ffffffff8107e496 00000aa900000002 ffffffff81e249a0
[ 202.634935] ffffffff81815637 ffffffff82e7c280 0000000000000000 0000000000000004
[ 202.634936] Call Trace:
[ 202.634939] <IRQ>
[ 202.634939] [<ffffffff8142dce5>] dump_stack+0x67/0x92
[ 202.634941] [<ffffffff8107e496>] __warn+0xc6/0xe0
[ 202.634944] [<ffffffff81815637>] ? _raw_spin_unlock_irq+0x27/0x50
[ 202.634945] [<ffffffff8107e4fa>] warn_slowpath_fmt+0x4a/0x50
[ 202.634946] [<ffffffff810d6d83>] trace_hardirqs_on_caller+0x113/0x1b0
[ 202.634948] [<ffffffff810d6e2d>] trace_hardirqs_on+0xd/0x10
[ 202.634949] [<ffffffff81815637>] _raw_spin_unlock_irq+0x27/0x50
[ 202.634951] [<ffffffff81672042>] rtc_handler+0x32/0xa0
[ 202.634954] [<ffffffff814c08a3>] acpi_ev_fixed_event_detect+0xd4/0xfb
[ 202.634956] [<ffffffff814c2ccb>] acpi_ev_sci_xrupt_handler+0xf/0x2d
[ 202.634957] [<ffffffff814ab3ee>] acpi_irq+0x11/0x2c
[ 202.634960] [<ffffffff810e5288>] __handle_irq_event_percpu+0x58/0x370
[ 202.634961] [<ffffffff810e55be>] handle_irq_event_percpu+0x1e/0x50
[ 202.634962] [<ffffffff810e5624>] handle_irq_event+0x34/0x60
[ 202.634963] [<ffffffff810e8906>] handle_fasteoi_irq+0xa6/0x170
[ 202.634966] [<ffffffff8101eef5>] handle_irq+0x15/0x20
[ 202.634967] [<ffffffff8101e548>] do_IRQ+0x68/0x130
[ 202.634968] [<ffffffff81816789>] common_interrupt+0x89/0x89
[ 202.634970] <EOI>
[ 202.634970] [<ffffffff81814c73>] ? mwait_idle+0x93/0x210
[ 202.634971] [<ffffffff81814c6a>] ? mwait_idle+0x8a/0x210
[ 202.634972] [<ffffffff81026b0a>] arch_cpu_idle+0xa/0x10
[ 202.634973] [<ffffffff8181509e>] default_idle_call+0x1e/0x30
[ 202.634974] [<ffffffff810cbf6c>] cpu_startup_entry+0x17c/0x1f0
[ 202.634976] [<ffffffff8180ca87>] rest_init+0x127/0x130
[ 202.634978] [<ffffffff81f77f08>] start_kernel+0x3f6/0x403
[ 202.634980] [<ffffffff81f7728f>] x86_64_start_reservations+0x2a/0x2c
[ 202.634981] [<ffffffff81f77404>] x86_64_start_kernel+0x173/0x186
[ 202.634982] ---[ end trace 293c99618fa08d34 ]---
Cc: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Fixes: 983bf1256e
("rtc: cmos: Clear ACPI-driven alarms upon resume")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-10-20 17:40:06 +02:00
..
2016-03-14 17:08:18 +01:00
2015-04-17 09:04:02 -04:00
2016-07-11 23:22:35 +02:00
2016-10-14 13:13:44 -07:00
2016-08-31 18:21:34 +02:00
2015-09-05 13:19:05 +02:00
2014-10-20 16:21:31 +02:00
2015-04-03 08:18:25 +02:00
2015-11-08 14:12:25 +01:00
2015-09-05 13:19:08 +02:00
2016-07-19 17:27:42 +02:00
2016-09-22 00:14:41 +02:00
2015-09-05 19:37:22 +02:00
2016-03-14 17:08:25 +01:00
2016-10-19 08:45:48 +02:00
2016-09-02 01:24:06 +02:00
2015-11-08 14:12:28 +01:00
2013-04-05 09:36:53 -07:00
2016-07-26 00:09:18 +02:00
2014-10-20 16:21:31 +02:00
2015-09-05 13:19:09 +02:00
2016-08-31 18:21:35 +02:00
2014-10-20 16:21:31 +02:00
2016-10-20 17:40:06 +02:00
2016-09-02 01:24:06 +02:00
2015-09-05 13:19:07 +02:00
2016-07-19 18:15:21 +02:00
2016-07-19 18:15:21 +02:00
2016-01-11 20:19:57 +01:00
2016-09-02 01:24:06 +02:00
2015-09-05 13:19:07 +02:00
2016-09-02 01:24:06 +02:00
2014-10-20 16:21:31 +02:00
2016-05-20 12:33:51 +02:00
2016-07-08 16:23:11 +02:00
2016-09-02 01:24:06 +02:00
2016-07-09 10:24:45 +02:00
2016-08-31 18:21:34 +02:00
2016-07-09 10:24:45 +02:00
2016-09-22 00:14:40 +02:00
2015-09-05 19:37:22 +02:00
2015-11-10 10:01:21 -08:00
2016-05-20 12:33:51 +02:00
2016-05-20 12:33:51 +02:00
2016-05-20 12:33:51 +02:00
2016-07-09 10:24:45 +02:00
2016-05-20 12:33:51 +02:00
2016-06-27 10:48:28 +02:00
2016-07-09 10:24:45 +02:00
2015-04-17 09:04:02 -04:00
2016-06-06 17:07:33 +02:00
2015-04-17 09:03:59 -04:00
2016-05-20 12:33:51 +02:00
2015-09-05 13:19:06 +02:00
2016-09-02 01:24:06 +02:00
2016-06-04 00:23:35 +02:00
2015-06-19 20:03:20 +02:00
2016-07-19 18:18:06 +02:00
2016-01-11 20:19:58 +01:00
2016-05-20 12:33:51 +02:00
2016-05-20 12:33:51 +02:00
2016-09-02 01:24:06 +02:00
2014-11-21 12:00:00 -08:00
2014-10-20 16:21:31 +02:00
2015-09-05 13:19:06 +02:00
2016-01-11 20:19:59 +01:00
2015-06-21 21:53:59 +02:00
2016-07-21 20:06:57 +02:00
2015-10-28 10:30:17 +09:00
2015-10-28 10:30:17 +09:00
2016-05-20 12:33:51 +02:00
2015-09-05 13:19:10 +02:00
2016-06-27 18:15:25 +02:00
2016-05-20 12:33:51 +02:00
2015-10-28 10:30:17 +09:00
2016-06-04 16:05:59 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2015-09-05 19:37:21 +02:00
2015-06-25 01:13:36 +02:00
2016-03-14 17:08:27 +01:00
2016-05-20 12:33:51 +02:00
2016-06-26 01:20:08 +02:00
2016-09-02 01:24:06 +02:00
2015-09-05 19:37:22 +02:00
2015-09-05 19:37:22 +02:00
2016-07-09 10:24:45 +02:00
2015-04-17 09:04:02 -04:00
2016-09-02 01:24:06 +02:00
2015-09-05 19:37:22 +02:00
2016-05-20 12:33:51 +02:00
2016-09-02 01:24:06 +02:00
2016-09-21 21:46:04 +02:00
2016-06-29 17:33:18 +10:00
2016-09-02 01:24:06 +02:00
2014-10-20 16:21:31 +02:00
2016-08-31 18:21:34 +02:00
2016-03-14 17:08:41 +01:00
2016-03-14 17:08:30 +01:00
2016-07-19 18:15:21 +02:00
2015-09-05 13:19:06 +02:00
2016-09-02 01:24:06 +02:00
2016-07-19 19:11:54 +02:00
2016-08-31 18:21:35 +02:00
2013-11-13 12:09:31 +09:00
2015-11-08 14:12:24 +01:00
2016-08-31 09:33:33 +01:00
2016-01-11 20:19:55 +01:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2015-09-05 19:37:16 +02:00
2015-10-28 10:30:17 +09:00
2016-07-19 18:15:21 +02:00
2015-12-20 13:39:00 +01:00
2015-09-05 13:19:10 +02:00
2016-05-20 12:33:51 +02:00
2016-05-20 12:33:51 +02:00
2016-07-09 10:24:45 +02:00
2016-05-21 17:07:16 +02:00
2016-10-12 13:24:39 +02:00
2015-10-28 10:30:17 +09:00
2016-09-02 01:24:06 +02:00
2016-07-09 10:24:45 +02:00
2016-09-02 01:24:06 +02:00
2016-05-20 12:33:51 +02:00
2016-07-19 17:48:06 +02:00
2013-04-19 13:51:25 +02:00
2016-03-14 17:08:18 +01:00
2016-07-11 23:22:35 +02:00
2015-09-05 19:37:16 +02:00
2015-09-05 19:37:16 +02:00
2016-07-11 23:22:33 +02:00
2015-09-05 13:19:06 +02:00
2016-05-20 12:33:51 +02:00
2016-09-02 01:24:06 +02:00
2015-07-23 17:07:35 +01:00
2014-10-20 16:21:31 +02:00
2016-05-20 12:33:51 +02:00
2016-09-02 01:24:06 +02:00
2014-10-20 16:21:31 +02:00
2014-09-19 12:39:19 +02:00
2016-01-11 20:19:57 +01:00
2016-08-31 18:21:35 +02:00
2016-09-02 01:24:06 +02:00
2015-04-03 08:18:24 +02:00
2014-10-20 16:21:31 +02:00
2016-05-21 17:07:17 +02:00
2016-03-14 17:08:23 +01:00
2016-03-14 17:08:24 +01:00
2016-09-02 01:24:06 +02:00
2015-09-05 13:19:10 +02:00
2016-07-09 10:24:21 +02:00
2016-03-14 17:08:25 +01:00
2015-09-05 19:37:22 +02:00
2013-07-03 16:07:59 -07:00
2013-04-29 18:28:32 -07:00
2016-05-20 12:33:51 +02:00
2014-10-20 16:21:31 +02:00
2016-05-20 12:33:51 +02:00
2015-06-25 01:13:42 +02:00