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: <m2pmcteilg.fsf@sopl295-1.home>
Date:   Thu, 08 Dec 2022 21:19:12 +0100
From:   Robert Jarzmik <robert.jarzmik@...e.fr>
To:     "Russell King (Oracle)" <linux@...linux.org.uk>,
        Jonathan Neuschäfer 
        <j.neuschaefer@....net>
Cc:     Robert Jarzmik <robert.jarzmik@...e.fr>,
        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


"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
 - 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".

Well it's up to Jonathan to see which version he prefers to 
choose, the simple
one or the tedious one.

Cheers.

--
Robert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ