From nobody Tue Dec 2 02:42:37 2025 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 154D53A5E8C for ; Tue, 18 Nov 2025 16:28:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763483308; cv=none; b=QtMbHnrBjiPSeM0VPxGx33Le7VR/+JOBFVk+rO952j218rnl0/H1o+M7vkGrhltOdwrii0SfzbK1VYdVb215Bnyv7en7RExAZZ41A6Hbip5zNDJJ66QJfLH4GQGnQJCOFisCsi7o4GX4G4IwLc1xj7HplEEnNbnqAVAk+TOfzHs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763483308; c=relaxed/simple; bh=49yHZcfRU3JYbttPDuMZA+rvwSlgiEO1pFhN/mGFnMQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Wrjrf9JjHYLysPPvr3148kgoDEFLv3UoE99VJetvIimZ15Lg0qM+gDUxqd0D59Chw89kYh46ZtK5FaL4ZK8uFzMu3E3h566ZER7s4BB5Nd7EEX651vlbOKWyyZgpfZrNMu9teGXRj/GcVybAMlo2F776KjTIgjv8lQIVtHBZ5uc= 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=k5PdzVip; arc=none smtp.client-ip=209.85.128.46 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="k5PdzVip" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-47775fb6c56so58286515e9.1 for ; Tue, 18 Nov 2025 08:28:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1763483304; x=1764088104; 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=d0ofk2DnhJ+xH+9yXlJaWK4ofE7g/nNzRBk1/VuwE+Y=; b=k5PdzVipAFg44lyrdgHJF2sM9KpOvLi4KIfkHWuF1MJjPEDMl2NX3QWjtkfRdE5aOO cj6w8zivpCZKIzS9aIVA+plYOTJNtv37YXnE3GfL2GdNgdDR2RMjC5EycXlirmz71K+r AFDZJPuQvuFS2lRU2LhKKjXvPiAP2Yasiwz+3QFAJkbCI+Nzb7cGTFWeevePyvJMPt0G DgIWC1SxRm473hxvs45lfUywtkdD0LKugnImT826SIiulbv8tzXxJx9WXD2RP0Gd/mfi 8jsQDV96YCxeV4EB80M6xMxG+3feZNRP1eTOjU3OU4xdDW4pzrNqQ4tt6uUVEwCnuJXS lttQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763483304; x=1764088104; 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=d0ofk2DnhJ+xH+9yXlJaWK4ofE7g/nNzRBk1/VuwE+Y=; b=TxxMGKDQGrdUM5Ui0/dzsNJUORxO6kZc9IWH13/CXQrYqEJ9WBydujONyF3t3wfqBv puSarPws8EzTS+6Ub2j9/BxShdJuaVuMIkNTdbi3Vowy5fZx7TtX8/qbENVMmNz43UbJ ZCHtAvmPy5YpDDNi1y0pZCn1CcOt6wbl5fr8Mw6iTBmJqXoNwcDyeks5UUK6VDKcd9c9 AwlpDyyoa3gaf5Ud90wrAj+V/EvnMGbNQpSTPH0PzdgfmnJj3sT4msSSIbNFTHjoC01Z ZXuNAWhmz01eK0RzcykgoHFLM8JDDPBBpU297H72cKhfUNIRP9lw8fH6zVhYbiTUNnQh 2Cjw== X-Forwarded-Encrypted: i=1; AJvYcCWPa6QO2nke0sakMyuzhfn51FJCRoIBNGXs6+oh+LbvO0jhjoNjSwhZ5DkfbGC23pPyDuLXm98IATJBqgc=@vger.kernel.org X-Gm-Message-State: AOJu0Ywb+qSPLEBo3W9doMIKq1OoYsWVLF7N055zL88v2Afkd4Pl1fc6 JyQmqjYiguyE0A96ucVapIKLIHM5wqq9vEbVbLq9M/iIeplAFUeRE9ginTTKrMa8BJQ= X-Gm-Gg: ASbGncvOpXej/z/WmfAk7olnVSh82rs6m2zaL0K6BThQ9FnyYRTXhErrtCq3go9po+o o/WKPTFav18znIGywOwwn1NJ3489PWc3/frcAUnh9yCF5D4kxoIZ66UTGMwtZmhfkPR+YYmMYIE TkFQKKNS/8FgIVcKtG3kHpkI3ksISO1m6mjq4yYAQZyNOPnmoibR9MwcWUpgVbcG93uWbNeqp5B rBS2MzBOldiVGFXs98z4/D6e77i4A+jpiCf4BXnxVErYMz2Y7GDueZ6NXGe6pLSuuPYr0x0Z3G7 zLa/n7HVoS0eIX0R3AQGvbGwzrfzeOWb/mswZUSQk2GYH1KD8oX5ATDLm6joSqr4k/5QTD3dLLt zX8OloHKrkKQ3lYsyl5bHBUVPt+qfbviYfWm3ZE4VivJckNYpWYDfslFX9gV6MKJyKT6A49mxMg AphUCUbB8GtmLdHKvvR7jwSDjwloWej+abXKpazQNiPQ== X-Google-Smtp-Source: AGHT+IEOUUUOt7+haNfNY7f4WMr2XAw5LyRTouQ6puNuomap6F1bvehMt9KTpJ7UVZBkfF6l25TEgg== X-Received: by 2002:a05:600c:630d:b0:477:89d5:fdac with SMTP id 5b1f17b1804b1-4778fea1becmr184750085e9.31.1763483304287; Tue, 18 Nov 2025 08:28:24 -0800 (PST) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-477a9dea7fcsm20369125e9.8.2025.11.18.08.28.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Nov 2025 08:28:23 -0800 (PST) From: James Clark Date: Tue, 18 Nov 2025 16:28:00 +0000 Subject: [PATCH v5 10/13] coresight: Remove misleading definitions 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: <20251118-james-cs-syncfreq-v5-10-82efd7b1a751@linaro.org> References: <20251118-james-cs-syncfreq-v5-0-82efd7b1a751@linaro.org> In-Reply-To: <20251118-james-cs-syncfreq-v5-0-82efd7b1a751@linaro.org> To: Suzuki K Poulose , Mike Leach , Alexander Shishkin , Jonathan Corbet , Leo Yan , Randy Dunlap Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 ETM_OPT_* definitions duplicate the PMU format attributes that have always been published in sysfs. Hardcoding them here makes it misleading as to what the 'real' PMU API is and prevents attributes from being rearranged in the future. ETM4_CFG_BIT_* definitions just define what the Arm Architecture is which is not the responsibility of the kernel to do and doesn't scale to other registers or versions of ETM. It's not an actual software ABI/API and these definitions here mislead that it is. Any tools using the first ones would be broken anyway as they won't work when attributes are moved, so removing them is the right thing to do and will prompt a fix. Tools using the second ones can trivially redefine them locally. Perf also has its own copy of the headers so both of these things can be fixed up at a later date. Reviewed-by: Leo Yan Signed-off-by: James Clark Reviewed-by: Mike Leach --- include/linux/coresight-pmu.h | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/include/linux/coresight-pmu.h b/include/linux/coresight-pmu.h index 89b0ac0014b0..2e179abe472a 100644 --- a/include/linux/coresight-pmu.h +++ b/include/linux/coresight-pmu.h @@ -21,30 +21,6 @@ */ #define CORESIGHT_LEGACY_CPU_TRACE_ID(cpu) (0x10 + (cpu * 2)) =20 -/* - * Below are the definition of bit offsets for perf option, and works as - * arbitrary values for all ETM versions. - * - * Most of them are orignally from ETMv3.5/PTM's ETMCR config, therefore, - * ETMv3.5/PTM doesn't define ETMCR config bits with prefix "ETM3_" and - * directly use below macros as config bits. - */ -#define ETM_OPT_BRANCH_BROADCAST 8 -#define ETM_OPT_CYCACC 12 -#define ETM_OPT_CTXTID 14 -#define ETM_OPT_CTXTID2 15 -#define ETM_OPT_TS 28 -#define ETM_OPT_RETSTK 29 - -/* ETMv4 CONFIGR programming bits for the ETM OPTs */ -#define ETM4_CFG_BIT_BB 3 -#define ETM4_CFG_BIT_CYCACC 4 -#define ETM4_CFG_BIT_CTXTID 6 -#define ETM4_CFG_BIT_VMID 7 -#define ETM4_CFG_BIT_TS 11 -#define ETM4_CFG_BIT_RETSTK 12 -#define ETM4_CFG_BIT_VMID_OPT 15 - /* * Interpretation of the PERF_RECORD_AUX_OUTPUT_HW_ID payload. * Used to associate a CPU with the CoreSight Trace ID. --=20 2.34.1