From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CDC9C4167D for ; Wed, 29 Dec 2021 01:21:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238172AbhL2BVM (ORCPT ); Tue, 28 Dec 2021 20:21:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238150AbhL2BVH (ORCPT ); Tue, 28 Dec 2021 20:21:07 -0500 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84BA0C061574; Tue, 28 Dec 2021 17:21:07 -0800 (PST) Received: by mail-pg1-x52e.google.com with SMTP id v25so17214069pge.2; Tue, 28 Dec 2021 17:21:07 -0800 (PST) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ce+QRujFh6Z6jXwpwj96Ajoqinq3qkVE1ootEg0tvM4=; b=3cAgaISPe6iDiOddkPv0lqlXrSy3AKpOXh3NtLmjTn9vWZEUcpXuoKnrtWdH+V5FCb lsW1e1fQl809DRHJdBld8g82kq3v6dBN07R5zT2Z4Z4XbvgxfBaE0pXFHLVrLrS76OKe P202ipesU6XjiINC5pJbU+jZCtRlerHK7jePd2cJUVPb6kcyIKESLokmwojC6flYM4k1 L8DCrqwVO+nZKnKo1Q9hUI3Pj/csAsubrjbFq3CWHIV6OsG+KDhJgdGaEDY/dPzMcMyZ MIXv05XtEuzhmpz8HO2J8crMVgSIyKK2y+l7QAOuWfXjHTdCALHJ5aykfZeDvUUv0Kne yyZA== X-Gm-Message-State: AOAM533De7O8yg0IW11cBjcxIOLGKjA/O+8KdOuc61KFdsYYCDvezfzR AGheKH0nrObwVumEDl0mKWM= X-Google-Smtp-Source: ABdhPJx/po46hxln8jdEFq24zHXmQfZv0rMy1a+pao1gS+//RcuuYa1+uO7C36+ZKnR8X7vS6LfebQ== X-Received: by 2002:a05:6a00:cca:b0:4ba:f5cc:538c with SMTP id b10-20020a056a000cca00b004baf5cc538cmr24584430pfv.60.1640740867094; Tue, 28 Dec 2021 17:21:07 -0800 (PST) Received: from [10.1.1.24] (222-155-5-102-adsl.sparkbb.co.nz. [222.155.5.102]) by smtp.gmail.com with ESMTPSA id cm20sm18920963pjb.28.2021.12.28.17.20.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Dec 2021 17:21:06 -0800 (PST) Subject: Re: [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary To: Geert Uytterhoeven , Niklas Schnelle References: <20211227164317.4146918-1-schnelle@linux.ibm.com> <20211227164317.4146918-3-schnelle@linux.ibm.com> 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 , Russell King , Catalin Marinas , Will Deacon , Michal Simek , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Rich Felker , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, linux-riscv@lists.infradead.org, linux-csky@vger.kernel.org, linux-xtensa@linux-xtensa.org, openrisc@lists.librecores.org, linux-s390@vger.kernel.org, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, Greg Ungerer From: Michael Schmitz Message-ID: Date: Wed, 29 Dec 2021 14:20:38 +1300 User-Agent: Mozilla/5.0 (X11; Linux ppc; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org 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 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87DF9C433F5 for ; Wed, 29 Dec 2021 01:21:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Xej3LKOYLPJfMJReZH7EoUndvQQkC7eyQ/FwqZzfaqI=; b=duXbP6sJcM56jbMfEe52kagol7 8qgvFMGyOrHEkMwhChdNQSYf9KVkkFWDn9mujFobe1k32X15NcVsS0HkJ5wccz4c77473F4mg83+X lCHQVa93IAoAQcR+CG+0rPQ/0qbxDlzkH3Iu+UQVjyHbG2XE/v0u0jORgrWADUKQ0BPmMZTZAoPSG UAPC+mA0AG+lp26mwYTZn+ywIbJerxmdefugUqn+9I0HOcBedDZDOTdkhk4mK7TJMrg/eHmInokSD JbR3kuZXmkjOOfNwO4CJMXQn7HeX6k35ZSsU0EkDmriN2b2pVW+TDLPzBZOS5d3Cb4TvdJ1hjb+uS ARSdy6cg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n2NeS-0025ox-O8; Wed, 29 Dec 2021 01:21:12 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n2NeO-0025nz-MA; Wed, 29 Dec 2021 01:21:10 +0000 Received: by mail-pg1-x529.google.com with SMTP id g22so17219763pgn.1; Tue, 28 Dec 2021 17:21:07 -0800 (PST) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ce+QRujFh6Z6jXwpwj96Ajoqinq3qkVE1ootEg0tvM4=; b=E2q4d6dqTZSEilqDuJC3TRqtB6OqAyGZvr6bATbnUOvsSEXUUmaINDJfbMhou5f5k/ GspbKbOtt3SGwfj9YebEmBW3wV8vvyX1jS0g3dwWB2UelveekMYAKK+QVKRoGexir5E2 /BexOdm+AzbpTLElIU6KzU8BGD/eQjBiKkIsBtOrj5xwhLvdU1F7ztFqba+2lzFN9nD5 Hd59D4u5eNwSZBIKF6GlA5K4m71m6rGBaVFkqCMxD0+lD0iFWYNhnuiVV4yMtaGPGtKK QDWGkLVwjKDNwp3s0T7LL/SEdWaOTLuKK5LZOcO2CRys/SItNIrr15VbK0vYUZX9SEiN Bg6w== X-Gm-Message-State: AOAM533y1AqY4ntFGdZlxy4hSuzmAJ7089tNIWl+r5FhrBng848+ih7E YlCBLxiKRTU7G2ikIpRqH9k= X-Google-Smtp-Source: ABdhPJx/po46hxln8jdEFq24zHXmQfZv0rMy1a+pao1gS+//RcuuYa1+uO7C36+ZKnR8X7vS6LfebQ== X-Received: by 2002:a05:6a00:cca:b0:4ba:f5cc:538c with SMTP id b10-20020a056a000cca00b004baf5cc538cmr24584430pfv.60.1640740867094; Tue, 28 Dec 2021 17:21:07 -0800 (PST) Received: from [10.1.1.24] (222-155-5-102-adsl.sparkbb.co.nz. [222.155.5.102]) by smtp.gmail.com with ESMTPSA id cm20sm18920963pjb.28.2021.12.28.17.20.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Dec 2021 17:21:06 -0800 (PST) Subject: Re: [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary To: Geert Uytterhoeven , Niklas Schnelle References: <20211227164317.4146918-1-schnelle@linux.ibm.com> <20211227164317.4146918-3-schnelle@linux.ibm.com> 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 , Russell King , Catalin Marinas , Will Deacon , Michal Simek , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Rich Felker , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, linux-riscv@lists.infradead.org, linux-csky@vger.kernel.org, linux-xtensa@linux-xtensa.org, openrisc@lists.librecores.org, linux-s390@vger.kernel.org, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, Greg Ungerer From: Michael Schmitz Message-ID: Date: Wed, 29 Dec 2021 14:20:38 +1300 User-Agent: Mozilla/5.0 (X11; Linux ppc; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211228_172108_803410_04CE9FA9 X-CRM114-Status: GOOD ( 27.95 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1081BC4167E for ; Wed, 29 Dec 2021 01:21:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8Yhl7iwJnaq42BKhKTrzal9NxIVrsDJNpKc2tW2tBzk=; b=Qpynl52Iek6nbkByOl0r86ejTr uIunIMZTNE6Tb9UrnZWp+X3x3cXYfQzF/r6BdqKjbFKTJ1iN9eC11klep/jgxmdF1nUBD3daUBGFH bqDHDj2rNHAL+HVn6+ZZVA/pslzKW+cOmGAVziyTNNLDZIMcSr7vG8ykq20hQgzEeEHgWHD2EQGQi Asm0G7BgW6lKuGgEQAUtTk06h5fiSDxNCR5ZQ6+gD/MsEWTfhjBmpnqnvyRBqsIvymfJQ74ztaQtj Wju5p0qQGbpqDnXInqMzH9v56flOuDT4LpeaUqIvSwXEXie99FOYBrCLL9ywssXrPnM6FwwX5Ne9X j0dgrieg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n2NeS-0025or-Gl; Wed, 29 Dec 2021 01:21:12 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n2NeO-0025nz-MA; Wed, 29 Dec 2021 01:21:10 +0000 Received: by mail-pg1-x529.google.com with SMTP id g22so17219763pgn.1; Tue, 28 Dec 2021 17:21:07 -0800 (PST) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ce+QRujFh6Z6jXwpwj96Ajoqinq3qkVE1ootEg0tvM4=; b=E2q4d6dqTZSEilqDuJC3TRqtB6OqAyGZvr6bATbnUOvsSEXUUmaINDJfbMhou5f5k/ GspbKbOtt3SGwfj9YebEmBW3wV8vvyX1jS0g3dwWB2UelveekMYAKK+QVKRoGexir5E2 /BexOdm+AzbpTLElIU6KzU8BGD/eQjBiKkIsBtOrj5xwhLvdU1F7ztFqba+2lzFN9nD5 Hd59D4u5eNwSZBIKF6GlA5K4m71m6rGBaVFkqCMxD0+lD0iFWYNhnuiVV4yMtaGPGtKK QDWGkLVwjKDNwp3s0T7LL/SEdWaOTLuKK5LZOcO2CRys/SItNIrr15VbK0vYUZX9SEiN Bg6w== X-Gm-Message-State: AOAM533y1AqY4ntFGdZlxy4hSuzmAJ7089tNIWl+r5FhrBng848+ih7E YlCBLxiKRTU7G2ikIpRqH9k= X-Google-Smtp-Source: ABdhPJx/po46hxln8jdEFq24zHXmQfZv0rMy1a+pao1gS+//RcuuYa1+uO7C36+ZKnR8X7vS6LfebQ== X-Received: by 2002:a05:6a00:cca:b0:4ba:f5cc:538c with SMTP id b10-20020a056a000cca00b004baf5cc538cmr24584430pfv.60.1640740867094; Tue, 28 Dec 2021 17:21:07 -0800 (PST) Received: from [10.1.1.24] (222-155-5-102-adsl.sparkbb.co.nz. [222.155.5.102]) by smtp.gmail.com with ESMTPSA id cm20sm18920963pjb.28.2021.12.28.17.20.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Dec 2021 17:21:06 -0800 (PST) Subject: Re: [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary To: Geert Uytterhoeven , Niklas Schnelle References: <20211227164317.4146918-1-schnelle@linux.ibm.com> <20211227164317.4146918-3-schnelle@linux.ibm.com> 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 , Russell King , Catalin Marinas , Will Deacon , Michal Simek , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Rich Felker , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, linux-riscv@lists.infradead.org, linux-csky@vger.kernel.org, linux-xtensa@linux-xtensa.org, openrisc@lists.librecores.org, linux-s390@vger.kernel.org, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, Greg Ungerer From: Michael Schmitz Message-ID: Date: Wed, 29 Dec 2021 14:20:38 +1300 User-Agent: Mozilla/5.0 (X11; Linux ppc; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211228_172108_803410_04CE9FA9 X-CRM114-Status: GOOD ( 27.95 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org 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 > _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F0CAC433F5 for ; Thu, 30 Dec 2021 08:00:36 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JPggQ5cdTz3cQ3 for ; Thu, 30 Dec 2021 19:00:34 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=HR4+5gEv; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::532; helo=mail-pg1-x532.google.com; envelope-from=schmitzmic@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=HR4+5gEv; dkim-atps=neutral Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JNts45G3Rz2yw5 for ; Wed, 29 Dec 2021 12:21:10 +1100 (AEDT) Received: by mail-pg1-x532.google.com with SMTP id 2so17171589pgb.12 for ; Tue, 28 Dec 2021 17:21:10 -0800 (PST) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ce+QRujFh6Z6jXwpwj96Ajoqinq3qkVE1ootEg0tvM4=; b=EOl6tv9goQOaQ4inz7E1kYbqcPMNMxV+2wkE94SkzIwiEpDAqpwMuatU+9SuW8L+9h m/Xl/oCNNBQt066W7CjkDfH0paSBFcfz2mVE8wSHODfrSsgMFXvGT9txBPb84ArbdAN6 gOHAkI1H3UEcCDS+1vBRzUZ5VWVcHP6/OP53hGoQyjP5o6ZYC84yKvdRw1M9hDLsRzdm VYNOP0UVFpWRFGQiky63TvkLa6TTJYIQsNL/rynkRLXV2RTR1S7UW/7eH+O+6zHKUgR7 o2bgYy5452I4Gs4FWdgoTcxxtJoVeCMrmkPPmgS7g7wThWLGvpEagYb9UMvMeUlquLBV PI2g== X-Gm-Message-State: AOAM533njyGX4bQ+B128J58RgbhVhJhAUt3a8/dSjpW5iexfpRF3RZ3g 9KUY8EhbR0WI3MdtnSz7eXc= X-Google-Smtp-Source: ABdhPJx/po46hxln8jdEFq24zHXmQfZv0rMy1a+pao1gS+//RcuuYa1+uO7C36+ZKnR8X7vS6LfebQ== X-Received: by 2002:a05:6a00:cca:b0:4ba:f5cc:538c with SMTP id b10-20020a056a000cca00b004baf5cc538cmr24584430pfv.60.1640740867094; Tue, 28 Dec 2021 17:21:07 -0800 (PST) Received: from [10.1.1.24] (222-155-5-102-adsl.sparkbb.co.nz. [222.155.5.102]) by smtp.gmail.com with ESMTPSA id cm20sm18920963pjb.28.2021.12.28.17.20.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Dec 2021 17:21:06 -0800 (PST) Subject: Re: [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary To: Geert Uytterhoeven , Niklas Schnelle References: <20211227164317.4146918-1-schnelle@linux.ibm.com> <20211227164317.4146918-3-schnelle@linux.ibm.com> From: Michael Schmitz Message-ID: Date: Wed, 29 Dec 2021 14:20:38 +1300 User-Agent: Mozilla/5.0 (X11; Linux ppc; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 30 Dec 2021 18:58:16 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , linux-sh@vger.kernel.org, Catalin Marinas , Dave Hansen , linux-pci@vger.kernel.org, linux-mips@vger.kernel.org, "James E.J. Bottomley" , sparclinux@vger.kernel.org, Guo Ren , "H. Peter Anvin" , Borislav Petkov , linux-ia64@vger.kernel.org, linux-riscv@lists.infradead.org, Vincent Chen , Will Deacon , Greg Ungerer , Karol Gugala , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Yoshinori Sato , Helge Deller , x86@kernel.org, Russell King , linux-csky@vger.kernel.org, Ingo Molnar , linux-parisc@vger.kernel.org, Vineet Gupta , Matt Turner , linux-snps-arc@lists.infradead.org, Heiko Carstens , linux-xtensa@linux-xtensa.org, Albert Ou , Chris Zankel , Jeff Dike , John Garry , linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, Ivan Kokshaysky , Greentime Hu , Paul Walmsley , Bjorn Helgaas , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Richard Henderson , Arnd Bergmann , Michal Simek , Thomas Bogendoerfer , Brian Cain , Nick Hu , linux-kernel@vger.kernel.org, Dinh Nguyen , Palmer Dabbelt , linux-alpha@vger.kernel.org, Paul Mackerras , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Schmitz Date: Wed, 29 Dec 2021 14:20:38 +1300 Subject: [OpenRISC] [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary In-Reply-To: References: <20211227164317.4146918-1-schnelle@linux.ibm.com> <20211227164317.4146918-3-schnelle@linux.ibm.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org 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 at 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 at 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 > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Schmitz Date: Wed, 29 Dec 2021 01:20:38 +0000 Subject: Re: [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary Message-Id: List-Id: References: <20211227164317.4146918-1-schnelle@linux.ibm.com> <20211227164317.4146918-3-schnelle@linux.ibm.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 , Russell King , Catalin Marinas , Will Deacon , Michal Simek , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Rich Felker , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, linux-riscv@lists.infradead.org, linux-csky@vger.kernel.org, linux-xtensa@linux-xtensa.org, openrisc@lists.librecores.org, linux-s390@vger.kernel.org, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, Greg Ungerer 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 > From mboxrd@z Thu Jan 1 00:00:00 1970 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 >