11 #include <linux/module.h>
12 #include <linux/rbtree.h>
13 #include <linux/slab.h>
18 #include <asm/uv/uv_hub.h>
29 static struct rb_root uv_irq_root;
31 static int uv_set_irq_affinity(
struct irq_data *,
const struct cpumask *,
bool);
40 static struct irq_chip uv_irq_chip = {
43 .irq_unmask = uv_noop,
44 .irq_eoi = uv_ack_apic,
45 .irq_set_affinity = uv_set_irq_affinity,
52 static int uv_set_irq_2_mmr_info(
int irq,
unsigned long offset,
unsigned blade)
58 unsigned long irqflags;
61 uv_blade_to_memory_nid(blade));
67 n->
pnode = uv_blade_to_pnode(blade);
76 e->
pnode = uv_blade_to_pnode(blade);
78 spin_unlock_irqrestore(&uv_irq_lock, irqflags);
90 rb_link_node(&n->
list, parent, link);
93 spin_unlock_irqrestore(&uv_irq_lock, irqflags);
102 unsigned long irqflags;
105 n = uv_irq_root.rb_node;
112 spin_unlock_irqrestore(&uv_irq_lock, irqflags);
121 spin_unlock_irqrestore(&uv_irq_lock, irqflags);
130 arch_enable_uv_irq(
char *irq_name,
unsigned int irq,
int cpu,
int mmr_blade,
131 unsigned long mmr_offset,
int limit)
135 unsigned long mmr_value;
141 sizeof(
unsigned long));
169 mmr_pnode = uv_blade_to_pnode(mmr_blade);
170 uv_write_global_mmr64(mmr_pnode, mmr_offset, mmr_value);
182 static void arch_disable_uv_irq(
int mmr_pnode,
unsigned long mmr_offset)
184 unsigned long mmr_value;
188 sizeof(
unsigned long));
194 uv_write_global_mmr64(mmr_pnode, mmr_offset, mmr_value);
203 unsigned long mmr_value, mmr_offset;
225 uv_write_global_mmr64(mmr_pnode, mmr_offset, mmr_value);
239 unsigned long mmr_offset,
int limit)
248 ret = arch_enable_uv_irq(irq_name, irq, cpu, mmr_blade, mmr_offset,
251 uv_set_irq_2_mmr_info(irq, mmr_offset, mmr_blade);
270 unsigned long irqflags;
273 n = uv_irq_root.rb_node;
287 spin_unlock_irqrestore(&uv_irq_lock, irqflags);