debuggers.hg
changeset 12858:1464adb95681
[IA64] MCA support - Add binding of virq/ipi to irq
Signed-off-by: Yutaka Ezaki <yutaka.ezaki@jp.fujitsu.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
Signed-off-by: Yutaka Ezaki <yutaka.ezaki@jp.fujitsu.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
author | awilliam@xenbuild.aw |
---|---|
date | Sun Oct 29 09:27:14 2006 -0700 (2006-10-29) |
parents | efb346a02e70 |
children | 6384ff711405 |
files | linux-2.6-xen-sparse/arch/ia64/kernel/irq_ia64.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/arch/ia64/kernel/irq_ia64.c Sun Oct 29 09:27:12 2006 -0700 1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/irq_ia64.c Sun Oct 29 09:27:14 2006 -0700 1.3 @@ -241,9 +241,15 @@ static struct irqaction ipi_irqaction = 1.4 static DEFINE_PER_CPU(int, timer_irq) = -1; 1.5 static DEFINE_PER_CPU(int, ipi_irq) = -1; 1.6 static DEFINE_PER_CPU(int, resched_irq) = -1; 1.7 +static DEFINE_PER_CPU(int, cmc_irq) = -1; 1.8 +static DEFINE_PER_CPU(int, cmcp_irq) = -1; 1.9 +static DEFINE_PER_CPU(int, cpep_irq) = -1; 1.10 static char timer_name[NR_CPUS][15]; 1.11 static char ipi_name[NR_CPUS][15]; 1.12 static char resched_name[NR_CPUS][15]; 1.13 +static char cmc_name[NR_CPUS][15]; 1.14 +static char cmcp_name[NR_CPUS][15]; 1.15 +static char cpep_name[NR_CPUS][15]; 1.16 1.17 struct saved_irq { 1.18 unsigned int irq; 1.19 @@ -323,6 +329,43 @@ xen_register_percpu_irq (unsigned int ir 1.20 break; 1.21 case IA64_SPURIOUS_INT_VECTOR: 1.22 break; 1.23 + case IA64_CMC_VECTOR: 1.24 + sprintf(cmc_name[cpu], "%s%d", action->name, cpu); 1.25 + ret = bind_virq_to_irqhandler(VIRQ_MCA_CMC, cpu, 1.26 + action->handler, 1.27 + action->flags, 1.28 + cmc_name[cpu], 1.29 + action->dev_id); 1.30 + per_cpu(cmc_irq,cpu) = ret; 1.31 + printk(KERN_INFO "register VIRQ_MCA_CMC (%s) to xen " 1.32 + "irq (%d)\n", cmc_name[cpu], ret); 1.33 + break; 1.34 + case IA64_CMCP_VECTOR: 1.35 + sprintf(cmcp_name[cpu], "%s%d", action->name, cpu); 1.36 + ret = bind_ipi_to_irqhandler(CMCP_VECTOR, cpu, 1.37 + action->handler, 1.38 + action->flags, 1.39 + cmcp_name[cpu], 1.40 + action->dev_id); 1.41 + per_cpu(cmcp_irq,cpu) = ret; 1.42 + printk(KERN_INFO "register CMCP_VECTOR (%s) to xen " 1.43 + "irq (%d)\n", cmcp_name[cpu], ret); 1.44 + break; 1.45 + case IA64_CPEP_VECTOR: 1.46 + sprintf(cpep_name[cpu], "%s%d", action->name, cpu); 1.47 + ret = bind_ipi_to_irqhandler(CPEP_VECTOR, cpu, 1.48 + action->handler, 1.49 + action->flags, 1.50 + cpep_name[cpu], 1.51 + action->dev_id); 1.52 + per_cpu(cpep_irq,cpu) = ret; 1.53 + printk(KERN_INFO "register CPEP_VECTOR (%s) to xen " 1.54 + "irq (%d)\n", cpep_name[cpu], ret); 1.55 + break; 1.56 + case IA64_CPE_VECTOR: 1.57 + printk(KERN_WARNING "register IA64_CPE_VECTOR " 1.58 + "IGNORED\n"); 1.59 + break; 1.60 default: 1.61 printk(KERN_WARNING "Percpu irq %d is unsupported by xen!\n", irq); 1.62 break; 1.63 @@ -373,6 +416,18 @@ unbind_evtchn_callback(struct notifier_b 1.64 1.65 if (action == CPU_DEAD) { 1.66 /* Unregister evtchn. */ 1.67 + if (per_cpu(cpep_irq,cpu) >= 0) { 1.68 + unbind_from_irqhandler(per_cpu(cpep_irq, cpu), NULL); 1.69 + per_cpu(cpep_irq, cpu) = -1; 1.70 + } 1.71 + if (per_cpu(cmcp_irq,cpu) >= 0) { 1.72 + unbind_from_irqhandler(per_cpu(cmcp_irq, cpu), NULL); 1.73 + per_cpu(cmcp_irq, cpu) = -1; 1.74 + } 1.75 + if (per_cpu(cmc_irq,cpu) >= 0) { 1.76 + unbind_from_irqhandler(per_cpu(cmc_irq, cpu), NULL); 1.77 + per_cpu(cmc_irq, cpu) = -1; 1.78 + } 1.79 if (per_cpu(ipi_irq,cpu) >= 0) { 1.80 unbind_from_irqhandler (per_cpu(ipi_irq, cpu), NULL); 1.81 per_cpu(ipi_irq, cpu) = -1; 1.82 @@ -503,6 +558,12 @@ ia64_send_ipi (int cpu, int vector, int 1.83 case IA64_IPI_RESCHEDULE: 1.84 irq = per_cpu(ipi_to_irq, cpu)[RESCHEDULE_VECTOR]; 1.85 break; 1.86 + case IA64_CMCP_VECTOR: 1.87 + irq = per_cpu(ipi_to_irq, cpu)[CMCP_VECTOR]; 1.88 + break; 1.89 + case IA64_CPEP_VECTOR: 1.90 + irq = per_cpu(ipi_to_irq, cpu)[CPEP_VECTOR]; 1.91 + break; 1.92 default: 1.93 printk(KERN_WARNING"Unsupported IPI type 0x%x\n", vector); 1.94 irq = 0;