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
|
* 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
|
#ifdef CONFIG_PCI
|
||||||
extern unsigned long ht_eoi_space;
|
extern unsigned long ht_eoi_space;
|
||||||
#endif
|
#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) */
|
/* Store the CPU id (not the logical number) */
|
||||||
int bcm1480_irq_owner[BCM1480_NR_IRQS];
|
int bcm1480_irq_owner[BCM1480_NR_IRQS];
|
||||||
|
|
||||||
|
@ -109,12 +88,13 @@ void bcm1480_unmask_irq(int cpu, int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#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;
|
int i = 0, old_cpu, cpu, int_on, k;
|
||||||
u64 cur_ints;
|
u64 cur_ints;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned int irq_dirty;
|
|
||||||
|
|
||||||
i = cpumask_first(mask);
|
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);
|
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);
|
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;
|
u64 pending;
|
||||||
unsigned int irq_dirty;
|
|
||||||
int k;
|
int k;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -217,14 +201,15 @@ static void ack_bcm1480_irq(unsigned int irq)
|
||||||
bcm1480_mask_irq(bcm1480_irq_owner[irq], irq);
|
bcm1480_mask_irq(bcm1480_irq_owner[irq], irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct irq_chip bcm1480_irq_type = {
|
||||||
static void end_bcm1480_irq(unsigned int irq)
|
.name = "BCM1480-IMR",
|
||||||
{
|
.irq_mask_ack = ack_bcm1480_irq,
|
||||||
if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
|
.irq_mask = disable_bcm1480_irq,
|
||||||
bcm1480_unmask_irq(bcm1480_irq_owner[irq], irq);
|
.irq_unmask = enable_bcm1480_irq,
|
||||||
}
|
#ifdef CONFIG_SMP
|
||||||
}
|
.irq_set_affinity = bcm1480_set_affinity
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
void __init init_bcm1480_irqs(void)
|
void __init init_bcm1480_irqs(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,31 +43,10 @@
|
||||||
* for interrupt lines
|
* 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
|
#ifdef CONFIG_SIBYTE_HAS_LDT
|
||||||
extern unsigned long ldt_eoi_space;
|
extern unsigned long ldt_eoi_space;
|
||||||
#endif
|
#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) */
|
/* Store the CPU id (not the logical number) */
|
||||||
int sb1250_irq_owner[SB1250_NR_IRQS];
|
int sb1250_irq_owner[SB1250_NR_IRQS];
|
||||||
|
|
||||||
|
@ -102,9 +81,11 @@ void sb1250_unmask_irq(int cpu, int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#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;
|
int i = 0, old_cpu, cpu, int_on;
|
||||||
|
unsigned int irq = d->irq;
|
||||||
u64 cur_ints;
|
u64 cur_ints;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
|
@ -142,21 +123,17 @@ static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************/
|
static void enable_sb1250_irq(struct irq_data *d)
|
||||||
|
|
||||||
static void disable_sb1250_irq(unsigned int irq)
|
|
||||||
{
|
{
|
||||||
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);
|
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
|
#ifdef CONFIG_SIBYTE_HAS_LDT
|
||||||
u64 pending;
|
u64 pending;
|
||||||
|
|
||||||
|
@ -199,14 +176,14 @@ static void ack_sb1250_irq(unsigned int irq)
|
||||||
sb1250_mask_irq(sb1250_irq_owner[irq], irq);
|
sb1250_mask_irq(sb1250_irq_owner[irq], irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct irq_chip sb1250_irq_type = {
|
||||||
static void end_sb1250_irq(unsigned int irq)
|
.name = "SB1250-IMR",
|
||||||
{
|
.irq_mask_ack = ack_sb1250_irq,
|
||||||
if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
|
.irq_unmask = enable_sb1250_irq,
|
||||||
sb1250_unmask_irq(sb1250_irq_owner[irq], irq);
|
#ifdef CONFIG_SMP
|
||||||
}
|
.irq_set_affinity = sb1250_set_affinity
|
||||||
}
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
void __init init_sb1250_irqs(void)
|
void __init init_sb1250_irqs(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user