structapic{// .../* IPI related functions */void(*wait_icr_idle)(void);u32(*safe_wait_icr_idle)(void);void(*send_IPI)(intcpu,intvector);void(*send_IPI_mask)(conststructcpumask*mask,intvector);void(*send_IPI_mask_allbutself)(conststructcpumask*msk,intvec);void(*send_IPI_allbuts...
2号中断,调用local_cpu_stop(),使本CPU停下来,进入低功耗状态。 当某个cpu想让其他cpu停下来时,会发送该IPI中断,主要的接口是machine_halt,machine_power_off,machine_restart,这些接口都会调用smp_send_stop来触发IPI_CPU_STOP中断,target cpu接收到该中断后,调用local_cpu_stop()函数: <arch/arm64/kernel/sm...
subttl "PC+MP IPI Interrupt Handler" Linux下则通过send_IPI_mask发送。 下面不妨再看看send_IPI_mask的流程: static inline void send_IPI_mask(int mask, int vector) { unsigned long cfg; unsigned long flags; __save_flags(flags); __cli(); /* * Wait for idle. */ apic_wait_icr_idle();...
void (*send_ipi_single)(int cpu,unsignedint action); void (*send_ipi_mask)(const struct cpumask *mask,unsignedint action); ... } IPI 通信就是多个处理器之间的交流。 send_ipi_single: 一对一聊天 send_ipi_mask: 群发,mask 表示群发的成员(CPU) action 类型 /* Octeon - Tell another core ...
void (*send_ipi_single)(int cpu, unsigned int action); void (*send_ipi_mask)(const struct cpumask *mask, unsigned int action); ... } 1. 2. 3. 4. 5. IPI 通信就是多个处理器之间的交流。 send_ipi_single: 一对一聊天 ...
staticinlinevoid__default_send_IPI_dest_field(unsignedintmask,intvector,unsignedintdest){unsignedlongcfg;/** Wait for idle.*/if(unlikely(vector==NMI_VECTOR))---为啥发送NMI就需要用safe,而发送reschedule则不需要呢?safe_apic_wait_icr_idle();else__xapic_wait_icr_idle(); 从代码...
(call_single_queue,cpu));}/* Send a message to all CPUs in the map */arch_send_call_function_ipi_mask(cfd->cpumask);//给cpumask中对应bit位的cpu发送ipi信号if(wait){//按顺序等各个接收到本cpu ipi信号的其他cpu修改csd的flagfor_each_cpu(cpu,cfd->cpumask){struct call_single_data*csd;...
sbi--sbi_send_ipi 如何确定HART掩码对应关系 每个位的位置对应一个HART ID。例如: 第0位(最低位)对应HART 0 第1位对应HART 1 第2位对应HART 2 如果你想指定HART 1,HART掩码将是0x2(二进制表示为0b10),因为第1位是1,其他位是0。 // 发送处理器间中断(IPI)的函数fnsend_ipi(hart_mask:usize)->Sb...
trace_ipi_send_cpumask(cpumask_of(cpu), _RET_IP_, NULL); \ arch_smp_send_reschedule(cpu); \ #define smp_send_reschedule(cpu) ({ \ trace_ipi_send_cpu(cpu, _RET_IP_, NULL); \ arch_smp_send_reschedule(cpu); \ }) /*22
APIC_ID_SHIFT) & APIC_ICR_DEST_MASK); spy_ready = 0; while !__ss_irq_fired); #endif if (__ss_irqrip <(uint64_t) apic_write_nop_slide_start || __ss_irq_rip > (uint_t) apic_write_nop_slide_end) { info("WARNING: IRQ outside NOP slide at %p", __ss_irq_...