Make use of the new features in genirq:
1) Set the chip flag IRCHIP_EOI_IF_HANDLED, which ensures in the
core code that irq_eoi() is only called when the interrupt was
handled. That removes the extra status check in the callback.
2) Use the preflow handler, which is called from the fasteoi core code
before the device handler. That avoids another status check and the
open coded handler redirection.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: sparclinux@vger.kernel.org
The core irq_set_type() function updates the flow type when the chip
callback returns 0. So setting the type is bogus. The core also
updates the LEVEL flag.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
The core irq_set_type() function updates the flow type when the chip
callback returns 0. So setting the type is bogus. The core also
updates IRQ_LEVEL.
Use irq_data to get the level type information in the chip functions.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
The core irq_set_type() function updates the flow type when the chip
callback returns 0. So setting the type is bogus.
The new core code allows to update the type in irq_data and return
IRQ_SET_MASK_OK_NOCOPY, so the core code will not touch it, except for
setting the IRQ_LEVEL flag.
Retrieve the IRQ_LEVEL information from irq_data which avoids a
redundant sparse irq lookup as well.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
The core irq_set_type() function updates the flow type when the chip
callback returns 0. So setting the type is bogus. The level flag is
updated in the core as well.
Use the proper accessors for setting the irq handlers.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
The core irq_set_type() function updates the flow type when the chip
callback returns 0. So setting the type is bogus.
The new core code allows to update the type in irq_data and return
IRQ_SET_MASK_OK_NOCOPY, so the core code will not touch it, except for
setting the IRQ_LEVEL flag.
Use the proper accessors for setting the irq handlers.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
The core code provides the same functionality when the
IRQCHIP_EOI_IF_HANDLED flag is set for the irq chip.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
The core irq_set_type() function updates the flow type when the chip
callback returns 0. So setting the type is bogus.
The new core code allows to update the type in irq_data and return
IRQ_SET_MASK_OK_NOCOPY, so the core code will not touch it, except for
setting the IRQ_LEVEL flag.
Use the proper accessors for setting the irq handlers.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
The core irq_set_type() function updates the flow type when the chip
callback returns 0. It also updates irq_data, so this can be used in
irq_ack() to check for the level bit. That avoids a redundant sparse
irq lookup.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
The irq chip has no irq_set_type() callback. So calling the call is
pointless. Set IRQ_LEVEL via the proper accessor.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Convert to the new function names. Scripted with coccinelle.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: linux-parisc@vger.kernel.org
1) As promised in the comment, the core does not copy cpumask anymore
when the arch code returns -EINVAL
2) Get the per cpu information from irq_data
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: linux-parisc@vger.kernel.org
Make use of the IRQCHIP_ONOFFLINE_ENABLED flag and remove the
wrappers. Use irqd_irq_disabled() instead of desc->status, which will
go away.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: David Daney <ddaney@caviumnetworks.com>
This includes conversion to new style irq_chip functions, and
correctly enabling/disabling per-CPU interrupts.
The hardware interrupt bit to irq number mapping is now done with a
flexible map, instead of by bit twiddling the irq number.
[ tglx: Adjusted to new irq_cpu_on/offline callbacks and
__irq_set_affinity_lock ]
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: linux-mips@linux-mips.org
Cc: ralf@linux-mips.org
LKML-Reference: <1301081931-11240-5-git-send-email-ddaney@caviumnetworks.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Namespace conversion scripted with coccinelle.
Also retrieve the irq type from irq_data in intc_enable_or_unmask()
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
irq_desc->status is going to be restricted. Provide a helper to set
that information in irq_data, where it belongs.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
The current functions are going away.
Also use the accessor for pending setaffinity in irq_data instead of
the open coded irq_desc access.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
The core code calls mask_ack() which calls irq_ack() and irq_mask()
for the case where an interrupt is disabled and marked pending. That
seems to be a leftover from the old __do_IRQ() mode.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
irq_chip.end got obsolete with the removal of __do_IRQ().
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tony Luck <tony.luck@intel.com>
LKML-Reference: <20110203004210.143127544@linutronix.de>