Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1666623

Re: [PATCH 05/12] coresight tmc: Add helpers for accessing 64bit registers

From Suzuki K Poulose <Suzuki.Poulose@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 05/12] coresight tmc: Add helpers for accessing 64bit registers
Date 2017-06-15 12:20 +0200
Message-ID <tSA2B-1bK-5@gated-at.bofh.it> (permalink)
References <tRyFz-3h6-3@gated-at.bofh.it> <tRyFA-3h6-27@gated-at.bofh.it> <tSkAx-8cx-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 14/06/17 18:49, Mathieu Poirier wrote:
> On Mon, Jun 12, 2017 at 03:36:44PM +0100, Suzuki K Poulose wrote:
>> Coresight TMC splits 64bit registers into a pair of 32bit registers
>> (e.g DBA, RRP, RWP). Provide helpers to read/write to these registers.
>
> I'm good with this patch but please specify these changes are to support the
> SoC-600 suite.  That way when we look back at this set in a couple of years we
> don't loose hair thinking we've been carrying bugs all this time.

To be honest, these are not necessarily just for the support of SoC-600.
It is applies to the current driver with SoC-400, as you could see below,
where we have always assumed that the RRP/RWP/DBA HI bits are always
0. Technically, the TMC supports upto 40bits and hence we have been doing
it wrong.

>> -	read_ptr = readl_relaxed(drvdata->base + TMC_RRP);
>> -	write_ptr = readl_relaxed(drvdata->base + TMC_RWP);
>> +	read_ptr = tmc_read_rrp(drvdata);
>> +	write_ptr = tmc_read_rwp(drvdata);



>> -		writel_relaxed(read_ptr, drvdata->base + TMC_RRP);
>> +		tmc_write_rrp(drvdata, read_ptr);
>>  		perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED);

>>  	writel_relaxed(axictl, drvdata->base + TMC_AXICTL);
>> +	tmc_write_dba(drvdata, drvdata->paddr);
>>
>> -	writel_relaxed(drvdata->paddr, drvdata->base + TMC_DBALO);
>> -	writel_relaxed(0x0, drvdata->base + TMC_DBAHI);

>>
>> -	rwp = readl_relaxed(drvdata->base + TMC_RWP);
>> +	rwp = tmc_read_rwp(drvdata);
>>  	val = readl_relaxed(drvdata->base + TMC_STS);
>>


Suzuki

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/12] coresight: Support for ARM Coresight SoC-600 Suzuki K Poulose <suzuki.poulose@arm.com> - 2017-06-12 16:40 +0200
  [PATCH 04/12] coresight: Add support for reading 64bit registers Suzuki K Poulose <suzuki.poulose@arm.com> - 2017-06-12 16:40 +0200
    Re: [PATCH 04/12] coresight: Add support for reading 64bit registers Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-06-13 19:50 +0200
      Re: [PATCH 04/12] coresight: Add support for reading 64bit registers Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2017-06-13 20:00 +0200
  [PATCH 05/12] coresight tmc: Add helpers for accessing 64bit registers Suzuki K Poulose <suzuki.poulose@arm.com> - 2017-06-12 16:40 +0200
    Re: [PATCH 05/12] coresight tmc: Add helpers for accessing 64bit  registers Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-06-14 19:50 +0200
      Re: [PATCH 05/12] coresight tmc: Add helpers for accessing 64bit  registers Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2017-06-15 12:20 +0200
        Re: [PATCH 05/12] coresight tmc: Add helpers for accessing 64bit registers Mike Leach <mike.leach@linaro.org> - 2017-06-15 15:40 +0200
        Re: [PATCH 05/12] coresight tmc: Add helpers for accessing 64bit registers Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-06-15 16:30 +0200
  [PATCH 06/12] coresight tmc: Expose DBA and AXICTL Suzuki K Poulose <suzuki.poulose@arm.com> - 2017-06-12 16:40 +0200
    Re: [PATCH 06/12] coresight tmc: Expose DBA and AXICTL Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-06-14 20:00 +0200
      Re: [PATCH 06/12] coresight tmc: Expose DBA and AXICTL Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2017-06-15 12:20 +0200
  [PATCH 02/12] arm64: dts: juno: Use the new coresight replicator string Suzuki K Poulose <suzuki.poulose@arm.com> - 2017-06-12 16:40 +0200
  [PATCH 09/12] coresight tmc: Add capability information Suzuki K Poulose <suzuki.poulose@arm.com> - 2017-06-12 16:40 +0200
    Re: [PATCH 09/12] coresight tmc: Add capability information Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-06-14 20:30 +0200
      Re: [PATCH 09/12] coresight tmc: Add capability information Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2017-06-15 12:40 +0200
        Re: [PATCH 09/12] coresight tmc: Add capability information Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-06-15 16:40 +0200
  [PATCH 08/12] coresight tmc: Handle configuration types properly Suzuki K Poulose <suzuki.poulose@arm.com> - 2017-06-12 16:40 +0200
    Re: [PATCH 08/12] coresight tmc: Handle configuration types properly Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-06-14 20:00 +0200
      Re: [PATCH 08/12] coresight tmc: Handle configuration types properly Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2017-06-15 12:30 +0200
        Re: [PATCH 08/12] coresight tmc: Handle configuration types properly Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-06-15 16:40 +0200
  [PATCH 07/12] coresight replicator: Expose replicator management registers Suzuki K Poulose <suzuki.poulose@arm.com> - 2017-06-12 16:50 +0200
    Re: [PATCH 07/12] coresight replicator: Expose replicator management  registers Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-06-14 20:00 +0200
      Re: [PATCH 07/12] coresight replicator: Expose replicator management  registers Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2017-06-15 12:30 +0200

csiph-web