Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-14 Thread John Garry
On 14/06/2017 12:40, Will Deacon wrote: On Wed, Jun 14, 2017 at 12:35:07PM +0100, John Garry wrote: On 14/06/2017 12:01, Will Deacon wrote: On Wed, Jun 14, 2017 at 11:42:30AM +0100, Mark Rutland wrote: On Wed, Jun 14, 2017 at 11:06:58AM +0100, Will Deacon wrote: Apologies, I misunderstood you

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-14 Thread Will Deacon
On Wed, Jun 14, 2017 at 12:35:07PM +0100, John Garry wrote: > On 14/06/2017 12:01, Will Deacon wrote: > >On Wed, Jun 14, 2017 at 11:42:30AM +0100, Mark Rutland wrote: > >>On Wed, Jun 14, 2017 at 11:06:58AM +0100, Will Deacon wrote: > >>>Apologies, I misunderstood your algorithm (I thought step (a)

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-14 Thread John Garry
On 14/06/2017 12:01, Will Deacon wrote: On Wed, Jun 14, 2017 at 11:42:30AM +0100, Mark Rutland wrote: On Wed, Jun 14, 2017 at 11:06:58AM +0100, Will Deacon wrote: Apologies, I misunderstood your algorithm (I thought step (a) was on one CPU and step (b) was on another). Still, I don't understand

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-14 Thread Will Deacon
On Wed, Jun 14, 2017 at 11:48:07AM +0100, Russell King - ARM Linux wrote: > On Wed, Jun 14, 2017 at 11:06:58AM +0100, Will Deacon wrote: > > Apologies, I misunderstood your algorithm (I thought step (a) was on one CPU > > and step (b) was on another). Still, I don't understand the need for the > >

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-14 Thread Will Deacon
On Wed, Jun 14, 2017 at 11:42:30AM +0100, Mark Rutland wrote: > On Wed, Jun 14, 2017 at 11:06:58AM +0100, Will Deacon wrote: > > Apologies, I misunderstood your algorithm (I thought step (a) was on one CPU > > and step (b) was on another). Still, I don't understand the need for the > > timeout. If

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-14 Thread Mark Rutland
On Wed, Jun 14, 2017 at 11:42:30AM +0100, Mark Rutland wrote: > On Wed, Jun 14, 2017 at 11:06:58AM +0100, Will Deacon wrote: > > Apologies, I misunderstood your algorithm (I thought step (a) was on one CPU > > and step (b) was on another). Still, I don't understand the need for the > > timeout. If

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-14 Thread Russell King - ARM Linux
On Wed, Jun 14, 2017 at 11:06:58AM +0100, Will Deacon wrote: > Apologies, I misunderstood your algorithm (I thought step (a) was on one CPU > and step (b) was on another). Still, I don't understand the need for the > timeout. If you instead read back the flag immediately, wouldn't it still > work?

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-14 Thread Mark Rutland
On Wed, Jun 14, 2017 at 11:06:58AM +0100, Will Deacon wrote: > Apologies, I misunderstood your algorithm (I thought step (a) was on one CPU > and step (b) was on another). Still, I don't understand the need for the > timeout. If you instead read back the flag immediately, wouldn't it still > work?

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-14 Thread Will Deacon
On Fri, Jun 09, 2017 at 04:10:12PM +0100, John Garry wrote: > On 09/06/2017 15:30, Will Deacon wrote: > >On Fri, Jun 09, 2017 at 03:18:39PM +0100, John Garry wrote: > >>On 08/06/2017 17:35, Mark Rutland wrote: > >>>Hi, > >>> > >>>On Mon, May 22, 2017 at 08:48:32PM +0800, Shaokun Zhang wrote: >

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-14 Thread Zhangshaokun
Hi Mark, On 2017/6/9 0:35, Mark Rutland wrote: > Hi, > > On Mon, May 22, 2017 at 08:48:32PM +0800, Shaokun Zhang wrote: >> +/* >> + * hisi_djtag_lock_v2: djtag lock to avoid djtag access conflict b/w kernel >> + * and UEFI. > > The mention of UEFI here worries me somewhat, and I have a number of

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-09 Thread Mark Rutland
On Fri, Jun 09, 2017 at 05:09:25PM +0100, John Garry wrote: > At this point, we would rather concentrate on our new chipset, which > is based on same perf HW architecture (so much code reuse), but uses > directly mapped registers and *no djtag* - in this, most of the > upstream effort from all part

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-09 Thread John Garry
Hi Mark, What happens if the lock is already held by an agent in that case? Does the FW block until the lock is released? The FW must also honour the contract - it must also block until the lock is available. This may sound bad, but, in reality, probablity of simultaneous perf and hotplug

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-09 Thread Mark Rutland
On Fri, Jun 09, 2017 at 03:18:39PM +0100, John Garry wrote: > On 08/06/2017 17:35, Mark Rutland wrote: > >On Mon, May 22, 2017 at 08:48:32PM +0800, Shaokun Zhang wrote: > >>+/* > >>+ * hisi_djtag_lock_v2: djtag lock to avoid djtag access conflict b/w kernel > >>+ * and UEFI. > > > >The mention of U

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-09 Thread John Garry
On 09/06/2017 15:30, Will Deacon wrote: On Fri, Jun 09, 2017 at 03:18:39PM +0100, John Garry wrote: On 08/06/2017 17:35, Mark Rutland wrote: Hi, On Mon, May 22, 2017 at 08:48:32PM +0800, Shaokun Zhang wrote: +/* + * hisi_djtag_lock_v2: djtag lock to avoid djtag access conflict b/w kernel + *

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-09 Thread Will Deacon
On Fri, Jun 09, 2017 at 03:18:39PM +0100, John Garry wrote: > On 08/06/2017 17:35, Mark Rutland wrote: > >Hi, > > > >On Mon, May 22, 2017 at 08:48:32PM +0800, Shaokun Zhang wrote: > >>+/* > >>+ * hisi_djtag_lock_v2: djtag lock to avoid djtag access conflict b/w kernel > >>+ * and UEFI. > > > >The m

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-09 Thread John Garry
On 08/06/2017 17:35, Mark Rutland wrote: Hi, On Mon, May 22, 2017 at 08:48:32PM +0800, Shaokun Zhang wrote: +/* + * hisi_djtag_lock_v2: djtag lock to avoid djtag access conflict b/w kernel + * and UEFI. The mention of UEFI here worries me somewhat, and I have a number of questions specificall

Re: [PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-06-08 Thread Mark Rutland
Hi, On Mon, May 22, 2017 at 08:48:32PM +0800, Shaokun Zhang wrote: > +/* > + * hisi_djtag_lock_v2: djtag lock to avoid djtag access conflict b/w kernel > + * and UEFI. The mention of UEFI here worries me somewhat, and I have a number of questions specifically relating to how we interact with UEFI

[PATCH v8 6/9] drivers: perf: hisi: Add support for Hisilicon Djtag driver

2017-05-22 Thread Shaokun Zhang
From: Tan Xiaojun The Hisilicon Djtag is an independent component which connects with some other components in the SoC by Debug Bus. This driver can be configured to access the registers of connecting components (like L3 cache) during real time debugging and it supports DT and ACPI mode. Signed-