#include <asm/q40ints.h>
#endif
+int nr_irqs = NR_IRQS;
+
extern u32 auto_irqhandler_fixup[];
extern u32 user_irqhandler_fixup[];
extern u16 user_irqvec_fixup[];
#include <linux/proc_fs.h>
#include <linux/profile.h>
+int nr_irqs = NR_IRQS;
+
/*
* show_interrupts is needed by /proc/interrupts.
*/
#define SMP_NOP2
#define SMP_NOP3
#endif /* SMP */
+
+int nr_irqs = NR_IRQS;
+
unsigned long __raw_local_irq_save(void)
{
unsigned long retval;
#include <asm/ptrace.h>
#include <asm/system.h>
+extern int nr_irqs;
+
/*
* These correspond to the IORESOURCE_IRQ_* defines in
* linux/ioport.h to select the interrupt line behaviour. When
* something may have generated an irq long ago and we want to
* flush such a longstanding irq before considering it as spurious.
*/
- for (i = NR_IRQS-1; i > 0; i--) {
+ for (i = nr_irqs-1; i > 0; i--) {
desc = irq_desc + i;
spin_lock_irq(&desc->lock);
* (we must startup again here because if a longstanding irq
* happened in the previous stage, it may have masked itself)
*/
- for (i = NR_IRQS-1; i > 0; i--) {
+ for (i = nr_irqs-1; i > 0; i--) {
desc = irq_desc + i;
spin_lock_irq(&desc->lock);
* Now filter out any obviously spurious interrupts
*/
mask = 0;
- for (i = 0; i < NR_IRQS; i++) {
+ for (i = 0; i < nr_irqs; i++) {
unsigned int status;
desc = irq_desc + i;
int i;
mask = 0;
- for (i = 0; i < NR_IRQS; i++) {
+ for (i = 0; i < nr_irqs; i++) {
struct irq_desc *desc = irq_desc + i;
unsigned int status;
{
int i, irq_found = 0, nr_irqs = 0;
- for (i = 0; i < NR_IRQS; i++) {
+ for (i = 0; i < nr_irqs; i++) {
struct irq_desc *desc = irq_desc + i;
unsigned int status;
struct irq_desc *desc;
unsigned long flags;
- if (irq >= NR_IRQS) {
+ if (irq >= nr_irqs) {
WARN(1, KERN_ERR "Trying to initialize invalid IRQ%d\n", irq);
return;
}
struct irq_desc *desc;
unsigned long flags;
- if (irq >= NR_IRQS) {
+ if (irq >= nr_irqs) {
WARN(1, KERN_ERR "Trying to cleanup invalid IRQ%d\n", irq);
return;
}
struct irq_desc *desc;
unsigned long flags;
- if (irq >= NR_IRQS) {
+ if (irq >= nr_irqs) {
WARN(1, KERN_ERR "Trying to install chip for IRQ%d\n", irq);
return -EINVAL;
}
unsigned long flags;
int ret = -ENXIO;
- if (irq >= NR_IRQS) {
+ if (irq >= nr_irqs) {
printk(KERN_ERR "Trying to set irq type for IRQ%d\n", irq);
return -ENODEV;
}
struct irq_desc *desc;
unsigned long flags;
- if (irq >= NR_IRQS) {
+ if (irq >= nr_irqs) {
printk(KERN_ERR
"Trying to install controller data for IRQ%d\n", irq);
return -EINVAL;
struct irq_desc *desc;
unsigned long flags;
- if (irq >= NR_IRQS) {
+ if (irq >= nr_irqs) {
printk(KERN_ERR
"Trying to install msi data for IRQ%d\n", irq);
return -EINVAL;
struct irq_desc *desc = irq_desc + irq;
unsigned long flags;
- if (irq >= NR_IRQS || !desc->chip) {
+ if (irq >= nr_irqs || !desc->chip) {
printk(KERN_ERR "BUG: bad set_irq_chip_data(IRQ#%d)\n", irq);
return -EINVAL;
}
struct irq_desc *desc;
unsigned long flags;
- if (irq >= NR_IRQS) {
+ if (irq >= nr_irqs) {
printk(KERN_ERR
"Trying to install type control for IRQ%d\n", irq);
return;
struct irq_desc *desc;
unsigned long flags;
- if (irq >= NR_IRQS) {
+ if (irq >= nr_irqs) {
printk(KERN_ERR "Trying to mark IRQ%d non-probeable\n", irq);
return;
struct irq_desc *desc;
unsigned long flags;
- if (irq >= NR_IRQS) {
+ if (irq >= nr_irqs) {
printk(KERN_ERR "Trying to mark IRQ%d probeable\n", irq);
return;
*
* Controller mappings for all interrupt sources:
*/
+int nr_irqs = NR_IRQS;
struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = {
[0 ... NR_IRQS-1] = {
.status = IRQ_DISABLED,
{
int i;
- for (i = 0; i < NR_IRQS; i++)
+ for (i = 0; i < nr_irqs; i++)
lockdep_set_class(&irq_desc[i].lock, &irq_desc_lock_class);
}
struct irq_desc *desc = irq_desc + irq;
unsigned int status;
- if (irq >= NR_IRQS)
+ if (irq >= nr_irqs)
return;
do {
struct irq_desc *desc = irq_desc + irq;
unsigned long flags;
- if (irq >= NR_IRQS)
+ if (irq >= nr_irqs)
return;
spin_lock_irqsave(&desc->lock, flags);
{
struct irq_desc *desc = irq_desc + irq;
- if (irq >= NR_IRQS)
+ if (irq >= nr_irqs)
return;
disable_irq_nosync(irq);
struct irq_desc *desc = irq_desc + irq;
unsigned long flags;
- if (irq >= NR_IRQS)
+ if (irq >= nr_irqs)
return;
spin_lock_irqsave(&desc->lock, flags);
{
struct irqaction *action;
- if (irq >= NR_IRQS || irq_desc[irq].status & IRQ_NOREQUEST)
+ if (irq >= nr_irqs || irq_desc[irq].status & IRQ_NOREQUEST)
return 0;
action = irq_desc[irq].action;
int shared = 0;
int ret;
- if (irq >= NR_IRQS)
+ if (irq >= nr_irqs)
return -EINVAL;
if (desc->chip == &no_irq_chip)
unsigned long flags;
WARN_ON(in_interrupt());
- if (irq >= NR_IRQS)
+ if (irq >= nr_irqs)
return;
desc = irq_desc + irq;
*/
if ((irqflags & IRQF_SHARED) && !dev_id)
return -EINVAL;
- if (irq >= NR_IRQS)
+ if (irq >= nr_irqs)
return -EINVAL;
if (irq_desc[irq].status & IRQ_NOREQUEST)
return -EINVAL;
/*
* Create entries for all existing IRQs.
*/
- for (i = 0; i < NR_IRQS; i++)
+ for (i = 0; i < nr_irqs; i++)
register_irq_proc(i);
}
struct irq_desc *desc;
int irq;
- while (!bitmap_empty(irqs_resend, NR_IRQS)) {
- irq = find_first_bit(irqs_resend, NR_IRQS);
+ while (!bitmap_empty(irqs_resend, nr_irqs)) {
+ irq = find_first_bit(irqs_resend, nr_irqs);
clear_bit(irq, irqs_resend);
desc = irq_desc + irq;
local_irq_disable();
int i;
int ok = 0;
- for (i = 1; i < NR_IRQS; i++) {
+ for (i = 1; i < nr_irqs; i++) {
struct irq_desc *desc = irq_desc + i;
if (i == irq) /* Already tried */
static void poll_spurious_irqs(unsigned long dummy)
{
int i;
- for (i = 1; i < NR_IRQS; i++) {
+ for (i = 1; i < nr_irqs; i++) {
struct irq_desc *desc = irq_desc + i;
unsigned int status;