Reviewed by: Mike Leach <mike.leach(a)linaro.org>
On Thu, 9 Feb 2023 at 07:14, Randy Dunlap <rdunlap(a)infradead.org> wrote:
>
> Correct spelling problems for Documentation/trace/ as reported
> by codespell.
>
> Signed-off-by: Randy Dunlap <rdunlap(a)infradead.org>
> Cc: Steven Rostedt <rostedt(a)goodmis.org>
> Cc: Masami Hiramatsu <mhiramat(a)kernel.org>
> Cc: Daniel Bristot de Oliveira <bristot(a)kernel.org>
> Cc: linux-trace-kernel(a)vger.kernel.org
> Cc: Mathieu Poirier <mathieu.poirier(a)linaro.org>
> Cc: Suzuki K Poulose <suzuki.poulose(a)arm.com>
> Cc: coresight(a)lists.linaro.org
> Cc: linux-arm-kernel(a)lists.infradead.org
> Cc: Jonathan Corbet <corbet(a)lwn.net>
> Cc: linux-doc(a)vger.kernel.org
> Reviewed-by: Mukesh Ojha <quic_mojha(a)quicinc.com>
> Acked-by: Steven Rostedt (Google) <rostedt(a)goodmis.org>
> Acked-by: Suzuki K Poulose <suzuki.poulose(a)arm.com> # for coresight
> ---
> Documentation/trace/coresight/coresight-etm4x-reference.rst | 2 +-
> Documentation/trace/events.rst | 6 +++---
> Documentation/trace/fprobe.rst | 2 +-
> Documentation/trace/ftrace-uses.rst | 2 +-
> Documentation/trace/hwlat_detector.rst | 2 +-
> Documentation/trace/uprobetracer.rst | 2 +-
> 7 files changed, 9 insertions(+), 9 deletions(-)
>
> diff -- a/Documentation/trace/coresight/coresight-etm4x-reference.rst b/Documentation/trace/coresight/coresight-etm4x-reference.rst
> --- a/Documentation/trace/coresight/coresight-etm4x-reference.rst
> +++ b/Documentation/trace/coresight/coresight-etm4x-reference.rst
> @@ -675,7 +675,7 @@ Bit assignments shown below:-
> reconstructed using only conditional branches.
>
> There is currently no support in Perf for supplying modified binaries to the decoder, so this
> - feature is only inteded to be used for debugging purposes or with a 3rd party tool.
> + feature is only intended to be used for debugging purposes or with a 3rd party tool.
>
> Choosing this option will result in a significant increase in the amount of trace generated -
> possible danger of overflows, or fewer instructions covered. Note, that this option also
> diff -- a/Documentation/trace/events.rst b/Documentation/trace/events.rst
> --- a/Documentation/trace/events.rst
> +++ b/Documentation/trace/events.rst
> @@ -903,7 +903,7 @@ functions can be used.
>
> To create a kprobe event, an empty or partially empty kprobe event
> should first be created using kprobe_event_gen_cmd_start(). The name
> -of the event and the probe location should be specfied along with one
> +of the event and the probe location should be specified along with one
> or args each representing a probe field should be supplied to this
> function. Before calling kprobe_event_gen_cmd_start(), the user
> should create and initialize a dynevent_cmd object using
> @@ -983,7 +983,7 @@ The basic idea is simple and amounts to
> layer that can be used to generate trace event commands. The
> generated command strings can then be passed to the command-parsing
> and event creation code that already exists in the trace event
> -subystem for creating the corresponding trace events.
> +subsystem for creating the corresponding trace events.
>
> In a nutshell, the way it works is that the higher-level interface
> code creates a struct dynevent_cmd object, then uses a couple
> @@ -1056,7 +1056,7 @@ to add an operator between the pair (her
> appended onto the end of the arg pair (here ';').
>
> There's also a dynevent_str_add() function that can be used to simply
> -add a string as-is, with no spaces, delimeters, or arg check.
> +add a string as-is, with no spaces, delimiters, or arg check.
>
> Any number of dynevent_*_add() calls can be made to build up the string
> (until its length surpasses cmd->maxlen). When all the arguments have
> diff -- a/Documentation/trace/fprobe.rst b/Documentation/trace/fprobe.rst
> --- a/Documentation/trace/fprobe.rst
> +++ b/Documentation/trace/fprobe.rst
> @@ -111,7 +111,7 @@ saved at function entry and passed to ex
> the instruction pointer of @regs may be different from the @entry_ip
> in the entry_handler. If you need traced instruction pointer, you need
> to use @entry_ip. On the other hand, in the exit_handler, the instruction
> - pointer of @regs is set to the currect return address.
> + pointer of @regs is set to the correct return address.
>
> Share the callbacks with kprobes
> ================================
> diff -- a/Documentation/trace/ftrace-uses.rst b/Documentation/trace/ftrace-uses.rst
> --- a/Documentation/trace/ftrace-uses.rst
> +++ b/Documentation/trace/ftrace-uses.rst
> @@ -193,7 +193,7 @@ FTRACE_OPS_FL_RECURSION
> Not, if this flag is set, then the callback will always be called
> with preemption disabled. If it is not set, then it is possible
> (but not guaranteed) that the callback will be called in
> - preemptable context.
> + preemptible context.
>
> FTRACE_OPS_FL_IPMODIFY
> Requires FTRACE_OPS_FL_SAVE_REGS set. If the callback is to "hijack"
> diff -- a/Documentation/trace/hwlat_detector.rst b/Documentation/trace/hwlat_detector.rst
> --- a/Documentation/trace/hwlat_detector.rst
> +++ b/Documentation/trace/hwlat_detector.rst
> @@ -14,7 +14,7 @@ originally written for use by the "RT" p
> kernel is highly latency sensitive.
>
> SMIs are not serviced by the Linux kernel, which means that it does not
> -even know that they are occuring. SMIs are instead set up by BIOS code
> +even know that they are occurring. SMIs are instead set up by BIOS code
> and are serviced by BIOS code, usually for "critical" events such as
> management of thermal sensors and fans. Sometimes though, SMIs are used for
> other tasks and those tasks can spend an inordinate amount of time in the
> diff -- a/Documentation/trace/uprobetracer.rst b/Documentation/trace/uprobetracer.rst
> --- a/Documentation/trace/uprobetracer.rst
> +++ b/Documentation/trace/uprobetracer.rst
> @@ -55,7 +55,7 @@ Synopsis of uprobe_tracer
>
> (\*1) only for return probe.
> (\*2) this is useful for fetching a field of data structures.
> - (\*3) Unlike kprobe event, "u" prefix will just be ignored, becuse uprobe
> + (\*3) Unlike kprobe event, "u" prefix will just be ignored, because uprobe
> events can access only user-space memory.
>
> Types
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel(a)lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK
On 09/02/2023 01:08, Yabin Cui wrote:
> Friendly ping?
>
> On Thu, Feb 2, 2023 at 1:46 PM Yabin Cui <yabinc(a)google.com> wrote:
>>
>> If TMC ETR is enabled without being ready, in later use we may
>> see AXI bus errors caused by accessing invalid addresses.
>>
>> Signed-off-by: Yabin Cui <yabinc(a)google.com>
>> ---
>> V1 -> V2: Make change to all TMCs instead of just ETR
>> V2 -> V3: Handle etr enable failure in tmc_read_unprepare_etr
As I mentioned, v2 was queued. Please could you update your changes on
top of the coresight next branch and resend the patch ?
Suzuki
On 02/02/2023 17:12, Steve Clevenger wrote:
> Hi Suzuki,
>
> Commented in-line.
>
> Steve C.
>
> On 2/2/2023 3:16 AM, Suzuki K Poulose wrote:
>> On 02/02/2023 05:20, Steve Clevenger wrote:
>>>
>>> Hi Suzuki,
>>>
>>> I've split out the bug fix (i.e. nr_addr_cmp use) to a separate patch
>>
>> Thanks for that.
>>
>>> and added references to the Ampere erratum in silicon-errata.rst.
>>> These will be submitted as separate patches.
>>>
>>> The ETM4.x TRCOSLAR.OSLK early clear has moved to etm4_init_csdev_iomem
>>> for all manufacturers. I think this is what you asked for.
>>> The no_quad_mmio flag has moved to struct csdev_access, and the split
>>> 64-bit read/write logic has been implemented entirely in the header file
>>> coresight-etm4x.h is the existing calls.
>>> I'd like to retire this patch thread, and submit these as a new thread.
>>> Is there an objection?
>>
>> I would still like to use the system instructions method for the ETM,
>> than hacking the MMIO access for something that is obsolete.
>> The ACPI document for CoreSight will be published soon for review to
>> accommodate the description for ETMs without MMIO and it no longer
>> mandates the MemoryResource.
>>
>> What is the objection to using system instruction access here ?
> No objection going forward. For our initial release, we're not in a
> position to change the CoreSight DSDT based on a specification which is
> incomplete.
There is on change to the CoreSight DSDT specification as such. The only
change to the "spec" is along the lines of :
"MMIO interface is mandatory only if not accessible via system
instruction access "
> Based on a quick sysreg only build, I didn't collect trace samples. I
> haven't had time to chase this, but the reported error is "timeout while
> waiting for Trace Idle Status" on a TRCSTATR read. More testing is
Are you able to access the other registers ?
e.g,
$ cat /sys/bus/coresight/devices/etm0/mgmt/trcpidr0
Suzuki
> required. If this isn't related to an Ampere sysreg access problem
> (doubtful), the next place I'd look is as a synchronization issue.
>
>>
>> Thanks
>> Suzuki
>>
>>
>>
>>>
>>> Thanks,
>>> Steve
>>>
>>> On 1/23/2023 2:51 PM, Suzuki K Poulose wrote:
>>>>
>>>> Missed the reference, see below.
>>>>
>>>> On 23/01/2023 22:18, Suzuki K Poulose wrote:
>>>>> On 23/01/2023 19:48, Steve Clevenger wrote:
>>>>>>
>>>>>>
>>>>>> On 1/23/2023 9:33 AM, Suzuki K Poulose wrote:
>>>>>>> On 23/01/2023 17:22, Steve Clevenger wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> On 1/23/2023 2:54 AM, Suzuki K Poulose wrote:
>>>>>>>>> On 21/01/2023 07:30, Steve Clevenger wrote:
>>>>>>>>>>
>>>>>>>>>> Hi Suzuki,
>>>>>>>>>>
>>>>>>>>>> Comments in-line. Please note the approach I attempted while
>>>>>>>>>> adding in
>>>>>>>>>> the Ampere support was to otherwise not disturb existing driver
>>>>>>>>>> code
>>>>>>>>>> for
>>>>>>>>>> non-Ampere parts.
>>>>>>>>>>
>>>>>>>>>> Steve
>>>>>>>>>>
>>>>>>>>>> On 1/20/2023 3:12 AM, Suzuki K Poulose wrote:
>>>>>>>>>>> Hi Steve
>>>>>>>>>>>
>>>>>>>>>>> Thanks for the patches. Have a few comments below.
>>>>>>>>>>>
>>>>>>>>>>> On 20/01/2023 00:51, Steve Clevenger wrote:
>>>>>>>>>>>> Add Ampere early clear of ETM TRCOSLAR.OSLK prior to TRCIDR1
>>>>>>>>>>>> access.
>>>>>>>>>>>> Ampere Computing erratum AC03_DEBUG_06 describes an Ampere
>>>>>>>>>>>> Computing design decision MMIO reads are considered the same
>>>>>>>>>>>> as an
>>>>>>>>>>>> external debug access. If TRCOSLAR.OSLK is set, the TRCIDR1
>>>>>>>>>>>> access
>>>>>>>>>>>> results in a bus fault followed by a kernel panic. A TRCIDR1
>>>>>>>>>>>> read
>>>>>>>>>>>> is valid regardless of TRCOSLAR.OSLK provided MMIO access
>>>>>>>>>>>> (now deprecated) is supported.
>>>>>>>>>>>> AC03_DEBUG_06 is described in the AmpereOne Developer Errata:
>>>>>>>>>>>> https://solutions.amperecomputing.com/customer-connect/products/AmpereOne-d…
>>>>>>>>>>>
>>>>>>>>>>> Please could you add this erratum to the :
>>>>>>>>>>>
>>>>>>>>>>> Documentation/arm64/silicon-errata.rst ?
>>>>>>>>>>>
>>>>>>>>>>> Given the ETM is v4.6, doesn't it support system instructions and
>>>>>>>>>>> that is causing this issue of "MMIO access is considered
>>>>>>>>>>> external" ?
>>>>>>>>>>> If it does, I think we should drop all of this and simply wire
>>>>>>>>>>> the
>>>>>>>>>>> system instruction access support.
>>>>>>>>>
>>>>>>>>>> That's not the issue in this case. This MMIO access should've been
>>>>>>>>>> allowed by the Ampere ETMv4.6 implementation. Based on comments
>>>>>>>>>> I've
>>>>>>>>>
>>>>>>>>> That doesn't answe the question. Please could you confirm the
>>>>>>>>> value of
>>>>>>>>> ID_AA64DFR0_EL1 on your system ?
>>>>>>>> This ID_AA64DFR0_EL1 value came from a TRACE32 debug session
>>>>>>>> connected
>>>>>>>> to this part. The ID_AA64DFR0_EL1 value is 0x000F01F210307619. So,
>>>>>>>> TraceVer, bits [7:4] are b0001. My understanding is the system
>>>>>>>> register
>>>>>>>> interface must be implemented on all ETMv4.6 parts.
>>>>>>>
>>>>>>> So, I don't understand why we are pushing towards enabling the
>>>>>>> "obsolete" MMIO interface ? Is this because "ACPI" mandates it ?
>>>>>>> Then, please don't. The spec needs an update to reflect the ETMs
>>>>>>> with sysreg access and ETEs.
>>>>>>>
>>>>>>> Why not stick to the system register access* ?
>>>>>>>
>>>>>>> * PS: The ACPI support for the ETM/ETE needs additional changes to
>>>>>>> the
>>>>>>> CoreSight driver, *not* the CoreSight ACPI spec. @Anshuman is
>>>>>>> working on
>>>>>>> this at the moment and will be available soon.
>>>>>>>
>>>>>>> The hack patch below should be sufficient to give it a try and if it
>>>>>>> works.
>>>>>
>>>>>> I don't understand your postscript. Certainly there's driver work
>>>>>> to be
>>>>>> done, but I also think the DEN0067 CoreSight ACPI specification needs
>>>>>
>>>>> The issue is having a single HID for ETMs (which from a spec point of
>>>>> view makes sense for) with and without MMIO access. That brings two
>>>>> different components in Linux (AMBA hook for ACPI and a platform
>>>>> driver)
>>>>> compete for the said HID. There are other reasons to disconnect the
>>>>> CoreSight from AMBA framework and manage them directly [0].
>>>>
>>>> [0]
>>>> https://lkml.kernel.org/r/e37e12ab-9701-2883-724a-2a281ad35df2@arm.com
>>>>
>>>>
>>
On 02/02/2023 05:20, Steve Clevenger wrote:
>
> Hi Suzuki,
>
> I've split out the bug fix (i.e. nr_addr_cmp use) to a separate patch
Thanks for that.
> and added references to the Ampere erratum in silicon-errata.rst.
> These will be submitted as separate patches.
>
> The ETM4.x TRCOSLAR.OSLK early clear has moved to etm4_init_csdev_iomem
> for all manufacturers. I think this is what you asked for.
> The no_quad_mmio flag has moved to struct csdev_access, and the split
> 64-bit read/write logic has been implemented entirely in the header file
> coresight-etm4x.h is the existing calls.
> I'd like to retire this patch thread, and submit these as a new thread.
> Is there an objection?
I would still like to use the system instructions method for the ETM,
than hacking the MMIO access for something that is obsolete.
The ACPI document for CoreSight will be published soon for review to
accommodate the description for ETMs without MMIO and it no longer
mandates the MemoryResource.
What is the objection to using system instruction access here ?
Thanks
Suzuki
>
> Thanks,
> Steve
>
> On 1/23/2023 2:51 PM, Suzuki K Poulose wrote:
>>
>> Missed the reference, see below.
>>
>> On 23/01/2023 22:18, Suzuki K Poulose wrote:
>>> On 23/01/2023 19:48, Steve Clevenger wrote:
>>>>
>>>>
>>>> On 1/23/2023 9:33 AM, Suzuki K Poulose wrote:
>>>>> On 23/01/2023 17:22, Steve Clevenger wrote:
>>>>>>
>>>>>>
>>>>>> On 1/23/2023 2:54 AM, Suzuki K Poulose wrote:
>>>>>>> On 21/01/2023 07:30, Steve Clevenger wrote:
>>>>>>>>
>>>>>>>> Hi Suzuki,
>>>>>>>>
>>>>>>>> Comments in-line. Please note the approach I attempted while
>>>>>>>> adding in
>>>>>>>> the Ampere support was to otherwise not disturb existing driver code
>>>>>>>> for
>>>>>>>> non-Ampere parts.
>>>>>>>>
>>>>>>>> Steve
>>>>>>>>
>>>>>>>> On 1/20/2023 3:12 AM, Suzuki K Poulose wrote:
>>>>>>>>> Hi Steve
>>>>>>>>>
>>>>>>>>> Thanks for the patches. Have a few comments below.
>>>>>>>>>
>>>>>>>>> On 20/01/2023 00:51, Steve Clevenger wrote:
>>>>>>>>>> Add Ampere early clear of ETM TRCOSLAR.OSLK prior to TRCIDR1
>>>>>>>>>> access.
>>>>>>>>>> Ampere Computing erratum AC03_DEBUG_06 describes an Ampere
>>>>>>>>>> Computing design decision MMIO reads are considered the same as an
>>>>>>>>>> external debug access. If TRCOSLAR.OSLK is set, the TRCIDR1 access
>>>>>>>>>> results in a bus fault followed by a kernel panic. A TRCIDR1 read
>>>>>>>>>> is valid regardless of TRCOSLAR.OSLK provided MMIO access
>>>>>>>>>> (now deprecated) is supported.
>>>>>>>>>> AC03_DEBUG_06 is described in the AmpereOne Developer Errata:
>>>>>>>>>> https://solutions.amperecomputing.com/customer-connect/products/AmpereOne-d…
>>>>>>>>>
>>>>>>>>> Please could you add this erratum to the :
>>>>>>>>>
>>>>>>>>> Documentation/arm64/silicon-errata.rst ?
>>>>>>>>>
>>>>>>>>> Given the ETM is v4.6, doesn't it support system instructions and
>>>>>>>>> that is causing this issue of "MMIO access is considered
>>>>>>>>> external" ?
>>>>>>>>> If it does, I think we should drop all of this and simply wire the
>>>>>>>>> system instruction access support.
>>>>>>>
>>>>>>>> That's not the issue in this case. This MMIO access should've been
>>>>>>>> allowed by the Ampere ETMv4.6 implementation. Based on comments
>>>>>>>> I've
>>>>>>>
>>>>>>> That doesn't answe the question. Please could you confirm the
>>>>>>> value of
>>>>>>> ID_AA64DFR0_EL1 on your system ?
>>>>>> This ID_AA64DFR0_EL1 value came from a TRACE32 debug session connected
>>>>>> to this part. The ID_AA64DFR0_EL1 value is 0x000F01F210307619. So,
>>>>>> TraceVer, bits [7:4] are b0001. My understanding is the system
>>>>>> register
>>>>>> interface must be implemented on all ETMv4.6 parts.
>>>>>
>>>>> So, I don't understand why we are pushing towards enabling the
>>>>> "obsolete" MMIO interface ? Is this because "ACPI" mandates it ?
>>>>> Then, please don't. The spec needs an update to reflect the ETMs
>>>>> with sysreg access and ETEs.
>>>>>
>>>>> Why not stick to the system register access* ?
>>>>>
>>>>> * PS: The ACPI support for the ETM/ETE needs additional changes to the
>>>>> CoreSight driver, *not* the CoreSight ACPI spec. @Anshuman is
>>>>> working on
>>>>> this at the moment and will be available soon.
>>>>>
>>>>> The hack patch below should be sufficient to give it a try and if it
>>>>> works.
>>>
>>>> I don't understand your postscript. Certainly there's driver work to be
>>>> done, but I also think the DEN0067 CoreSight ACPI specification needs
>>>
>>> The issue is having a single HID for ETMs (which from a spec point of
>>> view makes sense for) with and without MMIO access. That brings two
>>> different components in Linux (AMBA hook for ACPI and a platform driver)
>>> compete for the said HID. There are other reasons to disconnect the
>>> CoreSight from AMBA framework and manage them directly [0].
>>
>> [0] https://lkml.kernel.org/r/e37e12ab-9701-2883-724a-2a281ad35df2@arm.com
>>
>>