Exemple #1
0
void
xen_platform_send_ipi(int cpu, int vector, int delivery_mode, int redirect)
{
#ifdef CONFIG_SMP
	/* TODO: we need to call vcpu_up here */
	if (unlikely(vector == ap_wakeup_vector)) {
		/* XXX
		 * This should be in __cpu_up(cpu) in ia64 smpboot.c
		 * like x86. But don't want to modify it,
		 * keep it untouched.
		 */
		xen_smp_intr_init_early(cpu);

		xen_send_ipi(cpu, vector);
		/* vcpu_prepare_and_up(cpu); */
		return;
	}
#endif

	switch (vector) {
	case IA64_IPI_VECTOR:
		xen_send_IPI_one(cpu, XEN_IPI_VECTOR);
		break;
	case IA64_IPI_RESCHEDULE:
		xen_send_IPI_one(cpu, XEN_RESCHEDULE_VECTOR);
		break;
	case IA64_CMCP_VECTOR:
		xen_send_IPI_one(cpu, XEN_CMCP_VECTOR);
		break;
	case IA64_CPEP_VECTOR:
		xen_send_IPI_one(cpu, XEN_CPEP_VECTOR);
		break;
	case IA64_TIMER_VECTOR: {
		/* this is used only once by check_sal_cache_flush()
		   at boot time */
		static int used = 0;
		if (!used) {
			xen_send_ipi(cpu, IA64_TIMER_VECTOR);
			used = 1;
			break;
		}
		/* fallthrough */
	}
	default:
		printk(KERN_WARNING "Unsupported IPI type 0x%x\n",
		       vector);
		notify_remote_via_irq(0); /* defaults to 0 irq */
		break;
	}
}
void
xen_platform_send_ipi(int cpu, int vector, int delivery_mode, int redirect)
{
#ifdef CONFIG_SMP
	/*                                    */
	if (unlikely(vector == ap_wakeup_vector)) {
		/*    
                                                      
                                           
                       
   */
		xen_smp_intr_init_early(cpu);

		xen_send_ipi(cpu, vector);
		/*                           */
		return;
	}
#endif

	switch (vector) {
	case IA64_IPI_VECTOR:
		xen_send_IPI_one(cpu, XEN_IPI_VECTOR);
		break;
	case IA64_IPI_RESCHEDULE:
		xen_send_IPI_one(cpu, XEN_RESCHEDULE_VECTOR);
		break;
	case IA64_CMCP_VECTOR:
		xen_send_IPI_one(cpu, XEN_CMCP_VECTOR);
		break;
	case IA64_CPEP_VECTOR:
		xen_send_IPI_one(cpu, XEN_CPEP_VECTOR);
		break;
	case IA64_TIMER_VECTOR: {
		/*                                                  
                  */
		static int used = 0;
		if (!used) {
			xen_send_ipi(cpu, IA64_TIMER_VECTOR);
			used = 1;
			break;
		}
		/*             */
	}
	default:
		printk(KERN_WARNING "Unsupported IPI type 0x%x\n",
		       vector);
		notify_remote_via_irq(0); /*                   */
		break;
	}
}