@@ -10,6 +10,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
+#include <linux/types.h>
#include "arm-spe-pkt-decoder.h"
@@ -292,7 +292,7 @@ static int arm_spe_pkt_out_string(int *err, char **buf_p, size_t *blen,
static int arm_spe_pkt_desc_event(const struct arm_spe_pkt *packet,
char *buf, size_t buf_len)
{
- u64 payload = packet->payload;
+ uint64_t payload = packet->payload;
int err = 0;
arm_spe_pkt_out_string(&err, &buf, &buf_len, "EV");
@@ -332,7 +332,7 @@ static int arm_spe_pkt_desc_event(const struct arm_spe_pkt *packet,
static int arm_spe_pkt_desc_op_type(const struct arm_spe_pkt *packet,
char *buf, size_t buf_len)
{
- u64 payload = packet->payload;
+ uint64_t payload = packet->payload;
int err = 0;
switch (packet->index) {
@@ -429,7 +429,7 @@ static int arm_spe_pkt_desc_addr(const struct arm_spe_pkt *packet,
{
int ns, el, idx = packet->index;
int ch, pat;
- u64 payload = packet->payload;
+ uint64_t payload = packet->payload;
int err = 0;
static const char *idx_name[] = {"PC", "TGT", "VA", "PA", "PBT"};
@@ -469,7 +469,7 @@ static int arm_spe_pkt_desc_addr(const struct arm_spe_pkt *packet,
static int arm_spe_pkt_desc_counter(const struct arm_spe_pkt *packet,
char *buf, size_t buf_len)
{
- u64 payload = packet->payload;
+ uint64_t payload = packet->payload;
const char *name = arm_spe_pkt_name(packet->type);
int err = 0;
u64 is used for various structs in arm-spe-decoder.h, while uint64_t is used in arm-spe-pkt-decoder.h. Avoid transitive dependencies bringing in linux/types.h and directly depend upon it in arm-spe-decoder.h. Fix arm-spe-decoder.c to use uint64_t, as the header file does. Signed-off-by: Ian Rogers <irogers@google.com> --- tools/perf/util/arm-spe-decoder/arm-spe-decoder.h | 1 + tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-)