coresight: no-op refactor to make INSTP0 check more idiomatic
authorJames Clark <james.clark@arm.com>
Thu, 3 Feb 2022 11:53:35 +0000 (11:53 +0000)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 3 Feb 2022 12:09:46 +0000 (12:09 +0000)
commitf070c87f5c89a6cec5249d4f26063c0b6378953c
treec2a3b67a78d4a71d01fee084d7742bc2808940c7
parentdf33c8b18f923294eb2553960cda10010ecd62c9
coresight: no-op refactor to make INSTP0 check more idiomatic

The spec says this:

  P0 tracing support field. The permitted values are:
      0b00  Tracing of load and store instructions as P0 elements is not
            supported.
      0b11  Tracing of load and store instructions as P0 elements is
            supported, so TRCCONFIGR.INSTP0 is supported.

            All other values are reserved.

The value we are looking for is 0b11 so simplify this. The double read
and && was a bit obfuscated.

Suggested-by: Suzuki Poulose <suzuki.poulose@arm.com>
Signed-off-by: James Clark <james.clark@arm.com>
Link: https://lore.kernel.org/r/20220203115336.119735-2-james.clark@arm.com
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
drivers/hwtracing/coresight/coresight-etm4x-core.c