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>
Tue, 22 Feb 2022 15:57:00 +0000 (15:57 +0000)
commit497fd1c2916f04114b4c7be6cf6b95fe1dd1315d
treeec14327672d651073f1185aca7ff50623a15081e
parent4a87940124321965ab2d4c37f21d1101ff9b7db6
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