Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-09 Thread Sai Prakash Ranjan
Hi Mathieu, On 2020-06-09 20:57, Mathieu Poirier wrote: On Mon, 8 Jun 2020 at 08:07, Sai Prakash Ranjan wrote: Hi Mathieu, Mike On 2020-06-04 12:57, Sai Prakash Ranjan wrote: > [...] >> >> Robin has a point - user space is long gone at this time. As such the >> first >> question to ask is

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-09 Thread Mathieu Poirier
On Mon, 8 Jun 2020 at 08:07, Sai Prakash Ranjan wrote: > > Hi Mathieu, Mike > > On 2020-06-04 12:57, Sai Prakash Ranjan wrote: > > > > [...] > > >> > >> Robin has a point - user space is long gone at this time. As such the > >> first > >> question to ask is what kind of CS session was running at

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-08 Thread Sai Prakash Ranjan
Hi Mathieu, Mike On 2020-06-04 12:57, Sai Prakash Ranjan wrote: [...] Robin has a point - user space is long gone at this time. As such the first question to ask is what kind of CS session was running at the time the system was shutting down. Was it a perf session of a sysfs session?

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-04 Thread Sai Prakash Ranjan
Hi Mathieu, +Will On 2020-06-03 23:14, Mathieu Poirier wrote: On Wed, Jun 03, 2020 at 02:34:10PM +0100, Robin Murphy wrote: On 2020-06-03 14:22, Mike Leach wrote: > Hi Sai, > > On Wed, 3 Jun 2020 at 13:14, Sai Prakash Ranjan > wrote: > > > > Hi Mike, > > > > On 2020-06-03 16:57, Mike Leach wr

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Mathieu Poirier
On Wed, Jun 03, 2020 at 02:34:10PM +0100, Robin Murphy wrote: > On 2020-06-03 14:22, Mike Leach wrote: > > Hi Sai, > > > > On Wed, 3 Jun 2020 at 13:14, Sai Prakash Ranjan > > wrote: > > > > > > Hi Mike, > > > > > > On 2020-06-03 16:57, Mike Leach wrote: > > > > Hi, > > > > > > > > On Wed, 3 Ju

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Sai Prakash Ranjan
Hi Mike, On 2020-06-03 19:21, Mike Leach wrote: Hi, On Wed, 3 Jun 2020 at 14:34, Robin Murphy wrote: On 2020-06-03 14:22, Mike Leach wrote: > Hi Sai, > > On Wed, 3 Jun 2020 at 13:14, Sai Prakash Ranjan > wrote: >> >> Hi Mike, >> >> On 2020-06-03 16:57, Mike Leach wrote: >>> Hi, >>> >>> On

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Sai Prakash Ranjan
Hi Robin, On 2020-06-03 19:10, Robin Murphy wrote: On 2020-06-03 13:26, Sai Prakash Ranjan wrote: Hi Robin, On 2020-06-03 17:51, Robin Murphy wrote: On 2020-06-03 13:00, Sai Prakash Ranjan wrote: Hi Robin, Mathieu On 2020-06-03 17:07, Robin Murphy wrote: On 2020-06-01 22:28, Mathieu Poirie

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Mike Leach
Hi, On Wed, 3 Jun 2020 at 14:34, Robin Murphy wrote: > > On 2020-06-03 14:22, Mike Leach wrote: > > Hi Sai, > > > > On Wed, 3 Jun 2020 at 13:14, Sai Prakash Ranjan > > wrote: > >> > >> Hi Mike, > >> > >> On 2020-06-03 16:57, Mike Leach wrote: > >>> Hi, > >>> > >>> On Wed, 3 Jun 2020 at 11:24, S

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Sai Prakash Ranjan
Hi Mike, On 2020-06-03 19:04, Robin Murphy wrote: On 2020-06-03 14:22, Mike Leach wrote: Hi Sai, On Wed, 3 Jun 2020 at 13:14, Sai Prakash Ranjan wrote: Hi Mike, On 2020-06-03 16:57, Mike Leach wrote: Hi, On Wed, 3 Jun 2020 at 11:24, Sai Prakash Ranjan wrote: Hi Mike, Thanks again for

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Robin Murphy
On 2020-06-03 13:26, Sai Prakash Ranjan wrote: Hi Robin, On 2020-06-03 17:51, Robin Murphy wrote: On 2020-06-03 13:00, Sai Prakash Ranjan wrote: Hi Robin, Mathieu On 2020-06-03 17:07, Robin Murphy wrote: On 2020-06-01 22:28, Mathieu Poirier wrote: That being said I'm sure that dependencies o

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Robin Murphy
On 2020-06-03 14:22, Mike Leach wrote: Hi Sai, On Wed, 3 Jun 2020 at 13:14, Sai Prakash Ranjan wrote: Hi Mike, On 2020-06-03 16:57, Mike Leach wrote: Hi, On Wed, 3 Jun 2020 at 11:24, Sai Prakash Ranjan wrote: Hi Mike, Thanks again for looking at this. On 2020-06-03 03:42, Mike Leach w

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Mike Leach
Hi Sai, On Wed, 3 Jun 2020 at 13:14, Sai Prakash Ranjan wrote: > > Hi Mike, > > On 2020-06-03 16:57, Mike Leach wrote: > > Hi, > > > > On Wed, 3 Jun 2020 at 11:24, Sai Prakash Ranjan > > wrote: > >> > >> Hi Mike, > >> > >> Thanks again for looking at this. > >> > >> On 2020-06-03 03:42, Mike Lea

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Sai Prakash Ranjan
Hi Robin, On 2020-06-03 17:51, Robin Murphy wrote: On 2020-06-03 13:00, Sai Prakash Ranjan wrote: Hi Robin, Mathieu On 2020-06-03 17:07, Robin Murphy wrote: On 2020-06-01 22:28, Mathieu Poirier wrote: That being said I'm sure that dependencies on an IOMMU isn't a problem confined to coresigh

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Robin Murphy
On 2020-06-03 13:00, Sai Prakash Ranjan wrote: Hi Robin, Mathieu On 2020-06-03 17:07, Robin Murphy wrote: On 2020-06-01 22:28, Mathieu Poirier wrote: That being said I'm sure that dependencies on an IOMMU isn't a problem confined to coresight. I am adding Robin Murphy, who added this commit [1

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Sai Prakash Ranjan
Hi Mike, On 2020-06-03 16:57, Mike Leach wrote: Hi, On Wed, 3 Jun 2020 at 11:24, Sai Prakash Ranjan wrote: Hi Mike, Thanks again for looking at this. On 2020-06-03 03:42, Mike Leach wrote: [...] >> >> SMMU/IOMMU won't be able to do much here as it is the client's >> responsiblity to >> pr

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Sai Prakash Ranjan
Hi Robin, Mathieu On 2020-06-03 17:07, Robin Murphy wrote: On 2020-06-01 22:28, Mathieu Poirier wrote: That being said I'm sure that dependencies on an IOMMU isn't a problem confined to coresight. I am adding Robin Murphy, who added this commit [1], to the thread in the hope that he can provi

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Robin Murphy
On 2020-06-01 22:28, Mathieu Poirier wrote: That being said I'm sure that dependencies on an IOMMU isn't a problem confined to coresight. I am adding Robin Murphy, who added this commit [1], to the thread in the hope that he can provide guidance on the right way to do this. Right, it's not spec

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Mike Leach
Hi, On Wed, 3 Jun 2020 at 11:24, Sai Prakash Ranjan wrote: > > Hi Mike, > > Thanks again for looking at this. > > On 2020-06-03 03:42, Mike Leach wrote: > [...] > > >> > >> SMMU/IOMMU won't be able to do much here as it is the client's > >> responsiblity to > >> properly shutdown and SMMU device

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-03 Thread Sai Prakash Ranjan
Hi Mike, Thanks again for looking at this. On 2020-06-03 03:42, Mike Leach wrote: [...] SMMU/IOMMU won't be able to do much here as it is the client's responsiblity to properly shutdown and SMMU device link just makes sure that SMMU(supplier) shutdown is called only after its consumers shutdo

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-02 Thread Mike Leach
Hi Sai, On Tue, 2 Jun 2020 at 08:30, Sai Prakash Ranjan wrote: > > Hi Mathieu, > > Thanks for taking your time for review. > > On 2020-06-02 02:58, Mathieu Poirier wrote: > > Hi Sai, > > > > On top of the comments already privided by Mike, I have the following: > > > > On Mon, Jun 01, 2020 at 01:

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-02 Thread Sai Prakash Ranjan
Hi Mathieu, Thanks for taking your time for review. On 2020-06-02 02:58, Mathieu Poirier wrote: Hi Sai, On top of the comments already privided by Mike, I have the following: On Mon, Jun 01, 2020 at 01:32:26PM +0530, Sai Prakash Ranjan wrote: Implement a shutdown callback to ensure ETR/ETF h

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-01 Thread Mathieu Poirier
Hi Sai, On top of the comments already privided by Mike, I have the following: On Mon, Jun 01, 2020 at 01:32:26PM +0530, Sai Prakash Ranjan wrote: > Implement a shutdown callback to ensure ETR/ETF hardware is > properly shutdown in reboot/shutdown path. This is required > for ETR/ETF which has SM

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-01 Thread Sai Prakash Ranjan
Hi Mike, Thanks for the review. On 2020-06-01 19:05, Mike Leach wrote: Hi, On Mon, 1 Jun 2020 at 09:02, Sai Prakash Ranjan wrote: Implement a shutdown callback to ensure ETR/ETF hardware is properly shutdown in reboot/shutdown path. This is required for ETR/ETF which has SMMU address transl

Re: [PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-01 Thread Mike Leach
Hi, On Mon, 1 Jun 2020 at 09:02, Sai Prakash Ranjan wrote: > > Implement a shutdown callback to ensure ETR/ETF hardware is > properly shutdown in reboot/shutdown path. This is required > for ETR/ETF which has SMMU address translation enabled like > on SC7180 SoC and few others. If the hardware is

[PATCH 2/2] coresight: tmc: Add shutdown callback for TMC ETR/ETF

2020-06-01 Thread Sai Prakash Ranjan
Implement a shutdown callback to ensure ETR/ETF hardware is properly shutdown in reboot/shutdown path. This is required for ETR/ETF which has SMMU address translation enabled like on SC7180 SoC and few others. If the hardware is still accessing memory after SMMU translation is disabled as part of S