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: <04260159-f5a8-47f7-b267-33f4ea19b8a6@linaro.org>
Date:   Sun, 8 Oct 2023 15:09:29 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Sam Protsenko <semen.protsenko@...aro.org>,
        Mateusz Majewski <m.majewski2@...sung.com>
Cc:     linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org, Tomasz Figa <tomasz.figa@...il.com>,
        Sylwester Nawrocki <s.nawrocki@...sung.com>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: [PATCH 0/4] Fix Samsung pinctrl driver static allocation of GPIO
 base warning

On 07/10/2023 04:14, Sam Protsenko wrote:
> On Fri, Oct 6, 2023 at 8:01 AM Mateusz Majewski <m.majewski2@...sung.com> wrote:
>>
>> The object of this work is fixing the following warning, which appears
>> on all targets using that driver:
>>
>> gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
>>
>> This needs a small refactor to how we interact with the pinctrl
>> subsystem. Finally, we remove some bookkeeping that has only been
>> necessary to allocate GPIO bases correctly.
>>
>> Mateusz Majewski (4):
>>   pinctrl: samsung: defer pinctrl_enable
>>   pinctrl: samsung: use add_pin_ranges method to add pinctrl ranges
>>   pinctrl: samsung: choose GPIO numberspace base dynamically
>>   pinctrl: samsung: do not offset pinctrl numberspaces
>>
>>  drivers/pinctrl/samsung/pinctrl-samsung.c | 56 ++++++++++++-----------
>>  drivers/pinctrl/samsung/pinctrl-samsung.h |  4 +-
>>  2 files changed, 31 insertions(+), 29 deletions(-)
>>
>> --
> 
> Hi Mateusz,
> 
> Thank you for handling this! Those deprecation warnings have been
> bugging me for some time :) While testing this series on my E850-96
> board (Exynos850 based), I noticed some changes in
> /sys/kernel/debug/gpio file, like these:
> 
> 8<------------------------------------------------------------------------------------------>8
> -gpiochip0: GPIOs 0-7, parent: platform/11850000.pinctrl, gpa0:
> - gpio-7   (                    |Volume Up           ) in  hi IRQ ACTIVE LOW
> +gpiochip0: GPIOs 512-519, parent: platform/11850000.pinctrl, gpa0:
> + gpio-519 (                    |Volume Up           ) in  hi IRQ ACTIVE LOW
> 
> -gpiochip1: GPIOs 8-15, parent: platform/11850000.pinctrl, gpa1:
> - gpio-8   (                    |Volume Down         ) in  hi IRQ ACTIVE LOW
> +gpiochip1: GPIOs 520-527, parent: platform/11850000.pinctrl, gpa1:
> + gpio-520 (                    |Volume Down         ) in  hi IRQ ACTIVE LOW
> 
> -gpiochip2: GPIOs 16-23, parent: platform/11850000.pinctrl, gpa2:
> +gpiochip2: GPIOs 528-535, parent: platform/11850000.pinctrl, gpa2:
> 
> ...
> 8<------------------------------------------------------------------------------------------>8
> 
> So basically it looks like all line numbers were offset by 512. Can
> you please comment on this? Is it an intentional change, and why it's
> happening?
> 
> Despite of that change, everything seems to be working fine. But I
> kinda liked the numeration starting from 0 better :)

Could it be the reason of dynamic allocation?


Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ