genirq: Delay incrementing interrupt count if it's disabled/pending
authorSudeep Holla <sudeep.holla@arm.com>
Wed, 4 Nov 2015 18:32:37 +0000 (18:32 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 16 Nov 2015 16:55:55 +0000 (17:55 +0100)
commita946e8c717f9355d1abd5408ed0adc0002d1aed1
tree66440d535ee30a535314f57e898bb85f0468c718
parent8005c49d9aea74d382f474ce11afbbc7d7130bec
genirq: Delay incrementing interrupt count if it's disabled/pending

In case of a wakeup interrupt, irq_pm_check_wakeup disables the interrupt
and marks it pending and suspended, disables it and notifies the pm core
about the wake event. The interrupt gets handled later once the system
is resumed.

However the irq stats is updated twice: once when it's disabled waiting
for the system to resume and later when it's handled, resulting in wrong
counting of the wakeup interrupt when waking up the system.

This patch updates the interrupt count so that it's updated only when
the interrupt gets handled. It's already handled correctly in
handle_edge_irq and handle_edge_eoi_irq.

Reported-by: Manoil Claudiu <claudiu.manoil@freescale.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/1446661957-1019-1-git-send-email-sudeep.holla@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/irq/chip.c