From nobody Mon Feb 9 18:44:32 2026 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 DE09332AAD4 for ; Mon, 22 Dec 2025 15:15:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766416506; cv=none; b=E9+QZydgfFs64bfBo2RzICeABfbAhtakTWxB+vDg2I4ApTdQmrM93O8wLb+mm1o/gxW/1v0EQ+9kt1t1ifqq5gicwZUzO2cEQOMhWICMEtSoazF2AvXGi+EK7oyFfsf3oehB/hXbC/j2PN8Qdfq2/W3SAboPT0wW2sA1TBs8+0Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766416506; c=relaxed/simple; bh=qfRSou8Gjtk8a4ox+K4x5qRrVK3aLa89yRlL85yDPKk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DH7XlLeq99btY9JvDlvWlMPWMvywcAGClWRZkpjzCeYe9AEGiJRF6xkAxklkBQA1kfnLrXTs4+mhMNI7ORHJdjMwj7iCuppQ14IYNNmREw+CYZp6XoZBTYD0J4/YB2T76eA68zL6rRf1o5ryHbsm/5FbQgPHxQzKi14EFBxmMFo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kc2GUwWL; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kc2GUwWL" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-42b3d7c1321so2413487f8f.3 for ; Mon, 22 Dec 2025 07:15:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766416502; x=1767021302; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=2jQ8W5nzp73oSPJlX5Jug7ze2sl2RQ53Mf0/SiitI2Y=; b=kc2GUwWLXZYOjYQ76X4inM8w3ZOmIxmQX9cVKFLkweq/Eb/t54vobLaPw19FVbyvwZ LdsXK+GrZfi8LltCFAoyPOGcwKnS3BGVJZq6SGppvoHGOzHX7W+upgNM9e9UsZswdpMS INcVEa8VKcbMFzqfD44BYLFqfZcrtU/Vp3bSXcWXoF5MbFeuiGQoePR0PQcl46geBcUu Nim5aNslJlD8aPE2exkcWpdFKp8QN13+rHFqN24npDy/vhaVs1hIFQBWktaYabfRDRv4 kS0lKRiwAovwSgAAh61XAtUiF9wS7DXUIOKVXzDjc/ENyXiivM38dAXB6Qc4pr/fXEkg sYZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766416502; x=1767021302; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=2jQ8W5nzp73oSPJlX5Jug7ze2sl2RQ53Mf0/SiitI2Y=; b=ARigx9D57ztddtIv3wK0Ygn4CbMgC4iZzfyOgskSMeHZ1h4nj4QSwAisj8+yXL++BZ VoQlvKQu8ze0wYeUBXGjUFxnFw4NE3THlf5wEUJPrRHyvT+Hq9Jlr57aoSgaU7H77n1f HKbUo9PDwMtWLjRB9iwxMCyA+1YlB/PsUigU0Ed5ZPVHGPC1JfH4uDAbk8Aj9UHbuIBb Z2qTNWtyM6mi4NYVHhFNTbWR3op4rVN7Hcd/QvnT+4Dw0aJ3Ow0MjnK673f7WGCkhltJ hIQ4hCLX5HRsI4Gw4zTsZp3RY1Y1kLwVT1o/X0JhonQT20uQkgohaF8ojrVPcEWZSBxH pxuQ== X-Forwarded-Encrypted: i=1; AJvYcCUsb/qFj1pNEy2Xo6b96Anz2HGJwgylNbezCRc9R2Uw7w/oNL+7IObKPGbs7VpBtb+XJ2LRk5f8CPRGHsA=@vger.kernel.org X-Gm-Message-State: AOJu0YzMQAoRO1OX4Gl+RHHJUnTyLjp9y8byT6La+5oTywG1Bksf9mBt dHLOfAdKHTb56b2BR4b096SwXDDBw4iIuGeeMDFF9QQrrGCVfd6JJLidMkH6cmEQm10= X-Gm-Gg: AY/fxX7P7LZcm/0rMrz1vm6nIbExDYpw/4zWdpNpfFzuKfxCs5joyo6y8Y2VKs8FXrA Vb5p34kZgb+rv6VcT9mUm3MucqvmLJ3rrWOZ6m2TmdRk9g3num319aaNnU53LGA/eFVz0UEY7sn OLHUzoQq9tpqGCkTCKHFgmET9JQTzUSCcfuvqvkks/pNleE6Nxn+J8/VAGRGwGljowccs0tFJr5 W7vZmQ0wpB51aZ3CBHLk42iXt967xsNVH6Jci9olnRR/XrdNl7vEOXfiatjE2MpESThbAnHEw0h 8wpgu2nSOP/rlktjplkYj9wVwunv8x1GRW4xbmyLszUtZcQY0Q5AY2QnSRcyZhR+ctQUagUOUqS xM6vyah/VdS2EWUe2nFbp7XnfubYR6bxi08x9bALoNgOz4+rJbq7qBJ6e17LmK14sSPxWvur7fC mVfdR2FED1SPW4rexeL11A X-Google-Smtp-Source: AGHT+IGVW2AQoFnt+YQeUkk1+45K7c9zrckQIjMupb2A7/EyJF6AN1n+ruma4tqVGKfvSqChhpvFvg== X-Received: by 2002:a05:6000:22c9:b0:430:f72e:c998 with SMTP id ffacd0b85a97d-4324e51081bmr14459005f8f.51.1766416502023; Mon, 22 Dec 2025 07:15:02 -0800 (PST) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea830fesm22750093f8f.20.2025.12.22.07.15.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Dec 2025 07:15:01 -0800 (PST) From: James Clark Date: Mon, 22 Dec 2025 15:14:39 +0000 Subject: [PATCH v4 14/14] perf arm-spe: Don't hard code config attribute Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251222-james-perf-config-bits-v4-14-0608438186fc@linaro.org> References: <20251222-james-perf-config-bits-v4-0-0608438186fc@linaro.org> In-Reply-To: <20251222-james-perf-config-bits-v4-0-0608438186fc@linaro.org> To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Suzuki K Poulose , Mike Leach , John Garry , Will Deacon , Leo Yan Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, James Clark X-Mailer: b4 0.14.0 Use the config attribute that's published by the driver instead of hard coding "attr.config". Reviewed-by: Ian Rogers Signed-off-by: James Clark --- tools/perf/arch/arm64/util/arm-spe.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/u= til/arm-spe.c index 51014f8bff97..17ced7bbbdda 100644 --- a/tools/perf/arch/arm64/util/arm-spe.c +++ b/tools/perf/arch/arm64/util/arm-spe.c @@ -256,7 +256,7 @@ static __u64 arm_spe_pmu__sample_period(const struct pe= rf_pmu *arm_spe_pmu) =20 static void arm_spe_setup_evsel(struct evsel *evsel, struct perf_cpu_map *= cpus) { - u64 bit; + u64 pa_enable_bit; =20 evsel->core.attr.freq =3D 0; evsel->core.attr.sample_period =3D arm_spe_pmu__sample_period(evsel->pmu); @@ -288,9 +288,10 @@ static void arm_spe_setup_evsel(struct evsel *evsel, s= truct perf_cpu_map *cpus) * inform that the resulting output's SPE samples contain physical addres= ses * where applicable. */ - bit =3D perf_pmu__format_bits(evsel->pmu, "pa_enable"); - if (evsel->core.attr.config & bit) - evsel__set_sample_bit(evsel, PHYS_ADDR); + + if (!evsel__get_config_val(evsel, "pa_enable", &pa_enable_bit)) + if (pa_enable_bit) + evsel__set_sample_bit(evsel, PHYS_ADDR); } =20 static int arm_spe_setup_aux_buffer(struct record_opts *opts) @@ -397,6 +398,7 @@ static int arm_spe_recording_options(struct auxtrace_re= cord *itr, struct perf_cpu_map *cpus =3D evlist->core.user_requested_cpus; bool discard =3D false; int err; + u64 discard_bit; =20 sper->evlist =3D evlist; =20 @@ -425,9 +427,8 @@ static int arm_spe_recording_options(struct auxtrace_re= cord *itr, evlist__for_each_entry_safe(evlist, tmp, evsel) { if (evsel__is_aux_event(evsel)) { arm_spe_setup_evsel(evsel, cpus); - if (evsel->core.attr.config & - perf_pmu__format_bits(evsel->pmu, "discard")) - discard =3D true; + if (!evsel__get_config_val(evsel, "discard", &discard_bit)) + discard =3D !!discard_bit; } } =20 --=20 2.34.1