Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242471
b: refs/heads/master
c: d6d5d5c
h: refs/heads/master
i:
  242469: 636775c
  242467: 3fa367d
  242463: 32f117a
v: v3
  • Loading branch information
Thomas Gleixner authored and Ralf Baechle committed Mar 25, 2011
1 parent 8dd4c8a commit 9f1c9f2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 74 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4d2796f83600bbba8e7170e847226c377c0305af
refs/heads/master: d6d5d5c4afd4c8bb4c5e3753a2141e9c3a874629
55 changes: 20 additions & 35 deletions trunk/arch/mips/sibyte/bcm1480/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,10 @@
* for interrupt lines
*/


static void end_bcm1480_irq(unsigned int irq);
static void enable_bcm1480_irq(unsigned int irq);
static void disable_bcm1480_irq(unsigned int irq);
static void ack_bcm1480_irq(unsigned int irq);
#ifdef CONFIG_SMP
static int bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask);
#endif

#ifdef CONFIG_PCI
extern unsigned long ht_eoi_space;
#endif

static struct irq_chip bcm1480_irq_type = {
.name = "BCM1480-IMR",
.ack = ack_bcm1480_irq,
.mask = disable_bcm1480_irq,
.mask_ack = ack_bcm1480_irq,
.unmask = enable_bcm1480_irq,
.end = end_bcm1480_irq,
#ifdef CONFIG_SMP
.set_affinity = bcm1480_set_affinity
#endif
};

/* Store the CPU id (not the logical number) */
int bcm1480_irq_owner[BCM1480_NR_IRQS];

Expand Down Expand Up @@ -109,12 +88,13 @@ void bcm1480_unmask_irq(int cpu, int irq)
}

#ifdef CONFIG_SMP
static int bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask)
static int bcm1480_set_affinity(struct irq_data *d, const struct cpumask *mask,
bool force)
{
unsigned int irq_dirty, irq = d->irq;
int i = 0, old_cpu, cpu, int_on, k;
u64 cur_ints;
unsigned long flags;
unsigned int irq_dirty;

i = cpumask_first(mask);

Expand Down Expand Up @@ -156,21 +136,25 @@ static int bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask)

/*****************************************************************************/

static void disable_bcm1480_irq(unsigned int irq)
static void disable_bcm1480_irq(struct irq_data *d)
{
unsigned int irq = d->irq;

bcm1480_mask_irq(bcm1480_irq_owner[irq], irq);
}

static void enable_bcm1480_irq(unsigned int irq)
static void enable_bcm1480_irq(struct irq_data *d)
{
unsigned int irq = d->irq;

bcm1480_unmask_irq(bcm1480_irq_owner[irq], irq);
}


static void ack_bcm1480_irq(unsigned int irq)
static void ack_bcm1480_irq(struct irq_data *d)
{
unsigned int irq_dirty, irq = d->irq;
u64 pending;
unsigned int irq_dirty;
int k;

/*
Expand Down Expand Up @@ -217,14 +201,15 @@ static void ack_bcm1480_irq(unsigned int irq)
bcm1480_mask_irq(bcm1480_irq_owner[irq], irq);
}


static void end_bcm1480_irq(unsigned int irq)
{
if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
bcm1480_unmask_irq(bcm1480_irq_owner[irq], irq);
}
}

static struct irq_chip bcm1480_irq_type = {
.name = "BCM1480-IMR",
.irq_mask_ack = ack_bcm1480_irq,
.irq_mask = disable_bcm1480_irq,
.irq_unmask = enable_bcm1480_irq,
#ifdef CONFIG_SMP
.irq_set_affinity = bcm1480_set_affinity
#endif
};

void __init init_bcm1480_irqs(void)
{
Expand Down
53 changes: 15 additions & 38 deletions trunk/arch/mips/sibyte/sb1250/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,10 @@
* for interrupt lines
*/


static void end_sb1250_irq(unsigned int irq);
static void enable_sb1250_irq(unsigned int irq);
static void disable_sb1250_irq(unsigned int irq);
static void ack_sb1250_irq(unsigned int irq);
#ifdef CONFIG_SMP
static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask);
#endif

#ifdef CONFIG_SIBYTE_HAS_LDT
extern unsigned long ldt_eoi_space;
#endif

static struct irq_chip sb1250_irq_type = {
.name = "SB1250-IMR",
.ack = ack_sb1250_irq,
.mask = disable_sb1250_irq,
.mask_ack = ack_sb1250_irq,
.unmask = enable_sb1250_irq,
.end = end_sb1250_irq,
#ifdef CONFIG_SMP
.set_affinity = sb1250_set_affinity
#endif
};

/* Store the CPU id (not the logical number) */
int sb1250_irq_owner[SB1250_NR_IRQS];

Expand Down Expand Up @@ -102,9 +81,11 @@ void sb1250_unmask_irq(int cpu, int irq)
}

#ifdef CONFIG_SMP
static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
static int sb1250_set_affinity(struct irq_data *d, const struct cpumask *mask,
bool force)
{
int i = 0, old_cpu, cpu, int_on;
unsigned int irq = d->irq;
u64 cur_ints;
unsigned long flags;

Expand Down Expand Up @@ -142,21 +123,17 @@ static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
}
#endif

/*****************************************************************************/

static void disable_sb1250_irq(unsigned int irq)
static void enable_sb1250_irq(struct irq_data *d)
{
sb1250_mask_irq(sb1250_irq_owner[irq], irq);
}
unsigned int irq = d->irq;

static void enable_sb1250_irq(unsigned int irq)
{
sb1250_unmask_irq(sb1250_irq_owner[irq], irq);
}


static void ack_sb1250_irq(unsigned int irq)
static void ack_sb1250_irq(struct irq_data *d)
{
unsigned int irq = d->irq;
#ifdef CONFIG_SIBYTE_HAS_LDT
u64 pending;

Expand Down Expand Up @@ -199,14 +176,14 @@ static void ack_sb1250_irq(unsigned int irq)
sb1250_mask_irq(sb1250_irq_owner[irq], irq);
}


static void end_sb1250_irq(unsigned int irq)
{
if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
sb1250_unmask_irq(sb1250_irq_owner[irq], irq);
}
}

static struct irq_chip sb1250_irq_type = {
.name = "SB1250-IMR",
.irq_mask_ack = ack_sb1250_irq,
.irq_unmask = enable_sb1250_irq,
#ifdef CONFIG_SMP
.irq_set_affinity = sb1250_set_affinity
#endif
};

void __init init_sb1250_irqs(void)
{
Expand Down

0 comments on commit 9f1c9f2

Please sign in to comment.