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 C0305C433FE for ; Tue, 28 Dec 2021 10:08:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233613AbhL1KIf (ORCPT ); Tue, 28 Dec 2021 05:08:35 -0500 Received: from mail-pj1-f50.google.com ([209.85.216.50]:46909 "EHLO mail-pj1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231577AbhL1KI3 (ORCPT ); Tue, 28 Dec 2021 05:08:29 -0500 Received: by mail-pj1-f50.google.com with SMTP id rj2-20020a17090b3e8200b001b1944bad25so16624366pjb.5; Tue, 28 Dec 2021 02:08:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1LdjVJCupkO66VZRPSdtPXWlxTkxQlblL8anKkt6w1Y=; b=ZxAXFS8epFPw09ZN0+5hygHuHtiZD15wSaBV6dxyVVAvNOnLiTLcLSpVzMBp3GRSKs lHONSdKRFsYbvSS2nNdc9qIlUsl6URjcppunLPl7poQwyhsAq54aQFG1T5efkgB0WTpj jszpoUuVcDSpiNtyCF/Iuv+E019pAkaqLrKm408xBzxLPCiT59hf7wA+OVGSqW1PuNBS IqNSrixAy/47uuKqQSMp71+oq4JVQ+fqDdr+cgWwUC+3FyMTTUmoEZUTFjwdwPeTFdkk 2G9f/TmP0nFeemKqPiUCLCJcTYa9EtgokgorLJG3SqwEPSIAJjU+qr//95aOIB9Wm4dU Qcww== X-Gm-Message-State: AOAM531kJlRu9ZXA2MVpfjDqV+WLIS9VCO+uQj4cWaFiXbaxO/6LYPJK cz0WDB9ZfFOUiA17tbzDs4KXNIakGRV9DA== X-Google-Smtp-Source: ABdhPJwtJyt0BgB9nbPsBRAQG20xhRS7PITFUS4MEI44HL4ksxJALw2U9DOV/Yv9U25TYDqf80Z5gg== X-Received: by 2002:a17:90b:1e07:: with SMTP id pg7mr25529252pjb.228.1640686108603; Tue, 28 Dec 2021 02:08:28 -0800 (PST) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com. [209.85.216.52]) by smtp.gmail.com with ESMTPSA id rm3sm15580381pjb.8.2021.12.28.02.08.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Dec 2021 02:08:28 -0800 (PST) Received: by mail-pj1-f52.google.com with SMTP id rj2-20020a17090b3e8200b001b1944bad25so16624295pjb.5; Tue, 28 Dec 2021 02:08:27 -0800 (PST) X-Received: by 2002:a05:6122:21a6:: with SMTP id j38mr6293010vkd.39.1640686096258; Tue, 28 Dec 2021 02:08:16 -0800 (PST) MIME-Version: 1.0 References: <20211227164317.4146918-1-schnelle@linux.ibm.com> <20211227164317.4146918-3-schnelle@linux.ibm.com> In-Reply-To: <20211227164317.4146918-3-schnelle@linux.ibm.com> From: Geert Uytterhoeven Date: Tue, 28 Dec 2021 11:08:05 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary To: 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, Michael Schmitz , Greg Ungerer Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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... 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 065ADC433F5 for ; Tue, 28 Dec 2021 10:08:36 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MdCfv9GZaIGlrHCUUx0jzJf6m42ZKvOqjJaEVacx2b8=; b=OgD3EQAIiwnUKv 2ConLz3Ez1QiWZFC+wvqwOaNFAuHmd9z5htDkRa74LpLHEsSvIrQIRpXcCqYURxW9tHGuhPH2kuIE EnzBPBDfe5sr0v+04MMrjHkpb3jDBWQSCTMAA6R6rqJ1T95z4IUMMJ+kcLjFGhhVA939PVz+/nEQH sokVqQerGiwbIJN+E7FrjAOmgmCUWo/hYh62uqbdvryIzhRXvv8DPFSByU1HUJTQZlN0CUreFUL/l dDcXxSLfxLC2tIqFratfi4VbXLeJ+youmk4lzgkAWvORJRNXTUIAkk/m8YI0l3zptJEb4VmSMfoUp Hc5fCtqQGkjNkjBOyS0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n29PH-000da4-6j; Tue, 28 Dec 2021 10:08:35 +0000 Received: from mail-pj1-f46.google.com ([209.85.216.46]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n29PC-000dYf-Bw; Tue, 28 Dec 2021 10:08:31 +0000 Received: by mail-pj1-f46.google.com with SMTP id co15so15563648pjb.2; Tue, 28 Dec 2021 02:08:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1LdjVJCupkO66VZRPSdtPXWlxTkxQlblL8anKkt6w1Y=; b=lzfKUQ/WYOvM5xVrtG7IamQlszlb61p2UlpszHPihdY5mNuFlEGrewPwnrIlAdrT1h rTU9/Aeb2yDyp4g0o68RtgiOswqtdXQkPsdrRULuh62w/Y17ugSZkks5rKctDtmoV+ZW 1l4DrWKUGrU9q8NxO79OT72+5NoI5i5LDleSRv7XHaUSJ0JDYDbvg8Emp4WFBcycqIxe o4tkHBr15ao00IuZeu/l8a8CQrFZNhiFg71URbjf6ogmEhaXY5wDH6SIQ2RYkcbp5zEL 05fQGbjp5tcVI1jBp4DiJMvt6Hc3TdudICDSpZFUM9Cv2eWq0rcTb3Q3IK4hj1Anw++k v9Xw== X-Gm-Message-State: AOAM53312UUFRhW2qys15CgxVpyyO3Zx6dCqfcxArQSL9VLHX69ZLGb6 o0w1mgd5Z4+Y0/TLTbN3wCVIWHQWjPrMYw== X-Google-Smtp-Source: ABdhPJzN3nz6+4DFHCt8+3YyitYqfXFbNQEyv/tUIYfRco6lfs/AT1BVLzZr+7dMTbudIRhjgrLRWQ== X-Received: by 2002:a17:902:c214:b0:148:a798:7aa with SMTP id 20-20020a170902c21400b00148a79807aamr21552102pll.90.1640686108369; Tue, 28 Dec 2021 02:08:28 -0800 (PST) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com. [209.85.216.44]) by smtp.gmail.com with ESMTPSA id c124sm19486152pfb.139.2021.12.28.02.08.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Dec 2021 02:08:28 -0800 (PST) Received: by mail-pj1-f44.google.com with SMTP id iy13so15550512pjb.5; Tue, 28 Dec 2021 02:08:27 -0800 (PST) X-Received: by 2002:a05:6122:21a6:: with SMTP id j38mr6293010vkd.39.1640686096258; Tue, 28 Dec 2021 02:08:16 -0800 (PST) MIME-Version: 1.0 References: <20211227164317.4146918-1-schnelle@linux.ibm.com> <20211227164317.4146918-3-schnelle@linux.ibm.com> In-Reply-To: <20211227164317.4146918-3-schnelle@linux.ibm.com> From: Geert Uytterhoeven Date: Tue, 28 Dec 2021 11:08:05 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary To: 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, Michael Schmitz , Greg Ungerer X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211228_020830_420103_92ACA02A X-CRM114-Status: GOOD ( 25.22 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org 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... 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 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 5C7D9C433EF for ; Tue, 28 Dec 2021 10:08:44 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5PijgOsWxKn47yiyad3i4d4ZORluG1cwyZi3qJhRKDo=; b=LfhfjWw5eVZ9Yz UtWnMX6DYHiPdG09YPHhTlvLh7EkOZwA0yx10vbv+epnYdLKDN+OijZBwzlBkI9JjmOTYu8ByAD0T 6V+E4C+Y3kSvIc9pgvi43gWC3IQO+sn0r43BZhLW6G1tpyght42vn/cC8J2YmPzeE4qwf9F0oxie6 ape1ovUfxzqUj6LuJCL9lyajjMFdrzemG8a6AGqsstcoBu2OYC8mBKJEotP6/mMrtP0wyxwX1yOB8 /xd2/dbvV+R3W9AVyIpiS7PlklOZyF2A6ZYkjyFrgc0b+ryUSLf6FpW8xRH/fKh2BZS398sY6VDH4 Vq9T37XPqcdelOgnM97A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n29PF-000dZL-JY; Tue, 28 Dec 2021 10:08:33 +0000 Received: from mail-pj1-f46.google.com ([209.85.216.46]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n29PC-000dYf-Bw; Tue, 28 Dec 2021 10:08:31 +0000 Received: by mail-pj1-f46.google.com with SMTP id co15so15563648pjb.2; Tue, 28 Dec 2021 02:08:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1LdjVJCupkO66VZRPSdtPXWlxTkxQlblL8anKkt6w1Y=; b=lzfKUQ/WYOvM5xVrtG7IamQlszlb61p2UlpszHPihdY5mNuFlEGrewPwnrIlAdrT1h rTU9/Aeb2yDyp4g0o68RtgiOswqtdXQkPsdrRULuh62w/Y17ugSZkks5rKctDtmoV+ZW 1l4DrWKUGrU9q8NxO79OT72+5NoI5i5LDleSRv7XHaUSJ0JDYDbvg8Emp4WFBcycqIxe o4tkHBr15ao00IuZeu/l8a8CQrFZNhiFg71URbjf6ogmEhaXY5wDH6SIQ2RYkcbp5zEL 05fQGbjp5tcVI1jBp4DiJMvt6Hc3TdudICDSpZFUM9Cv2eWq0rcTb3Q3IK4hj1Anw++k v9Xw== X-Gm-Message-State: AOAM53312UUFRhW2qys15CgxVpyyO3Zx6dCqfcxArQSL9VLHX69ZLGb6 o0w1mgd5Z4+Y0/TLTbN3wCVIWHQWjPrMYw== X-Google-Smtp-Source: ABdhPJzN3nz6+4DFHCt8+3YyitYqfXFbNQEyv/tUIYfRco6lfs/AT1BVLzZr+7dMTbudIRhjgrLRWQ== X-Received: by 2002:a17:902:c214:b0:148:a798:7aa with SMTP id 20-20020a170902c21400b00148a79807aamr21552102pll.90.1640686108369; Tue, 28 Dec 2021 02:08:28 -0800 (PST) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com. [209.85.216.44]) by smtp.gmail.com with ESMTPSA id c124sm19486152pfb.139.2021.12.28.02.08.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Dec 2021 02:08:28 -0800 (PST) Received: by mail-pj1-f44.google.com with SMTP id iy13so15550512pjb.5; Tue, 28 Dec 2021 02:08:27 -0800 (PST) X-Received: by 2002:a05:6122:21a6:: with SMTP id j38mr6293010vkd.39.1640686096258; Tue, 28 Dec 2021 02:08:16 -0800 (PST) MIME-Version: 1.0 References: <20211227164317.4146918-1-schnelle@linux.ibm.com> <20211227164317.4146918-3-schnelle@linux.ibm.com> In-Reply-To: <20211227164317.4146918-3-schnelle@linux.ibm.com> From: Geert Uytterhoeven Date: Tue, 28 Dec 2021 11:08:05 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary To: 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, Michael Schmitz , Greg Ungerer X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211228_020830_420103_92ACA02A X-CRM114-Status: GOOD ( 25.22 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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... 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 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 00082C433EF for ; Thu, 30 Dec 2021 07:59:22 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JPgf11YwVz3cPQ for ; Thu, 30 Dec 2021 18:59:21 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.215.173; helo=mail-pg1-f173.google.com; envelope-from=geert.uytterhoeven@gmail.com; receiver=) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (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 4JNVc12Vnnz2xtv for ; Tue, 28 Dec 2021 21:08:31 +1100 (AEDT) Received: by mail-pg1-f173.google.com with SMTP id s1so14101957pga.5 for ; Tue, 28 Dec 2021 02:08:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1LdjVJCupkO66VZRPSdtPXWlxTkxQlblL8anKkt6w1Y=; b=nP9K+XGoxVFxwBngYnSnJLt4FeJ88EV+MHGPwuyS6XGNO+PbdooYcxF0ACfsKoUeHI 5Ncc74qx/jYttEK17LJP4HNTKaNbfb98K3QcY2uHtdnW21KVGP1FGx4tKAilJiPeWJew oI2gW3bLTbCZHoB7yewOUYzvNASSkLiyMsMkI6Ao2v2NIuTEBYCrMlUP+pK0Y0c9Vizp ynBVDV66zqHLRlFFzjFbPcxd1Thu6j6FS9Bg7dp/i5D7+CxuYckQ/F5mfEDwaN/TDVj0 Sg2jA6yyF9vfDUD5jqxgEP/0GEhQlIE93pyMznET7j5qy733oBwUsX2MApf5F9u4ASat rvkQ== X-Gm-Message-State: AOAM5334dO8jo7/GUAFCy+pZWttmvpU1F2Fk7jYPkvHcP1rwFYoBqHRQ o0flxKXk1yUVnKDwmSqyEvTqGzANDnVHcQ== X-Google-Smtp-Source: ABdhPJxuLIWx3XoQYt2Pf60Pby+xytjL4qzWkcwwTXq6EjEKcA5K3CM0yLmj3pMX6fcvBk5YBDRB6w== X-Received: by 2002:a05:6a00:2391:b0:4a2:cb64:2e43 with SMTP id f17-20020a056a00239100b004a2cb642e43mr21525537pfc.49.1640686107022; Tue, 28 Dec 2021 02:08:27 -0800 (PST) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com. [209.85.214.178]) by smtp.gmail.com with ESMTPSA id on2sm23238712pjb.19.2021.12.28.02.08.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Dec 2021 02:08:26 -0800 (PST) Received: by mail-pl1-f178.google.com with SMTP id x15so13243294plg.1 for ; Tue, 28 Dec 2021 02:08:26 -0800 (PST) X-Received: by 2002:a05:6122:21a6:: with SMTP id j38mr6293010vkd.39.1640686096258; Tue, 28 Dec 2021 02:08:16 -0800 (PST) MIME-Version: 1.0 References: <20211227164317.4146918-1-schnelle@linux.ibm.com> <20211227164317.4146918-3-schnelle@linux.ibm.com> In-Reply-To: <20211227164317.4146918-3-schnelle@linux.ibm.com> From: Geert Uytterhoeven Date: Tue, 28 Dec 2021 11:08:05 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary To: Niklas Schnelle Content-Type: text/plain; charset="UTF-8" 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 , Michael Schmitz , 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 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... 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: Geert Uytterhoeven Date: Tue, 28 Dec 2021 11:08:05 +0100 Subject: [OpenRISC] [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary In-Reply-To: <20211227164317.4146918-3-schnelle@linux.ibm.com> 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 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... 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: Geert Uytterhoeven Date: Tue, 28 Dec 2021 10:08:05 +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: <20211227164317.4146918-3-schnelle@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: 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, Michael Schmitz , Greg Ungerer 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... 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: Geert Uytterhoeven Subject: Re: [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary Date: Tue, 28 Dec 2021 11:08:05 +0100 Message-ID: References: <20211227164317.4146918-1-schnelle@linux.ibm.com> <20211227164317.4146918-3-schnelle@linux.ibm.com> Mime-Version: 1.0 Return-path: In-Reply-To: <20211227164317.4146918-3-schnelle@linux.ibm.com> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: 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 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... Gr{oetje,eeting}s, Geert