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 221F0428494 for ; Tue, 11 Aug 2026 09:17:54 +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=1786439875; cv=none; b=dZSMA04fZwdMQZR876tAIxw9ETAhmXQ0Tr35clJyj1M9csr/HbCfpOBDon/TqFcoSB8ERcv5XssszZxYZbQ0hyS3OVtEF/IBnR19JLQRQKauNIiIxmDVPqKal2wTHDkjo9dfe6wcMAbWzJOXPxF8RpyrNY54yhZv88r8F6iB5Ho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786439875; c=relaxed/simple; bh=rGGi2yKj3HpDSJIWZQdi6DjXNQswIDWAPnt9OjTz0TI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=S3bo3SG68yQHalqImZOxI9N+KbGLjeo8g4UYSFMEvfx3QDd0OmJlszbf0HrlqeaY/orWgqc9rD/cs8/88GPHh6XJER4ikwz8vEEcW87t7ZQqTf8LXiAdL+r22YfnJ21Ift+LuW8koHCfd0g+xC6F4SBQQOJ1doZkCMmFHfaNRG8= 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=eGJ9q7sU; 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="eGJ9q7sU" 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 4B7E81516; Tue, 11 Aug 2026 02:17:49 -0700 (PDT) Received: from [10.57.45.152] (unknown [10.57.45.152]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 417773F632; Tue, 11 Aug 2026 02:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1786439873; bh=rGGi2yKj3HpDSJIWZQdi6DjXNQswIDWAPnt9OjTz0TI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=eGJ9q7sU5vlcWlVIFIA5/275FSloVrTNCx0qUg/76qy5XO5qNeFxV0DAoHeqsi0NG 3KTDKCaDhD0YWOHqVT4sIRtfFpTjSERVug761wO7yfY4o9rqfrkIs98eWHjIXu7KiY hH63U5CPMdD0gcVcWTaR49X5dPsuzK1nvg6c/2mA= Message-ID: Date: Tue, 11 Aug 2026 10:17:50 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] coresight: trbe: Hide enable_sink sysfs file Content-Language: en-GB To: James Clark , Leo Yan Cc: Mike Leach , Yeoreum Yun , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260807-james-cs-hide-trbe-enable-v2-1-0b2af223feed@linaro.org> <20260811090424.GD15499@e132581.arm.com> <7d4a7f0c-2b0e-471e-9c29-867bae981523@linaro.org> From: Suzuki K Poulose In-Reply-To: <7d4a7f0c-2b0e-471e-9c29-867bae981523@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/08/2026 10:10, James Clark wrote: > > > On 11/08/2026 10:04, Leo Yan wrote: >> On Fri, Aug 07, 2026 at 11:13:22AM +0100, James Clark wrote: >>> TRBE doesn't support sysfs mode, but the enable_sink file can still be >>> successfully written to enable the device, and only attempting to enable >>> the source would later fail. >>> >>> Avoid misleading users by adding a flag that devices can use to hide >>> either the enable_sink or enable_source files, and set it for TRBE. >>> >>> Don't set it for ETE as it's possible that ETE could appear on the >>> legacy bus and work with sysfs, and writing to enable_source already >>> reports EINVAL if the device doesn't support sysfs mode. >> >> It is a pity that we cannot determine from the ETE registers whether ETE >> is connected to the legacy bus or TRBE. >> > > We could determine it from the device tree. A path has to be built or > you can't use it on the legacy bus either. Maybe we can do a more > general change in the future to hide the flag for any non-connected CPU > source. There must be a sink enabled before the source can be enabled. So, enable_source will fail. I would leave things as is, given the sinks can be loaded with modules and it is all dynamic Cheers Suzuki > >>> Signed-off-by: James Clark >> >> Reviewed-by: Leo Yan >