struct clock_event_device *newdev,intcpu){if(!cpumask_test_cpu(cpu, newdev->cpumask))returnfalse;if(cpumask_equal(newdev->cpumask, cpumask_of(cpu)))returntrue;/* Check if irq affinity can be set */if(newdev->irq >=0&& !irq_can_set_affinity(newdev->irq))returnfalse;/* Prefer an...
intirq_do_set_affinity(struct irq_data *data,conststruct cpumask *mask,boolforce){structirq_desc*desc=irq_data_to_desc(data);structirq_chip*chip=irq_data_get_irq_chip(data);intret; ret = chip->irq_set_affinity(data, mask, force);switch(ret) {caseIRQ_SET_MASK_OK: cpumask_copy(dat...
void (*end)(unsigned int irq); void (*set_affinity)(unsigned int irq, unsigned long mask); }; typedef struct hw_interrupt_typehw_irq_controller; startup是启动中断芯片(模块),使得它开始接收中断,一般情况下,就是将所有被屏蔽的引脚取消屏蔽; shutdown反之,使得芯片不再接收中断; ...
int__initearly_irq_init(void){intcount,i,node=first_online_node;structirq_desc*desc;init_irq_default_affinity();desc=irq_desc;count=ARRAY_SIZE(irq_desc);for(i=0;i<count;i++){---遍历整个lookuptable,对每一个entry进行初始化desc[i].kstat_irqs=alloc_percpu(unsignedint);---分配percpu的...
Can you at least reply here and tell me how to change affinity for the GPIO Bank itself ? Is it possible to do here: kernel/irq/irqdesc.c => desc_smp_init {{{ cpumask_set_cpu(1, irq_default_affinity); cpumask_copy(desc->irq_data.affinity, irq_default_affinity);...
I wanted to set IRQ affinity to some CPU for a particular GPIO interrupt. Please let me know how can I do it. I wanted to do it from my own kernel module. First I tried to do it from sysfs, but it did not work. I tried to use FUNC2 (GPIO138) for gene...
__stubs_end - __stubs_start); memcpy((void *)vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz); /* * Do processor specific fixups for the kuser helpers */ kuser_get_tls_init(vectors); /* * Copy signal return handlers into the vector page, and * set sigreturn to be...
# cat /proc/irq/93/smp_affinity 10 ... A faster option to do that is to use the show_irq_affinity.sh script. # show_irq_affinity.sh ens1 92: 01 93: 02 94: 04 95: 08 96: 10 97: 20 98: 40 99: 80 The output is basically a bit map for the 8 CPUs in this example (01...
* @irq_eoi: end of interrupt294 * @irq_set_affinity: set the CPU affinity on SMP ma...
[irq], &affinity);if(irq_cpu[irq] >= nr_cpu_ids)irq_cpu[irq] = cpumask_first(&affinity);if(irq_cpu[irq] == cpu) {do_IRQ(LS7A_IOAPIC_IRQ_BASE + irq);continue;}/* balanced by other cores */loongson3_send_irq_by_ipi(irq_cpu[irq], (0x1<<(ls7a_ipi_irq2pos[LS7A_IO...