• Thomas Petazzoni's avatar
    genirq: Implement irq_percpu_is_enabled() · f0cb3220
    Thomas Petazzoni authored
    Certain interrupt controller drivers have a register set that does not
    make it easy to save/restore the mask of enabled/disabled interrupts
    at suspend/resume time. At resume time, such drivers rely on the core
    kernel irq subsystem to tell whether such or such interrupt is enabled
    or not, in order to restore the proper state in the interrupt
    controller register.
    
    While the irqd_irq_disabled() provides the relevant information for
    global interrupts, there is no similar function to query the
    enabled/disabled state of a per-CPU interrupt.
    
    Therefore, this commit complements the percpu_irq API with an
    irq_percpu_is_enabled() function.
    
    [ tglx: Simplified the implementation and added kerneldoc ]
    Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Tawfik Bayouk <tawfik@marvell.com>
    Cc: Nadav Haklai <nadavh@marvell.com>
    Cc: Lior Amsalem <alior@marvell.com>
    Cc: Andrew Lunn <andrew@lunn.ch>
    Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
    Cc: Gregory Clement <gregory.clement@free-electrons.com>
    Cc: Jason Cooper <jason@lakedaemon.net>
    Cc: Marc Zyngier <marc.zyngier@arm.com>
    Link: http://lkml.kernel.org/r/1445347435-2333-2-git-send-email-thomas.petazzoni@free-electrons.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    f0cb3220
manage.c 52.5 KB