From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42F3A3B47DE for ; Fri, 19 Jun 2026 16:01:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781884920; cv=none; b=iJ9y3qULezBBH3J2OSaj/ZyFVJwH2MCUmF67G4bnJnO0G6WSTpAHCzpgzWS9GTiLjhneii2bIUTuO1u3Vt5qCAbMZBsN1Re+FZebm3wsbMl8qcX5fTgPa881rQo2T4xkXqYtdw0VdU/8326NIkvKw2g9UQ/736Vx9AO+lG+493Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781884920; c=relaxed/simple; bh=pzRcJ1JSUtuxzKGTQRcC0BWS7t2xfb3vLNddKCSQslo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DjVP0gx70qN2pk2QMVh3y0siGgMw65jTsLTJHbjfq/YwMsSOOTO9q3yOxvQrlFQS56+dHIJahXl0elTyT4sir/TLFYS+YlsX0/xD+iYkLaJre/aITqPvy7A2QAyD5VrgtC7Wa1s2wgn+7d7k1w32aZbuPf5/17vqKnm3r3uEIMo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=qtcQyUdg; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="qtcQyUdg" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3984E27DC; Fri, 19 Jun 2026 09:01:48 -0700 (PDT) Received: from e142892.manchester.arm.com (e142892.arm.com [10.33.8.89]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3009E3F763; Fri, 19 Jun 2026 09:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1781884912; bh=pzRcJ1JSUtuxzKGTQRcC0BWS7t2xfb3vLNddKCSQslo=; h=From:To:Cc:Subject:Date:From; b=qtcQyUdg1tNB+IT/XBYNPuOWfWnNTyCqeCUBA7+jAtf3Q4920r+BZId3KK2CGZGjd aw0CrYDbaNq1yy09G+dbuWmfN+mOuVPVXi/ZaILEQzq8jzQjxBadFqgy175OeXdFgH Ylx+kPkpc1tpQGflzrmplwhPCBEB00CCPDLRadYQ= From: Mike Leach To: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: suzuki.poulose@arm.com, leo.yan@arm.com, james.clark@linaro.org, Mike Leach Subject: [PATCH v3 0/1] coresight: fix issue with insufficient claim tags Date: Fri, 19 Jun 2026 17:01:47 +0100 Message-ID: <20260619160148.499223-1-mike.leach@arm.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit All CoreSight compliant components have an implementation defined number of 0 to 8 claim tag bits in the claim tag registers. These are used to claim the CoreSight resources by system agents. ARM recommends implementions have 4 claim tag bits, though a valid implementation can have 0 claim tags bits. The CoreSight drivers implement a 2 claim tag bit protocol to allow self hosted and external debug agents to manage access to the hardware. However, if there are less than 2 claim tags available the protocol incorrectly returns an error on device claim, as no checks are made. If insufficient claim tags are present in a component then the protocol must return success on claim / disclaim to allow components to be used normally. Add initialisation to read the CLAIMSET bits to establish the number of available claim tag bits, and adjust the claim returns accordingly. Cache the claimtag protocol availablity in the coresight_device to reduce reads for the main claim/disclaim api. changes since v2: 1) consolidated API to remove the API calls using just cs_access, which were used purely to clear down stale self claim tags, replace with a normal coresight_device API for initialisation, to match the claim/disclaim API. This does both the check on availability and the stale tag clearance. Updated all drivers to use the new init functionality 2) Added option for drivers to skip claim tag checking completely for devices with no-compliant hardware, that do not implement registers at the claim tag location, or do not operate correctly to indicate the correct number of claim tags for the device. changes since v1: 1) Added claim tag availability cache into coresight_device when using the main coresight_claim_device() / coresight_disclaim_device() API. Applies to coresight/next Mike Leach (1): coresight: fix issue where coresight component has no claimtags drivers/hwtracing/coresight/coresight-catu.c | 6 +- drivers/hwtracing/coresight/coresight-core.c | 139 ++++++++++++++++-- .../hwtracing/coresight/coresight-cti-core.c | 7 +- drivers/hwtracing/coresight/coresight-etb10.c | 9 +- .../coresight/coresight-etm3x-core.c | 8 +- .../coresight/coresight-etm4x-core.c | 8 +- .../hwtracing/coresight/coresight-funnel.c | 7 +- drivers/hwtracing/coresight/coresight-priv.h | 7 + .../coresight/coresight-replicator.c | 9 +- .../hwtracing/coresight/coresight-tmc-core.c | 7 +- include/linux/coresight.h | 23 ++- 11 files changed, 205 insertions(+), 25 deletions(-) -- 2.43.0