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
>>
>>
On 27/01/2023 06:40, Randy Dunlap 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
> ---
> 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/rv/runtime-verification.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
For the above:
Acked-by: Suzuki K Poulose <suzuki.poulose(a)arm.com>
Thanks
Suzuki
Hi Krzysztof,
On 1/19/2023 6:44 PM, Krzysztof Kozlowski wrote:
> On 19/01/2023 08:41, Tao Zhang wrote:
>> Add property "qcom,dsb-elem-size" to support DSB(Discrete Single
>> Bit) element for TPDA. Specifies the DSB element size supported
>> by each monitor connected to the aggregator on each port. Should
>> be specified in pairs (port, dsb element size).
>>
>> Signed-off-by: Tao Zhang <quic_taozha(a)quicinc.com>
>> Signed-off-by: Tao Zhang <taozha(a)qti.qualcomm.com>
> You are the same person and it is still the same organization
> (Qualcomm), right? Only one SoB.
I will change and update this in the next patch series.
>
>> ---
>> .../bindings/arm/qcom,coresight-tpda.yaml | 22 ++++++++++++++++++++++
>> 1 file changed, 22 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml
>> index 2ec9b5b..298db7f 100644
>> --- a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml
>> +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml
>> @@ -58,6 +58,26 @@ properties:
>> minItems: 1
>> maxItems: 2
>>
>> + qcom,dsb-element-size:
>> + description: |
>> + Specifies the DSB(Discrete Single Bit) element size supported by
>> + each monitor connected to the aggregator on each port. Should be
>> + specified in pairs <port, dsb element size>.
> s/port/port number/
It should be "port number" here.
I will change "<port, dsb element size>" to "<port number, DSB element
size>" in the next patch series.
>> +
>> + Note: The maximum value of the port number depends on how many
>> + input ports the current TPDA has. DSB element size currently only
>> + supports 32-bit and 64-bit.
>> + $ref: /schemas/types.yaml#/definitions/uint32-matrix
>> + items:
> Are some reasonable maxItems known?
This is related to hardware design, depending on how many input ports
the TPDA has.
We cannot limit it to a reasonable maximum value from the software.
According to the existing hardware design, TPDA with the most input
ports has about 30 input ports.
But there may be TPDA with more input ports.
>
>> + items:
>> + - description: |
>> + "port" indicates TPDA input port number
> What is "port"? You quoted it like it was some name of variable or
> property. Where is then?
The "port" here refers to the port number of other Coresight devices
connected to the TPDA input port.
I will change and update it in the next patch series.
>> + minimum: 0
>> + - description: |
>> + "dsb element size" indicates dsb element size
> "A" indicates A. This sentence does not make sense.
>
> Also missing units.
>
> s/dsb/DSB/
"DSB element size" indicate the size of the element in DSB. DSB(Discrete
Single
Bit) is a data collection unit.
I will change and update it in the next patch series.
>
>> + minimum: 0
>> + maximum: 64
>> +
>> clocks:
>> maxItems: 1
>>
>> @@ -100,6 +120,8 @@ examples:
>> compatible = "qcom,coresight-tpda", "arm,primecell";
>> reg = <0x6004000 0x1000>;
>>
>> + qcom,dsb-element-size = <0 32>;
>> +
>> clocks = <&aoss_qmp>;
>> clock-names = "apb_pclk";
>>
> Best regards,
> Krzysztof
Best,
Tao
On 24/01/2023 21:50, Ian Rogers wrote:
> On Fri, Jan 20, 2023 at 7:47 AM James Clark <james.clark(a)arm.com> wrote:
>>
>>
>>
>> On 20/01/2023 15:37, Mike Leach wrote:
>>> OpenCSD version 1.4 is released with support for FEAT_ITE.
>>> This adds a new packet type, with associated output element ID in
>>> the packet type enum - OCSD_GEN_TRC_ELEM_INSTRUMENTATION.
>>>
>>> As we just ignore this packet in perf, add to the switch statement
>>> to avoid the "enum not handled in switch error", but conditionally
>>> so as not to break the perf build for older OpenCSD installations.
>>>
>>> Signed-off-by: Mike Leach <mike.leach(a)linaro.org>
>>> ---
>>> tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
>>> index fa3aa9c0fb2e..48e7121880a9 100644
>>> --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
>>> +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
>>> @@ -604,6 +604,9 @@ static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer(
>>> case OCSD_GEN_TRC_ELEM_CUSTOM:
>>> case OCSD_GEN_TRC_ELEM_SYNC_MARKER:
>>> case OCSD_GEN_TRC_ELEM_MEMTRANS:
>>> +#if (OCSD_VER_NUM >= 0x010400)
>>> + case OCSD_GEN_TRC_ELEM_INSTRUMENTATION:
>>> +#endif
>>> default:
>>> break;
>>> }
>>
>> Checked the build with both old and new versions of OpenCSD and it's ok:
>>
>> Reviewed-by: James Clark <james.clark(a)arm.com>
>
> Acked-by: Ian Rogers <irogers(a)google.com>
>
> Thanks,
> Ian
Hi Arnaldo,
Is it ok to merge this change? If anyone is building with the latest
OpenCSD they will get a build error on the unhandled switch case, and we
just got it in our CI too.
I suppose we could disable the warning around this switch, but it's
pretty rare to add new packets so might be best to leave it.
Thanks
James
On 29/01/2023 08:42, Yang Yingliang wrote:
> devm_ioremap_resource() never returns NULL pointer, it
> will return ERR_PTR() when it fails, so replace the check
> with IS_ERR().
Thanks for the patch.
>
> Fixes: 5b7916625c01 ("Coresight: Add TPDA link driver")
> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com>
> ---
> drivers/hwtracing/coresight/coresight-tpda.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-tpda.c b/drivers/hwtracing/coresight/coresight-tpda.c
> index 19c25c9f6157..6313b12880e0 100644
> --- a/drivers/hwtracing/coresight/coresight-tpda.c
> +++ b/drivers/hwtracing/coresight/coresight-tpda.c
> @@ -145,7 +145,7 @@ static int tpda_probe(struct amba_device *adev, const struct amba_id *id)
> dev_set_drvdata(dev, drvdata);
>
> base = devm_ioremap_resource(dev, &adev->res);
> - if (!base)
> + if (IS_ERR(base))
> return -ENOMEM;
I have fixed this up to :
return PTR_ERR(base);
for consistency.
Thanks
Suzuki
On 27/01/2023 17:00, Arnd Bergmann wrote:
> On Fri, Jan 27, 2023, at 17:46, Suzuki K Poulose wrote:
>> On 26/01/2023 20:37, Arnd Bergmann wrote:
>>> On Thu, Jan 26, 2023, at 19:02, Suzuki K Poulose wrote:
>>>> On 26/01/2023 16:35, Arnd Bergmann wrote:
>>>>> From: Arnd Bergmann <arnd(a)arndb.de>
>>>> Thanks for the fix, I will queue this. Btw, I did try to
>>>> reproduce it locally, but couldn't trigger the warnings,
>>>> even with
>>>>
>>>> CONFIG_WERROR=y
>>>>
>>>> and all CORESIGHT configs builtin. I see other drivers doing the
>>>> same outside coresight too. Just curious to know why is this
>>>> any different. Is it specific to "bus" driver (e.g. AMBA) ?
>>>
>>> The warning comes from postprocessing the object file, it's got
>>> nothing to do with the bus type, only with a symbol in .data
>>> referencing a symbol in .init.text. Maybe there are some
>>> config options that keep the section from getting discarded?
>>> Or possibly you only built the files in this directory, but did
>>> not get to the final link?
>>
>> I did a full kernel build. Also, I see a similar issue with the
>> coresight-etm4x (by code inspection) driver. Did you not hit that ?
>>
>> May be there is a config option that is masking it on my end. But
>> the case of etm4x driver is puzzling.
>>
>> $ git grep etm4_remove_amba
>> drivers/hwtracing/coresight/coresight-etm4x-core.c
>> drivers/hwtracing/coresight/coresight-etm4x-core.c:static void __exit
>> etm4_remove_amba(struct amba_device *adev)
>> drivers/hwtracing/coresight/coresight-etm4x-core.c: .remove
>> = etm4_remove_amba,
>
> Indeed, that one clearly has the same but, but I have never
> observed a warning for it.
>
> I checked one more thing and found that I only get the warning
> for 32-bit Arm builds, but not arm64. Since the etm4x driver
> 'depends on ARM64' for its use of asm/sysreg.h,
> I never test-built it on 32-bit arm.
>
> From the git history of arch/arm64/kernel/vmlinux.lds.S,
> I can see that arm64 never discards the .exit section, see
> commit 07c802bd7c39 ("arm64: vmlinux.lds.S: don't discard
> .exit.* sections at link-time").
That makes sense, thanks for getting to the bottom of this. I
have pushed it to coresight next.
https://git.kernel.org/coresight/c/0c1ccc158bbc
Kind regards
Suzuki
>
> Arnd
On 26/01/2023 20:37, Arnd Bergmann wrote:
> On Thu, Jan 26, 2023, at 19:02, Suzuki K Poulose wrote:
>> On 26/01/2023 16:35, Arnd Bergmann wrote:
>>> From: Arnd Bergmann <arnd(a)arndb.de>
>> Thanks for the fix, I will queue this. Btw, I did try to
>> reproduce it locally, but couldn't trigger the warnings,
>> even with
>>
>> CONFIG_WERROR=y
>>
>> and all CORESIGHT configs builtin. I see other drivers doing the
>> same outside coresight too. Just curious to know why is this
>> any different. Is it specific to "bus" driver (e.g. AMBA) ?
>
> The warning comes from postprocessing the object file, it's got
> nothing to do with the bus type, only with a symbol in .data
> referencing a symbol in .init.text. Maybe there are some
> config options that keep the section from getting discarded?
> Or possibly you only built the files in this directory, but did
> not get to the final link?
I did a full kernel build. Also, I see a similar issue with the
coresight-etm4x (by code inspection) driver. Did you not hit that ?
May be there is a config option that is masking it on my end. But
the case of etm4x driver is puzzling.
$ git grep etm4_remove_amba
drivers/hwtracing/coresight/coresight-etm4x-core.c
drivers/hwtracing/coresight/coresight-etm4x-core.c:static void __exit
etm4_remove_amba(struct amba_device *adev)
drivers/hwtracing/coresight/coresight-etm4x-core.c: .remove
= etm4_remove_amba,
Suzuki
>
> Arnd