From nobody Tue Dec 2 02:29:11 2025 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 37DEB371DD1 for ; Wed, 19 Nov 2025 16:18:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763569112; cv=none; b=vAtbfSrbzBnwOERSubL4MUUTpdMMKSWztBhgAgyXYNXw1CiZiB+pWeUMYJu0mzAN0TjkmT2JA3itoUW6IfgCFsewHRXC1JhCvVcTqE9NcU8kNx0LrIsKIioAesDD0Na6ip8/wbJBAjo4TTPAgpr+XnQn86YyoeGg4MFKPitZBDM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763569112; c=relaxed/simple; bh=49yHZcfRU3JYbttPDuMZA+rvwSlgiEO1pFhN/mGFnMQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qvLk7AmM4eyYmBJYCk4OUJfK+wQCwBwR6VoB9CYlZW7tSmLDYTKW1UTue+7GlFdWXvyBStVbGP8SdNk6AoT/SE080EaqHKK9xa6Ub/ozuZdIStfIISn6IMGWEI/+vXqcv66sZaEKU67VO3pWs9kXcf8j0hBAhXrNi2d6voqkfpI= 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=HRGYGvHw; arc=none smtp.client-ip=209.85.128.50 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="HRGYGvHw" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-477b198f4bcso7274655e9.3 for ; Wed, 19 Nov 2025 08:18:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1763569108; x=1764173908; 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=HRGYGvHwIzY3Fy90rYtIFC2shayURTElMCmOzPKj2VU4sV5HD8TybwW1Y/KGTTS83k ztS5dOJL0FNgZm6EaAmLO9213XYYwWQPL2vG5sutRtL+8FNaM1qh4WVuO8Yq7DG0Hste WCy4BrsIZq+AMDVniyhs4R5nxedxMRfkhmPgMKArQ7+d0hlx++uQEdGf/SmNLx0QeTP8 ADeQZmCWcFIb7W5qUCmxL9nlOlsee1lROVjreGp2iUBjoIOAx6xCfz71zDt6kSht/FIj ptE4EVMxfnixafEOB0pNuxuswO89Y/jaV053WyQgydivh9KQQK+TTY/ziZ3bcwXUOVO9 iwjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763569108; x=1764173908; 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=i5dB78S12U88P1ZEn5XUYXrWsQxMnsatSshB0VHMGzh3D/FEEgSeXd0wImDTw8Uikw E1pcrd5Kfd+RXVhw7nH9/hXlOo/XE/12oM6OY/Y3J1mgJcGm4JIrd4Nt6xFXKwJk9n9k SPRExozJhqqfnUFoo2S81MPeXXaNvgruaPdWYmHHlNeQeQA4ARdYMin3mLrgetD37oee p85TWOdSsf7Tr57LB7jsJSIGT2D0b9X0u70a0UCekMQ9nrpLmtYCpqsuVheV4HxKKNoA yRGfSUML+gPEqPZ4lW6xMmFgMunFion1GVIYk7otAruX1vCZFBpeoHIGSgzDJB8sSTm/ 6bCw== X-Forwarded-Encrypted: i=1; AJvYcCXiEgegxJaTyyUUFUxF3DDMGMsu2e/Qzy3fJQoqmegR+uevkKT1Cg8dLfLXQ7r3I6dx8bZ+0VMupz6zxZ4=@vger.kernel.org X-Gm-Message-State: AOJu0YxLe77Q+AJz5xTHTkz9pcST5erQV87cokxxBI7pC2iA3YzX6f38 lviO+dP1COyp9zpj3RKZlxudrXbuElVNbECJ79SnmEOmVmKTWD7RD8ETF50NLC/yN5o= X-Gm-Gg: ASbGnctVaswuPNSMi4GZzCit14qc8IGwG4jqNvCTf6C38PfdRTGFhheYlQe4BcuJ7IW ojsqgTsxkvSn6BD+GMyft90VaVRDGtF/1u5MPO7VPdqCfjmY1DnodFk1ZGRkFJ2ABGJw3O9+BqS AzczMIaCDwyCy+xi5epJQIoncjAc63kg8VIFjteoYlGXRVb+ouLdwA/T6ZZDecvxWHjIgyHrnVN rFHKGpGAzdHbJ1Pt8AcIAp/MUqW4RwEx6DXcllnbPtqtGxVaUzLIMOBsnfmirzjfY6IGGjuRarW eOCh6WrPZBaJHrAo17ovUKCakHASc6L42QE0+LB09WaSyFd4dV2W8oPhvKWZ3Tk6nW7su0NO7aK HLv7GYpm5y5Br2MhDvBQYZw5bSvBHFwIHDYTeWf0Kt3t2a0Yf4gQCYYlGNGRXiTqC8wTOdnjAoh BMD4w5LDdIuMAYyd8I/m4+8pBFlRks6xk= X-Google-Smtp-Source: AGHT+IFsnnLdq4HmiJTipQU11eFgkr91zE4cIVpOobeHeqJ1i8hpmzg559qdmMNA7bAMZf8QSN84zA== X-Received: by 2002:a05:600c:1caa:b0:477:76cb:4812 with SMTP id 5b1f17b1804b1-4778fe0694amr230601115e9.0.1763569108491; Wed, 19 Nov 2025 08:18:28 -0800 (PST) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-477b10142d3sm63205425e9.5.2025.11.19.08.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Nov 2025 08:18:28 -0800 (PST) From: James Clark Date: Wed, 19 Nov 2025 16:18:06 +0000 Subject: [PATCH v6 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: <20251119-james-cs-syncfreq-v6-10-740d24a29e51@linaro.org> References: <20251119-james-cs-syncfreq-v6-0-740d24a29e51@linaro.org> In-Reply-To: <20251119-james-cs-syncfreq-v6-0-740d24a29e51@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 --- 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