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 0BB8CC433FE for ; Tue, 28 Dec 2021 16:32: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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MLvkXvJLWfsj4JQJQXZ0aDiymxSUtGf979ZAFy7+2II=; b=DS8xq9I1tKIWYN Ni8AHPRY3qtLg6LK8/iYmqdz5rzIrn/9Whjzk1PyyNiH4ATmBFHtxAFh9RTlMsjScYgoWw0LNMjTC a2zz1Su5rab1cr2V1nV8r3jTlzktof9X06KVa+aNTMnVqPpZud4tAjHU76N5GaY2j4jj7f0yfggmc kVmhpI4uyG7Bwl9DIW7Tlh5bkJyo0EAbTlcbuIDDrrUzSBtIkMhB7zqMO1UkKv+RajhRbSkXBLFM9 pZGSccktN9mDupEXA6GMLx0VioXY/dgc1sjF0ogux+J4WZHPFdfM0eKpFEHUk/fY0GNOFZ12Cw+Bm 0yUj+MDU1WbQgtz/ucqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n2FOh-001WkQ-KK; Tue, 28 Dec 2021 16:32:23 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n2FOc-001Wi4-Jq; Tue, 28 Dec 2021 16:32:20 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 10330612B1; Tue, 28 Dec 2021 16:32:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C686CC36AE8; Tue, 28 Dec 2021 16:32:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1640709137; bh=wYaH3iu50Xg/A/DNjyHFOWIgZ4rByTFlvgaE/FMZWqY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BTzyk4t+6+nRs9+zo0NSJy02+zZ1BbNUT8+XJkgAXThbIqJ8Tu8Bp03GHCGKlrzYX f6mxa+4pitBIl4IybQMSKiUDklqv+EWiC5aYtEZ6X8W5ej/Y8IazWuQESnlWIxcuv8 qpU3CbEDSyN9MmSRXbz0D4xklNr1SXs2T+TD8ORlrOWK73AvxU+cJQKO+CcdLaW79G ATgeIIpXvKMfQoRIkEcfC8ZFCuCdHf6v7cpx9bOyNNQeNgeuyk4t75tVGNPued/kzl l93VJjvTGGYCbrQFgpNex301S0U5MY1BOFyW0fzdInsg4whSwmaK2ya34ydGPe6YZY 2nZg+WlyMxMSA== Date: Tue, 28 Dec 2021 17:32:02 +0100 From: Mauro Carvalho Chehab 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 , Geert Uytterhoeven , 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 Subject: Re: [RFC 02/32] Kconfig: introduce HAS_IOPORT option and select it as necessary Message-ID: <20211228173202.678baa44@coco.lan> 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> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211228_083218_766957_A1334D64 X-CRM114-Status: GOOD ( 17.35 ) 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 Em Mon, 27 Dec 2021 17:42:47 +0100 Niklas Schnelle escreveu: > 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 ... > @@ -486,6 +487,9 @@ config HAS_IOMEM > depends on !NO_IOMEM > default y > > +config HAS_IOPORT > + def_bool ISA || LEGACY_PCI > + That doesn't sound right. The only dependency for LEGACY_PCI is PCI. If one selects LEGACY_PCI on an architecture that doesn't support it, this will cause problems. Instead, HAS_IOPORT should be selected at architecture level, and the dependency here should be just the opposite: LEGACY_API should depends on HAS_IOPORT. Thanks, Mauro _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc