lkml.org 
[lkml]   [2020]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] genirq/proc: Show percpu irq affinity
Date
Yunfeng Ye <yeyunfeng@huawei.com> writes:

> When the "affinity=" cmdline parameter is configured,

There is no such parameter.

> the interrupt affinity displayed in the proc directory does not match
> with that of the the percu interrupt, and the percu interrupt uses
> desc->percu_affinity.

And when the non-existing parameter is not on the command line then
irq->affinity is showing the correct value magically?

Definitely not: It's unconditionally showing irq->affinity and that is
pretty unlikely to match irq->percpu_affinity in any case.

> diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
> index 32c071d7bc03..b9d0fa87b4b4 100644
> --- a/kernel/irq/proc.c
> +++ b/kernel/irq/proc.c
> @@ -52,6 +52,8 @@ static int show_irq_affinity(int type, struct seq_file *m)
> case AFFINITY:
> case AFFINITY_LIST:
> mask = desc->irq_common_data.affinity;
> + if (irqd_is_per_cpu(&desc->irq_data))
> + mask = desc->percpu_affinity;

This breaks all architecture which mark interrupts as per CPU without
using the partition mechanism resulting in a NULL pointer dereference.

Thanks,

tglx

\
 
 \ /
  Last update: 2020-08-13 10:28    [W:0.132 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site