forked from luck/tmp_suning_uos_patched
MIPS: Sibyte: Convert to new irq_chip functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2205/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
4d2796f836
commit
d6d5d5c4af
|
@ -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];
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user