lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZV3vrE6tCBWupwJM@bogus>
Date:   Wed, 22 Nov 2023 12:10:20 +0000
From:   Sudeep Holla <sudeep.holla@....com>
To:     Anshuman Khandual <anshuman.khandual@....com>
Cc:     James Clark <james.clark@....com>,
        linux-arm-kernel@...ts.infradead.org, suzuki.poulose@....com,
        Lorenzo Pieralisi <lpieralisi@...nel.org>,
        Mike Leach <mike.leach@...aro.org>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
        coresight@...ts.linaro.org,
        linux-stm32@...md-mailman.stormreply.com
Subject: Re: [PATCH 4/7] coresight: tpiu: Move ACPI support from AMBA driver
 to platform driver

On Wed, Nov 22, 2023 at 11:21:58AM +0000, Sudeep Holla wrote:
> On Wed, Nov 22, 2023 at 12:32:33PM +0530, Anshuman Khandual wrote:
[..]

> > Although, AFAICT, have not seen these before - even on the defconfig.
> > Just to work around this problem, there can be a common module_init()
> > /module_exit() to register/unregister both AMBA and platform drivers,
> > similar to etm4x_init()/etm4x_exit() setup in coresight-etm4x-core.c.
> 
> Could this be the reason why I am seeing the below error why booting with
> ACPI ? I wanted to check the tables before I comment but this discussion
> made me think it could be the reason, hence posting this before I got time
> to analyse it.
> 
>   |  coresight-tmc-platform ARMHC97C:00: can't request region for resource [mem 0x20010000-0x20010fff]
>   |  coresight-tmc-platform: probe of ARMHC97C:00 failed with error -16
>   |  coresight-tmc-platform ARMHC501:00: can't request region for resource [mem 0x20070000-0x20070fff]
>   |  coresight-tmc-platform: probe of ARMHC501:00 failed with error -16
> 

Scratch that, it didn't help. This error I am seeing is not related to
the issue reported here. I tried a hack below, it didn't help.
 
Regards,
Sudeep

-->8
diff --git i/drivers/hwtracing/coresight/coresight-tpiu.c w/drivers/hwtracing/coresight/coresight-tpiu.c
index ea8827d289ca..f6ba350b3777 100644
--- i/drivers/hwtracing/coresight/coresight-tpiu.c
+++ w/drivers/hwtracing/coresight/coresight-tpiu.c
@@ -254,8 +254,6 @@ static struct amba_driver tpiu_driver = {
        .id_table       = tpiu_ids,
 };

-module_amba_driver(tpiu_driver);
-
 static int tpiu_platform_probe(struct platform_device *pdev)
 {
        struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -297,7 +295,21 @@ static struct platform_driver tpiu_platform_driver = {
                .pm                     = &tpiu_dev_pm_ops,
        },
 };
-module_platform_driver(tpiu_platform_driver);
+
+static int __init tpiu_init(void)
+{
+       amba_driver_register(&tpiu_driver);
+       platform_driver_register(&tpiu_platform_driver);
+       return 0;
+}
+
+static void __exit tpiu_exit(void)
+{
+       amba_driver_unregister(&tpiu_driver);
+       platform_driver_unregister(&tpiu_platform_driver);
+}
+module_init(tpiu_init);
+module_exit(tpiu_exit);

 MODULE_AUTHOR("Pratik Patel <pratikp@...eaurora.org>");
 MODULE_AUTHOR("Mathieu Poirier <mathieu.poirier@...aro.org>");

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ