18 #include <linux/kernel.h>
20 #include <linux/linkage.h>
27 #include <asm/errno.h>
28 #include <asm/signal.h>
45 #ifdef CONFIG_SIBYTE_HAS_LDT
46 extern unsigned long ldt_eoi_space;
62 cur_ints |= (((
u64) 1) << irq);
76 cur_ints &= ~(((
u64) 1) << irq);
86 int i = 0, old_cpu,
cpu, int_on;
91 i = cpumask_first(mask);
103 int_on = !(cur_ints & (((
u64) 1) << irq));
106 cur_ints |= (((
u64) 1) << irq);
115 cur_ints &= ~(((
u64) 1) << irq);
125 static void disable_sb1250_irq(
struct irq_data *d)
127 unsigned int irq = d->
irq;
132 static void enable_sb1250_irq(
struct irq_data *d)
134 unsigned int irq = d->
irq;
140 static void ack_sb1250_irq(
struct irq_data *d)
142 unsigned int irq = d->
irq;
143 #ifdef CONFIG_SIBYTE_HAS_LDT
154 pending &= ((
u64)1 << (irq));
179 *(
uint32_t *)(ldt_eoi_space+(irq<<16)+(7<<2)) = 0;
185 static struct irq_chip sb1250_irq_type = {
186 .name =
"SB1250-IMR",
187 .irq_mask_ack = ack_sb1250_irq,
188 .irq_unmask = enable_sb1250_irq,
189 .irq_mask = disable_sb1250_irq,
191 .irq_set_affinity = sb1250_set_affinity
200 irq_set_chip_and_handler(i, &sb1250_irq_type,
227 #define IMR_IP2_VAL K_INT_MAP_I0
228 #define IMR_IP3_VAL K_INT_MAP_I1
229 #define IMR_IP4_VAL K_INT_MAP_I2
230 #define IMR_IP5_VAL K_INT_MAP_I3
231 #define IMR_IP6_VAL K_INT_MAP_I4
285 change_c0_status(
ST0_IM, imask);
290 static inline void dispatch_ip2(
void)
293 unsigned long long mask;
309 unsigned int pending;