Re: Question about the ipi_raise filter usage and output

From: Steven Rostedt
Date: Mon Feb 05 2024 - 08:07:53 EST


On Mon, 5 Feb 2024 10:28:57 +0000
Mark Rutland <mark.rutland@xxxxxxx> wrote:

> > I try to write below:
> > echo 'target_cpus == 11 && reason == "Function call interrupts"' >
> > events/ipi/ipi_raise/filter
>
> The '=' checks if the target_cpus bitmap *only* contains CPU 11. If the cpumask
> contains other CPUs, the filter will skip the call.
>
> I believe you can use '&' to check whether a cpumask contains a CPU, e.g.
>
> 'target_cpus & 11'

11 == 0xb = b1011

So the above would only be true for CPUs 0,1 and 3 ;-)

I think you meant: 'target_cpus & 0x800'

I tried "1 << 11' but it appears to not allow shifts. I wonder if we should add that?

-- Steve