[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 4 Apr 2023 15:02:19 +0100
From: Suzuki K Poulose <suzuki.poulose@....com>
To: James Clark <james.clark@....com>, coresight@...ts.linaro.org,
quic_jinlmao@...cinc.com, mike.leach@...aro.org
Cc: Mathieu Poirier <mathieu.poirier@...aro.org>,
Leo Yan <leo.yan@...aro.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 01/13] coresight: Fix loss of connection info when a
module is unloaded
On 04/04/2023 14:53, James Clark wrote:
> child_fwnode should be a read only property based on the DT. If it's
minor nit: Not restricted to DT. This also covers the ACPI.
> cleared on the parent device when a child is unloaded, then when the
> child is loaded again the connection won't be remade.
>
> child_dev should be cleared instead which signifies that the connection
> should be remade when the child_fwnode registers a new coresight_device.
>
> Similarly the reference count shouldn't be decremented as long as the
> parent device exists. The correct place to drop the reference is in
> coresight_release_platform_data() which is already done.
>
> Reproducible on Juno with the following steps:
>
> # load all coresight modules.
> $ cd /sys/bus/coresight/devices/
> $ echo 1 > tmc_etr0/enable_sink
> $ echo 1 > etm0/enable_source
> # Works fine ^
>
> $ echo 0 > etm0/enable_source
> $ rmmod coresight-funnel
> $ modprobe coresight-funnel
> $ echo 1 > etm0/enable_source
> -bash: echo: write error: Invalid argument
>
> Fixes: 37ea1ffddffa ("coresight: Use fwnode handle instead of device names")
> Fixes: 2af89ebacf29 ("coresight: Clear the connection field properly")
> Signed-off-by: James Clark <james.clark@....com>
Looks good to me.
Tested-by: Suzuki K Poulose <suzuki.poulose@....com>
Powered by blists - more mailing lists