mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
perf arm_spe: Decode SME data processing packet
For SME data processing, decode its Effective vector length or Tile Size (ETS), and print out if a floating-point operation. After: . 00000000: 49 00 SME-OTHER ETS 1024 FP . 00000002: b2 18 3c d7 83 00 80 ff ff VA 0xffff800083d73c18 . 0000000b: 9a 00 00 LAT 0 XLAT . 0000000e: 43 00 DATA-SOURCE 0 Signed-off-by: Leo Yan <leo.yan@arm.com> Reviewed-by: Ian Rogers <irogers@google.com> Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
@@ -351,6 +351,15 @@ static int arm_spe_pkt_desc_op_type(const struct arm_spe_pkt *packet,
|
||||
arm_spe_pkt_out_string(&err, &buf, &buf_len, " FP");
|
||||
if (payload & SPE_OP_PKT_SVE_PRED)
|
||||
arm_spe_pkt_out_string(&err, &buf, &buf_len, " PRED");
|
||||
} else if (SPE_OP_PKT_OTHER_SUBCLASS_SME(payload)) {
|
||||
arm_spe_pkt_out_string(&err, &buf, &buf_len, "SME-OTHER");
|
||||
|
||||
/* SME effective vector length or tile size */
|
||||
arm_spe_pkt_out_string(&err, &buf, &buf_len, " ETS %d",
|
||||
SPE_OP_PKG_SME_ETS(payload));
|
||||
|
||||
if (payload & SPE_OP_PKT_OTHER_FP)
|
||||
arm_spe_pkt_out_string(&err, &buf, &buf_len, " FP");
|
||||
} else if (SPE_OP_PKT_OTHER_SUBCLASS_OTHER(payload)) {
|
||||
arm_spe_pkt_out_string(&err, &buf, &buf_len, "OTHER");
|
||||
if (payload & SPE_OP_PKT_OTHER_ASE)
|
||||
|
||||
@@ -125,10 +125,21 @@ enum arm_spe_events {
|
||||
|
||||
#define SPE_OP_PKT_OTHER_SUBCLASS_OTHER(v) (((v) & GENMASK_ULL(7, 3)) == 0x0)
|
||||
#define SPE_OP_PKT_OTHER_SUBCLASS_SVE(v) (((v) & (BIT(7) | BIT(3) | BIT(0))) == 0x8)
|
||||
#define SPE_OP_PKT_OTHER_SUBCLASS_SME(v) (((v) & (BIT(7) | BIT(3) | BIT(0))) == 0x88)
|
||||
|
||||
#define SPE_OP_PKT_OTHER_ASE BIT(2)
|
||||
#define SPE_OP_PKT_OTHER_FP BIT(1)
|
||||
|
||||
/*
|
||||
* SME effective vector length or tile size (ETS) is stored in byte 0
|
||||
* bits [6:4,2]; the length is rounded up to a power of two and use 128
|
||||
* as one step, so ETS calculation is:
|
||||
*
|
||||
* 128 * (2 ^ bits [6:4,2]) = 32 << (bits [6:4,2])
|
||||
*/
|
||||
#define SPE_OP_PKG_SME_ETS(v) (128 << (FIELD_GET(GENMASK_ULL(6, 4), (v)) << 1 | \
|
||||
(FIELD_GET(BIT(2), (v)))))
|
||||
|
||||
#define SPE_OP_PKT_LDST_SUBCLASS_GP_REG(v) (((v) & GENMASK_ULL(7, 1)) == 0x0)
|
||||
#define SPE_OP_PKT_LDST_SUBCLASS_SIMD_FP(v) (((v) & GENMASK_ULL(7, 1)) == 0x4)
|
||||
#define SPE_OP_PKT_LDST_SUBCLASS_UNSPEC_REG(v) (((v) & GENMASK_ULL(7, 1)) == 0x10)
|
||||
|
||||
Reference in New Issue
Block a user