Re: [PATCH v2 6/7] tracing/user_events: Use bits vs bytes for enabled status page data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 26 Jul 2022 19:01:47 -0700
Beau Belgrave <beaub@xxxxxxxxxxxxxxxxxxx> wrote:

> Ah, I see the confusion. Sorry.  
> 
> EVENT_STATUS_* are internal bits that aren't used with STATUS_MASK or
> STATUS_BYTE. It's only used to set and check the user event status byte
> for checking if anything is attached and outputting which probe is
> connected within the kernel side.
> 
> STATUS_BYTE and STATUS_MASK take a bit in a bitmap and figure out which
> byte in the status mapping should be used and which bit in that byte
> should be set/reset (mask) when it's enabled/disabled via a probe. Both
> the user and kernel need to align on this logic.
> 
> IE: Bits above the lower 3 of the index/bit of the event to enable is the byte
> and the lower 3 bits (& 7) is the actual bit to set.
> 
> For example if the user_event with the index 1024 is enabled, we need to
> figure out which byte and bit represents that event when a probe is
> attached.
> 
> I got into detail of this in the documentation for both a byte and long
> wise checking of these values.
> 
> Hope that helps explain it.

Yes, but that should be in the comments above the code.

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux