aboutsummaryrefslogtreecommitdiff
path: root/kernel/irq/chip.c
AgeCommit message (Collapse)AuthorFilesLines
2011-02-19genirq: Use irq_get/put functionsThomas Gleixner1-67/+26
Convert the management functions to use the common irq_get/put function. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Remove real old transition functionsThomas Gleixner1-12/+4
These transition helpers are stale for years now. Remove them. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Reflect IRQ_MOVE_PCNTXT in irq_data stateThomas Gleixner1-1/+3
Required by x86. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Add IRQCHIP_SET_TYPE_MASKED flagThomas Gleixner1-2/+2
irq_chips, which require to mask the chip before changing the trigger type should set this flag. So the core takes care of it and the requirement for looking into desc->status in the chip goes away. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Lars-Peter Clausen <[email protected]>
2011-02-19genirq: Wrap the remaning IRQ_* flagsThomas Gleixner1-1/+2
Use wrappers to keep them away from the core code. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Mirror irq trigger type bits in irq_data.stateThomas Gleixner1-1/+4
That's the data structure chip functions get provided. Also allow them to signal the core code that they updated the flags in irq_data.state by returning IRQ_SET_MASK_OK_NOCOPY. The default is unchanged. The type bits should be accessed via: val = irqd_get_trigger_type(irqdata); and irqd_set_trigger_type(irqdata, val); Coders who access them directly will be tracked down and slapped with stinking trouts. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Mirror IRQ_PER_CPU and IRQ_NO_BALANCING in irq_data.stateThomas Gleixner1-6/+9
That's the right data structure to look at for arch code. Accessor functions are provided. irqd_is_per_cpu(irqdata); irqd_can_balance(irqdata); Coders who access them directly will be tracked down and slapped with stinking trouts. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Move IRQ_MASKED to coreThomas Gleixner1-8/+20
Keep status in sync until all users are fixed. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Move IRQ_PENDING flag to coreThomas Gleixner1-4/+6
Keep status in sync until all users are fixed. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Move IRQ_DISABLED to coreThomas Gleixner1-17/+31
Keep status in sync until all abusers are fixed. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Move IRQ_REPLAY and IRQ_WAITING to coreThomas Gleixner1-5/+4
No users outside of core. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Move IRQ_ONESHOT to coreThomas Gleixner1-1/+1
No users outside of core. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Add IRQ_INPROGRESS to coreThomas Gleixner1-7/+9
We need to maintain the flag for now in both fields status and istate. Add a CONFIG_GENERIC_HARDIRQS_NO_COMPAT switch to allow testing w/o the status one. Wrap the access to status IRQ_INPROGRESS in a inline which can be turned of with CONFIG_GENERIC_HARDIRQS_NO_COMPAT along with the define. There is no reason that anything outside of core looks at this. That needs some modifications, but we'll get there. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Move IRQ_POLL_INPROGRESS to coreThomas Gleixner1-1/+1
No users outside of core. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Use modify_status for set_irq_nested_threadThomas Gleixner1-28/+0
No need for a separate function in the core code. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Fixup core code namespace falloutThomas Gleixner1-3/+3
Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Use handle_perpcu_event() in handle_percpu_irq()Thomas Gleixner1-8/+6
Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Use handle_irq_event() in handle_edge_irq()Thomas Gleixner1-14/+2
It's safe to drop the IRQ_INPROGRESS flag between action chain walks as we are protected by desc->lock. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Use handle_irq_event() in handle_fasteoi_irq()Thomas Gleixner1-17/+2
Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Use handle_irq_event() in handle_level_irq()Thomas Gleixner1-14/+2
Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Use handle_irq_event() in handle_simple_irq()Thomas Gleixner1-13/+2
Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Do not fiddle with IRQ_MASKED in handle_edge_irq()Thomas Gleixner1-1/+1
IRQ_MASKED is set in mask_ack_irq() anyway. Remove it from handle_edge_irq() to allow simpler ab^HHreuse of that function. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]>
2011-02-19genirq: Consolidate IRQ_DISABLEDThomas Gleixner1-4/+10
Handle IRQ_DISABLED consistent. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Remove default magicThomas Gleixner1-58/+15
Now that everything uses the wrappers, we can remove the default functions. None of those functions is performance critical. That makes the IRQ_MASKED flag tracking fully consistent. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Consolidate disable/enableThomas Gleixner1-1/+11
Create irq_disable/enable and use them to keep the flags consistent. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Consolidate startup/shutdown of interruptsThomas Gleixner1-17/+20
Aside of duplicated code some of the startup/shutdown sites do not handle the MASKED/DISABLED flags and the depth field at all. Move that to a helper function and take care of it there. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]>
2011-02-19genirq: Mark polled irqs and defer the real handlerThomas Gleixner1-6/+20
With the chip.end() function gone we might run into a situation where a poll call runs and the real interrupt comes in, sees IRQ_INPROGRESS and disables the line. That might be a perfect working one, which will then be masked forever. So mark them polled while the poll runs. When the real handler sees IRQ_INPROGRESS it checks the poll flag and waits for the polling to complete. Add the necessary amount of sanity checks to it to avoid deadlocks. Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Namespace cleanupThomas Gleixner1-14/+14
The irq namespace has become quite convoluted. My bad. Clean it up and deprecate the old functions. All new functions follow the scheme: irq number based: irq_set/get/xxx/_xxx(unsigned int irq, ...) irq_data based: irq_data_set/get/xxx/_xxx(struct irq_data *d, ....) irq_desc based: irq_desc_get_xxx(struct irq_desc *desc) Signed-off-by: Thomas Gleixner <[email protected]>
2011-02-19genirq: Add missing buslock to set_irq_type(), set_irq_wake()Thomas Gleixner1-0/+2
chips behind a slow bus cannot update the chip under desc->lock, but we miss the chip_buslock/chip_bus_sync_unlock() calls around the set type and set wake functions. Signed-off-by: Thomas Gleixner <[email protected]>
2010-10-12genirq: Sanitize dynamic irq handlingThomas Gleixner1-102/+0
Use the cleanup functions of the dynamic allocator. No need to have separate implementations. Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-12genirq: Provide default irq init flagsThomas Gleixner1-1/+1
Arch code sets it's own irq_desc.status flags right after boot and for dynamically allocated interrupts. That might involve iterating over a huge array. Allow ARCH_IRQ_INIT_FLAGS to set separate flags aside of IRQ_DISABLED which is the default. Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-12genirq: Sanitize irq_data accessorsThomas Gleixner1-0/+8
Get the data structure from the core and provide inline wrappers to access the irq_data members. Provide accessor inlines for irq_data as well. Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-12genirq: Provide status modifierThomas Gleixner1-19/+7
Provide a irq_desc.status modifier function to cleanup the direct access to irq_desc in arch and driver code. Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide config option to disable deprecated codeThomas Gleixner1-1/+7
This option covers now the old chip functions and the irq_desc data fields which are moving to struct irq_data. More stuff will follow. Pretty handy for testing a conversion, whether something broke or not. Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide compat handling for chip->retrigger()Thomas Gleixner1-0/+7
Wrap the old chip function retrigger() until the migration is complete and the old chip functions are removed. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Reviewed-by: H. Peter Anvin <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide compat handling for chip->set_wake()Thomas Gleixner1-0/+7
Wrap the old chip function set_wake() until the migration is complete and the old chip functions are removed. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Reviewed-by: H. Peter Anvin <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide compat handling for chip->set_type()Thomas Gleixner1-0/+7
Wrap the old chip function set_type() until the migration is complete and the old chip functions are removed. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Reviewed-by: H. Peter Anvin <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide compat handling for chip->set_affinity()Thomas Gleixner1-0/+8
Wrap the old chip function set_affinity() until the migration is complete and the old chip functions are removed. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Reviewed-by: H. Peter Anvin <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide compat handling for chip->startup()Thomas Gleixner1-6/+13
Wrap the old chip function startup() until the migration is complete and the old chip functions are removed. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Reviewed-by: H. Peter Anvin <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide compat handling for chip->disable()/shutdown()Thomas Gleixner1-10/+27
Wrap the old chip functions disable() and shutdown() until the migration is complete and the old chip functions are removed. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Reviewed-by: H. Peter Anvin <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide compat handling for chip->enable()Thomas Gleixner1-5/+20
Wrap the old chip function enable() until the migration is complete and the old chip functions are removed. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Reviewed-by: H. Peter Anvin <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide compat handling for chip->eoi()Thomas Gleixner1-3/+10
Wrap the old chip function eoi() until the migration is complete and the old chip functions are removed. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Reviewed-by: H. Peter Anvin <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide compat handling for chip->mask_ack()Thomas Gleixner1-6/+13
Wrap the old chip function mask_ack() until the migration is complete and the old chip functions are removed. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Reviewed-by: H. Peter Anvin <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide compat handling for chip->ack()Thomas Gleixner1-8/+12
Wrap the old chip function ack() until the migration is complete and the old chip functions are removed. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Reviewed-by: H. Peter Anvin <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide compat handling for chip->unmask()Thomas Gleixner1-6/+14
Wrap the old chip function unmask() until the migration is complete and the old chip functions are removed. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Reviewed-by: H. Peter Anvin <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide compat handling for chip->mask()Thomas Gleixner1-7/+15
Wrap the old chip function mask() until the migration is complete and the old chip functions are removed. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Reviewed-by: H. Peter Anvin <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Provide compat handling for bus_lock/bus_sync_unlockThomas Gleixner1-2/+18
Wrap the old chip functions for bus_lock/bus_sync_unlock until the migration is complete and the old chip functions are removed. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Reviewed-by: H. Peter Anvin <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-10-04genirq: Convert core code to irq_dataThomas Gleixner1-39/+39
Convert all references in the core code to orq, chip, handler_data, chip_data, msi_desc, affinity to irq_data.* Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Ingo Molnar <[email protected]>
2010-09-23genirq: Cleanup irq_chip->typename leftoversThomas Gleixner1-2/+0
3 years transition phase is enough. Cleanup the last users and remove the cruft. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Leo Chen <[email protected]> Cc: Hirokazu Takata <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Chris Zankel <[email protected]>
2010-03-26Merge branch 'irq-fixes-for-linus' of ↵Linus Torvalds1-11/+24
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: genirq: Move two IRQ functions from .init.text to .text genirq: Protect access to irq_desc->action in can_request_irq() genirq: Prevent oneshot irq thread race