From: Michael Schmitz Subject: Re: [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary Date: Wed, 29 Dec 2021 14:20:38 +1300 Message-ID: References: <20211227164317.4146918-1-schnelle@linux.ibm.com> <20211227164317.4146918-3-schnelle@linux.ibm.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=ce+QRujFh6Z6jXwpwj96Ajoqinq3qkVE1ootEg0tvM4=; b=HR4+5gEvbRK0rU8/dntHoBj1g+0X3qKpLMsP358svmvVe4LU0yAyJLNGs3fCG1IxN5 M/QTR8OXVpknffzN/8b3pOWH0ImhkhbIhkjgUWsWwTRZMZ2woqwqIa5115FbA6Nf6xT4 TiKsVnkG1OLJDDZ06iwYnbvfkz/MJz2DtOV5zSZDVPVN2jIRsDW3XOaMugqlveDm5gnG bFN6SiWtJfdMPi0YTy0yZg20PhHPIvQQsScpgCUPn8k9cu6v+natJ9ebpk8jSRGpwixK MiRCzMxl519LQW1SjZgL9Y49JFwBww9vU7/YKwkn2coaccmwFAJf32w2Pk2xT9akAsgc lavA== In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Geert Uytterhoeven , Niklas Schnelle Cc: Arnd Bergmann , Bjorn Helgaas , John Garry , Nick Hu , Greentime Hu , Vincent Chen , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Dinh Nguyen , Chris Zankel , Karol Gugala , Jeff Dike , Yoshinori Sato , Brian Cain , Heiko Carstens , Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta Hi Geert, Niklas, Am 28.12.2021 um 23:08 schrieb Geert Uytterhoeven: > Hi Niklas, > > On Mon, Dec 27, 2021 at 5:44 PM Niklas Schnelle wrote: >> We introduce a new HAS_IOPORT Kconfig option to gate support for >> I/O port access. In a future patch HAS_IOPORT=n will disable compilation >> of the I/O accessor functions inb()/outb() and friends on architectures >> which can not meaningfully support legacy I/O spaces. On these platforms >> inb()/outb() etc are currently just stubs in asm-generic/io.h which when >> called will cause a NULL pointer access which some compilers actually >> detect and warn about. >> >> The dependencies on HAS_IOPORT in drivers as well as ifdefs for >> HAS_IOPORT specific sections will be added in subsequent patches on >> a per subsystem basis. Then a final patch will ifdef the I/O access >> functions on HAS_IOPORT thus turning any use not gated by HAS_IOPORT >> into a compile-time warning. >> >> Link: https://lore.kernel.org/lkml/CAHk-=wg80je=K7madF4e7WrRNp37e3qh6y10Svhdc7O8SZ_-8g@mail.gmail.com/ >> Co-developed-by: Arnd Bergmann >> Signed-off-by: Arnd Bergmann >> Signed-off-by: Niklas Schnelle > > Thanks for your patch! > >> --- a/arch/m68k/Kconfig >> +++ b/arch/m68k/Kconfig >> @@ -16,6 +16,7 @@ config M68K >> select GENERIC_CPU_DEVICES >> select GENERIC_IOMAP >> select GENERIC_IRQ_SHOW >> + select HAS_IOPORT >> select HAVE_AOUT if MMU >> select HAVE_ASM_MODVERSIONS >> select HAVE_DEBUG_BUGVERBOSE > > This looks way too broad to me: most m68k platform do not have I/O > port access support. > > My gut feeling says: > > select HAS_IOPORT if PCI || ISA > > but that might miss some intricate details... In particular, this misses the Atari ROM port ISA adapter case - select HAS_IOPORT if PCI || ISA || ATARI_ROM_ISA might do instead. Cheers, Michael > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > 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 >