From nobody Mon Dec 1 22:35:06 2025 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 1CDB732693F for ; Fri, 28 Nov 2025 11:56:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764330963; cv=none; b=GyDwcTdZI5ko06F59ZMd+HuEI42o0xGmH97ub+Cc9MdER1eaU1HiAF7LH6SNOFSi+g3xm8jTXVY5Txu6o36dqTnP0wwb8+IPTurjZn+yy4Pa7WPsRxkvPfjZ1evKZubZUQA0kZ7EMRFpPAwwfiZHZaMo11ZJToy29SQPjieOP8Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764330963; c=relaxed/simple; bh=C/+rg8IAxTevzxpO/Se4XE1tccwa/+JqcQ3ThDH0/l0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dHmoOJxqB5t7Mbao9vOUiPeA4THpZROWJFJJ4plSB5sCqywSgfiTXOU4YjYM2zPRtpKqcd/rwOky/6XxcDAzRG5oCMjC6jD/erdAVQBslRnf0XZakE2h10eeJdlIhAQ7moOxefahmzJaE9rEUs9pRqr/7o4D5+hQ4Pb37iFvoog= 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=yc9T6+W/; arc=none smtp.client-ip=209.85.128.54 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="yc9T6+W/" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-47774d3536dso14571395e9.0 for ; Fri, 28 Nov 2025 03:56:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764330959; x=1764935759; 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=ae53kt1kaP5kLWZ/U4gl1GbpsgIlbD/90J2vkmwtJMY=; b=yc9T6+W/9rWbU5yNQSCUdbj77YZB0RdPpXz1AqTOlNiZDM8BM8lbDpwwR/D42FA43p zzne4prx+3DtmhpVCEICrMF2Gx5XPPSJeCAqtslqWFci1nkxr0fT9UI0IYv5t8ysNMhZ 9HA5LSjy2F40mbxD/6e2VLXUz4QgV8ggZR4BOpUm3Yw/fV9OeiflJf6PMIW/6qltthO3 JIkMy7TY9eWrX33ejC7wCpQ7tiiQLek3v9mBZi8hxn7AtleMsRwAs29dNT4+AtGomdnk YikmRXsFPikmjvfuYvzxcFZwFOIGR6M6C+hEx4im0zsK2jKy7YqNIRw4LkG2gbH0ax5J qN2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764330959; x=1764935759; 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=ae53kt1kaP5kLWZ/U4gl1GbpsgIlbD/90J2vkmwtJMY=; b=gIkvPg40wCWMW28bWoBud96bWNPQpqT0c0218FLGgefeBd2NfbjPlKewalhO6e+Gx9 KhR2H9xzhsTA0tBUv4Ppg30QCjO4Ek1KXTzm2I8Mq3kEUEQgOcNDYd/71TWhQY9fzAcl WJaXrZXirUXovxLZoK4ep1Ncy+aJJCgvF5AEN+VQ9nD+dlQaWQU9IBG4NfzpOkRa9jPx NYHp5Rjwf/cLMbrhn5zS9ao/BLhJ1/pk8NQhldi0+IXuI9xW21xAhzk+ZrQPlJEM11Tv SeKqMfovlhGYbNWGbDG16LR9PcxJYXLLJiuV+xxiQ80SZK4IvB+meL60cKRCReD9qCl6 7usQ== X-Forwarded-Encrypted: i=1; AJvYcCXpVsC9kc32t5A+FJ5d8m/TyZafC24c1x3p/ohCUKug1DuabqtZm/60vexZ8EHRJicudEopH6IenjnUbys=@vger.kernel.org X-Gm-Message-State: AOJu0YwptVwI5Ry2PWXHz0wVwNh8Z1PU6TrEKmRLg4qc1JKyIy1uwopa FHyH1Vql36wttOIrpWTMcr7K8aC5pCj1Y8CaTd+oqC84ReReMhueotkiiXzIBxehRRk= X-Gm-Gg: ASbGncs6o0LdWWPkWTFZVJ0jVqw6CUgC3q+gdiZCXEURlYir7H2da6lZ7yxPNgbDWhy byLcXgUJynndVs2ArYn7jVaUcX0ztZQuju0SfD2lLLX+tLOYRBjrMbCd2GjP3PiNa/dm2Q9nhMK 7+2FzSBvnXBmD8KDYFnUyuDVF2rT/asMHD9phnzgNg5xZwUX9Waos+B3VUYS8rJMaaySNQRnSxV bbpwOQ+rzx13hlvdlqfJUGDSP9yNgeiNf+daMoL92wKF4HAEgijAr7Sw0zNawT+jdtOzoumEPd9 Mrb/M8YgSC236m5KK1UIVV7j0AG7x7LFg/20kiCjONFHRaiIf9a1cgrsIJsfeYiBe/wbmTvMZuu zjAhPtk4paS/Vw+sBMvMOs0FDk6zyTitaWq2Ii54CTjQGanAI80LdraM+uksh+TRNAg3vtuzeFa mLIdcUAEYNTtols4yx+6oI X-Google-Smtp-Source: AGHT+IHmmXmZWvxFJIN++KvkjNQAu8BrPSpq+PPtR4UIJjgdT7j1BzkY1f2m+jA5FMpwm/eknom5XQ== X-Received: by 2002:a05:600c:3784:b0:479:1348:c63e with SMTP id 5b1f17b1804b1-4791348cca8mr38526545e9.9.1764330958941; Fri, 28 Nov 2025 03:55:58 -0800 (PST) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4790adc8bc7sm158974465e9.1.2025.11.28.03.55.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Nov 2025 03:55:58 -0800 (PST) From: James Clark Date: Fri, 28 Nov 2025 11:55:22 +0000 Subject: [PATCH v8 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: <20251128-james-cs-syncfreq-v8-10-4d319764cc58@linaro.org> References: <20251128-james-cs-syncfreq-v8-0-4d319764cc58@linaro.org> In-Reply-To: <20251128-james-cs-syncfreq-v8-0-4d319764cc58@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 Reviewed-by: Mike Leach Tested-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