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: <CAMuHMdVUQ2WgtpYPYfO2T=itMmZ7w=geREqDtsP8Q3ODh9rxdw@mail.gmail.com>
Date: Mon, 8 Apr 2024 10:50:49 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Niklas Schnelle <schnelle@...ux.ibm.com>
Cc: Andi Shyti <andi.shyti@...nel.org>, Wolfram Sang <wsa+renesas@...g-engineering.com>, 
	linux-i2c@...r.kernel.org, Arnd Bergmann <arnd@...nel.org>, 
	Heiko Carstens <hca@...ux.ibm.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/1] i2c: add HAS_IOPORT dependencies

Hi Niklas,

On Fri, Apr 5, 2024 at 12:10 PM Niklas Schnelle <schnelle@...ux.ibmcom> wrote:
> In a future patch HAS_IOPORT=n will disable inb()/outb() and friends at
> compile time. We thus need to add HAS_IOPORT as dependency for those
> drivers using them.
>
> Co-developed-by: Arnd Bergmann <arnd@...nel.org>
> Signed-off-by: Arnd Bergmann <arnd@...nel.org>
> Signed-off-by: Niklas Schnelle <schnelle@...ux.ibm.com>
> ---
> Note: This patch does not depend any not-yet-mainline HAS_IOPORT changes
> and may be merged via subsystem specific trees at your earliest
> convenience.
>
> v1 - v2:
> - Removed HAS_IOPORT dependency for I2C_PARPORT

Thanks for your patch, which is now commit 53f44c1005ba6421 ("i2c: add
HAS_IOPORT dependencies") in i2c-host/i2c/i2c-host (next-20240408).

> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -885,6 +885,7 @@ config I2C_NPCM
>
>  config I2C_OCORES
>         tristate "OpenCores I2C Controller"
> +       depends on HAS_IOPORT

This restricts the driver to platforms that select HAS_IOPORT, while
the driver supports both MMIO and IOPORT.

At least for
arch/xtensa/configs/audio_kc705_defconfig:CONFIG_I2C_OCORES=y
the HAS_IOPORT dependency does not seem to be met.

I think the IOPORT part in i2c-ocores.c should be protected by
"#ifdef HAS_IOPORT" first, so the driver can still be built on platforms
that do not support IOPORT.

>         help
>           If you say yes to this option, support will be included for the
>           OpenCores I2C controller. For details see

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68korg

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ