From patchwork Sun Mar 10 02:05:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13587986 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A383E2CCA4 for ; Sun, 10 Mar 2024 02:05:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710036354; cv=none; b=T8Fqc7VvsSi2vM84ZvyjZfEtJyT29kOYG0I63rDAwb0T0sKdUSHb7bI4wgcVej2hAlgNdDjGP9nXSIUx/BAiRbZ9hfO3uhuW7CCecaqeT9buYaM8UsgZwLODPAfNDNwkO3+Lp9v2GKCR/nAX73GGXujCft9+y5WgWKbg1gdPxr8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710036354; c=relaxed/simple; bh=nyI9dgaoU2HMw/TgIDnIDYrLQif8D0L3I6qaHvxp6Ug=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=s5T2jCP5y4z3koDbB3DpKXqkfXuh2Bcx0kJAVSbXq65v5xULlilq1GE/7vL8WFJW1bbKjK9Iq6Lut11LIxrNmTUh3vH3Ti/xvkFTxjL5rcNyCH08W8SAkS8MYZ2jdJInWgu+iV+vTWl8vXHNvnv2HWAO3Iv4OG/vQf+gEQbtqYo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=wez/FaFs; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="wez/FaFs" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-60a0a5bf550so28763217b3.3 for ; Sat, 09 Mar 2024 18:05:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1710036351; x=1710641151; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=/s3J+Sp6Nwm5vYKq4/rEI+V8C3zBszpK/wcDil3Uhsk=; b=wez/FaFsRjHRkv0PxDcesvwFad++DgjbL5QV9cfERctSQJoTj2UXGQ9UA0SVyrBMS1 MmWpxfWDlUlmdFQZzAEfEc9cequA/fJUA24J4wmP1XJuT86NqcIMF3zamj22F9LCMRB2 2ZcKcGrrMeu8Ya8Icq9g9DKOhaG/tIwJ17Qjsw46RzsTNDBEkfF//4FHu1n0YJxEgIbx 41qP3ACy74XDqDuHmaSaQOMGeDw20pQSVKcAD4QAAalvxoCkw4TvMsv/sgdx2Hl3rQYa UX70j7T0A8KWX512RuVd3u3LTJvu/rcq5dYIpQYApfjWtnlGgWDhMvKiMDR08SBCjXeC U2Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710036351; x=1710641151; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/s3J+Sp6Nwm5vYKq4/rEI+V8C3zBszpK/wcDil3Uhsk=; b=FW9+je8bvgI5IGuljBVh9GtxfFvnVku2grXbXSa0tgM65BcnlCtv7DyH0RFhz5SqeC Ah6NsQtcBmdpOoqqZUVIDRoVVuLU+Ng76O2dwRLO46ID6aKBN3XiQifOUfw0L/87N1/d aMkwSBjlITkZBCROkp1Mde1REfDTwcbR3afSqclmhaolc12VOLULxy3JCtsBOThWfLj1 AI2+YiNFelwOaABK5unJSiX6V5jGWibxGWLkghTmTgtaBqN/erEIh39ygN70EU9hqqXc FVfoiB63BCjINHalyWSngJVQIukdB7VwIbEBSdiDPieRYZkQVLYLTWLVQqCrKqLW4G51 gIqg== X-Forwarded-Encrypted: i=1; AJvYcCXX2qVLnFS++eEMHhQVBeiL0U3Vr4Wn5PTeb0kP4POZ/usgfotEpDBgVBueJiR020WOfkIrQ1IMzSFKsPYLByVeEdIa X-Gm-Message-State: AOJu0YxC0DXauCYy3wZ1gCgyA7kFV83v/qTavdq4kh0al3Hb3ScbEA63 KPDKOSqvy4Q7IivS0ietgrDlfUfCQ9WnVId700KGFiD8aMnauRfMjbflOE4zusd1c5FXneuCzbG 36TMyIg== X-Google-Smtp-Source: AGHT+IHPD3AdhB6c0T/TfiXMF4uI00y32OTKxm5DEXBOiPnGnfJTzAmtckpif5kyd4Qr/BOAcbdh5KWG2LgR X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:a63d:1b65:e810:3ad3]) (user=irogers job=sendgmr) by 2002:a0d:dd04:0:b0:60a:25ce:c165 with SMTP id g4-20020a0ddd04000000b0060a25cec165mr362319ywe.6.1710036351589; Sat, 09 Mar 2024 18:05:51 -0800 (PST) Date: Sat, 9 Mar 2024 18:05:03 -0800 In-Reply-To: <20240310020509.647319-1-irogers@google.com> Message-Id: <20240310020509.647319-9-irogers@google.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240310020509.647319-1-irogers@google.com> X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Subject: [PATCH v1 08/13] perf arm-spe: Add missing linux/types.h include From: Ian Rogers To: Arnd Bergmann , Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Ian Rogers , Adrian Hunter , Paolo Bonzini , Shuah Khan , Kees Cook , "Gustavo A. R. Silva" , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Andrew Morton , Liam Howlett , Miguel Ojeda , Will Deacon , Mark Brown , David Laight , "Michael S. Tsirkin" , Shunsuke Mie , Yafang Shao , Kui-Feng Lee , James Clark , Nick Forrington , Leo Yan , German Gomez , Rob Herring , John Garry , Sean Christopherson , Anup Patel , Fuad Tabba , Andrew Jones , Chao Peng , Haibo Xu , Peter Xu , Vishal Annapurve , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-hardening@vger.kernel.org, llvm@lists.linux.dev 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 --- 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(-) diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.h b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.h index 1443c28545a9..da5c5816c948 100644 --- a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.h +++ b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.h @@ -10,6 +10,7 @@ #include #include #include +#include #include "arm-spe-pkt-decoder.h" diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c index a454c6737563..e035f49f28ad 100644 --- a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c +++ b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c @@ -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;