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 3747FC433F5 for ; Mon, 2 May 2022 09:15:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384130AbiEBJSg (ORCPT ); Mon, 2 May 2022 05:18:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234028AbiEBJSa (ORCPT ); Mon, 2 May 2022 05:18:30 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 50E8036B50; Mon, 2 May 2022 02:15:01 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 776CE92009C; Mon, 2 May 2022 11:15:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 712B392009B; Mon, 2 May 2022 10:15:00 +0100 (BST) Date: Mon, 2 May 2022 10:15:00 +0100 (BST) From: "Maciej W. Rozycki" To: Niklas Schnelle cc: Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, Arnd Bergmann , Jiri Slaby , "open list:SERIAL DRIVERS" Subject: Re: [RFC v2 34/39] tty: serial: add HAS_IOPORT dependencies In-Reply-To: <20220429135108.2781579-63-schnelle@linux.ibm.com> Message-ID: References: <20220429135108.2781579-1-schnelle@linux.ibm.com> <20220429135108.2781579-63-schnelle@linux.ibm.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Apr 2022, Niklas Schnelle wrote: > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends > not being declared. We thus need to add HAS_IOPORT as dependency for > those drivers using them. [...] > diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig > index cd93ea6eed65..e216bf745e78 100644 > --- a/drivers/tty/serial/8250/Kconfig > +++ b/drivers/tty/serial/8250/Kconfig > @@ -6,7 +6,7 @@ > > config SERIAL_8250 > tristate "8250/16550 and compatible serial support" > - depends on !S390 > + depends on HAS_IOPORT > select SERIAL_CORE > select SERIAL_MCTRL_GPIO if GPIOLIB > help Similarly here some 8250-compatible platform or PCI/e serial port devices use MMIO, e.g.: serial8250.0: ttyS2 at MMIO 0x1f000900 (irq = 20, base_baud = 230400) is a 16550A or: 0001:01:00.0: ttyS0 at MMIO 0x600c080401000 (irq = 40, base_baud = 15625000) is a 16C950/954 so this has to be sorted out within the driver rather than by disabling it altogether. Possibly with a suitable conditional wired to HAS_IOPORT in `set_io_from_upio' in drivers/tty/serial/8250/8250_port.c. Maciej