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: <Y5Jcy2AFqR8xH+fJ@probook>
Date:   Thu, 8 Dec 2022 22:53:15 +0100
From:   Jonathan Neuschäfer <j.neuschaefer@....net>
To:     Robert Jarzmik <robert.jarzmik@...e.fr>
Cc:     "Russell King (Oracle)" <linux@...linux.org.uk>,
        Jonathan Neuschäfer <j.neuschaefer@....net>,
        Andrew Lunn <andrew@...n.ch>,
        linux-arm-kernel@...ts.infradead.org,
        Haojian Zhuang <haojian.zhuang@...il.com>,
        Daniel Mack <daniel@...que.org>, linux-kernel@...r.kernel.org
Subject: Re: PXA25x: GPIO driver fails probe due to resource conflict with
 pinctrl driver

Thank you both for you help!

On Thu, Dec 08, 2022 at 09:19:12PM +0100, Robert Jarzmik wrote:
> 
> "Russell King (Oracle)" <linux@...linux.org.uk> writes:
> > From a quick look, I think this commit is to blame:
> > 
> > 542c25b7a209 drivers: gpio: pxa: use devm_platform_ioremap_resource()
> > 
> > Someone "helpfully" making this change:
> > 
> > -       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > -       if (!res)
> > -               return -EINVAL;
> > -       gpio_reg_base = devm_ioremap(&pdev->dev, res->start,
> > -                                    resource_size(res));
> > +
> > +       gpio_reg_base = devm_platform_ioremap_resource(pdev, 0);
> > 
> > which introduces request_mem_region() to the PXA GPIO driver, resulting
> > in this resource clash.
> You're right.
> 
> Now, as for Jonathan, there are 2 options :
> - first one : revert the patch Russell pointed out

I'll try that first.

> - second one : a lot of work, detailed below :
> 
> Given that Arnd is removing legacy platformdata code, that will only leave
> the
> device-tree one, which works only with the pinctrl driver enabled.
> That gives the opportunity to drop the use of GPDR from the gpio-pxa driver,
> and now we can map with separate iomem ressources pinctrl-pxa and gpio-pxa.
> 
> Therefore, if Jonathan has the will to make a patch, I would :
> - keep the patch identfied by Russell (ie. don't revert it)
> - amend the device-tree descriptions for pxa
>  - pxa2xx.dtsi
> ...
> 		gpio: gpio@...00000 {
> ...
> 			reg = <0x40e00000 0xc>, <0x40e00018 0x3c>, 			<0x40e00100 4>, <0x40e00118
> 0x34>;
> - amend the gpio_pxa.c driver, to map the 4 regions (and not only  one as
> before)
> - the pinctrl-pxa25.c and its device-tree are already mapping the  holes in
> the
>  previous list
> - check that I didn't mess up the 4 iomem regions, they should  overlap with
>  "pinctrl: pinctrl@...00000".

And I might try this as well and see if I hit any additional obstacles.
I'll probably get around to it in january.


Thanks again,
Jonathan

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ