Message ID | 20230314121216.413434-10-schnelle@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1721060wrd; Tue, 14 Mar 2023 05:16:34 -0700 (PDT) X-Google-Smtp-Source: AK7set+AJfdIhttY9+2+n5ZUchsoQO9fODF/kEkB3jcGtOppjFuOLCmdk76Yr37m7LKsmM+6Hoeu X-Received: by 2002:a17:90b:3c49:b0:237:40b6:1011 with SMTP id pm9-20020a17090b3c4900b0023740b61011mr38768813pjb.47.1678796194628; Tue, 14 Mar 2023 05:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678796194; cv=none; d=google.com; s=arc-20160816; b=nRAmM8UwuW5EyZqSxqaScxI/1rlRIV2zIRC1s5KZsvlqrU2TtcWBo47Jm8HVVAMDJ4 7DdIoojsgVO++ajTJtvsOEFkhhP6vZurc+VygRzlu9h02J+65xo3DJs3sjGQMYDtNxvF EBQHGAzU6I99j2+FWMspacvJjOow7xBycdjmI8DiXZ81pKa87lL5F9m74P/Znh1ZEP9f DKMu26XkrTTaNZOHUpwx9UtxYsVb1g4hIgXZmQhcn8ElI8Op5xOHoKQuYt3pwdha/p5J t5FqmvB5bPPQ3K+MeZPprwTHzGm7MVfqINZAeDAsvXXEQWc0Mpf1LumgvavYR7/C+nnF oCWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dYcilgWeQhN9EswFD3N2WXjkQar2QGzb7HgZIGntXUo=; b=eKYkTYE3dbe7sonvMkadS6FHJ+A8Rff1zeu3Hg/BJjEKGEpRHu0pUo8zWQqky/OR69 7iJo8xdiXr3/HvbVo3wzrh3EZ7i/DhBpWuytSRIFw81DyOgUmYiJYDRtQAjAdqUD7P9O QNQZ34O2VNbwtxzfjT024JBw3w7tsW9hYefBBsvoB78te7nA5Gky+I7EKoxm6S2nGk3Z Yw0+SAsESATEL5dj8xSfehMPWFUkWPFxQBlxxasA8DztlQ/vd38GMn2TI50NeP88iAEX ylfNNpHdsGekckDgteZrOLnTlcLHZqwGs4KGQzQjXboxGpTYVI/SGETXPN3pAFNkLyYa Rmxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=XVJy5qiP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cm2-20020a17090afa0200b0023d36cbd238si1811254pjb.123.2023.03.14.05.16.20; Tue, 14 Mar 2023 05:16:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=XVJy5qiP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231650AbjCNMNS (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Tue, 14 Mar 2023 08:13:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbjCNMNQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Mar 2023 08:13:16 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 524632B9FA; Tue, 14 Mar 2023 05:12:44 -0700 (PDT) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32EBSdWi011544; Tue, 14 Mar 2023 12:12:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=dYcilgWeQhN9EswFD3N2WXjkQar2QGzb7HgZIGntXUo=; b=XVJy5qiPnHf9/2ED/GsUAiTeJN2tuTyWjP0/v8WA+DJo8ZbkNOja41rq/jmnk5Sxxyr+ +JCZHjP05cwmM2rMfHcQcw3x5jmvDS010eVTB0Xd0MjtIstxURx/gr/TADB0cwr+dsWb +OUa3jkDEB1c26S7g55B8r4wFHtab349IEFCQ/YIG78eJ306yfn2X2CKeBHl2PS+81JE jdp2J+/yAheVAab2PaZ6X4tUNQFar8fK1E7UrWluezDeD5q3X9KUgc82O+ueKYpubMOj 8YR9X2bmd3ymW+vDLr57uA2ob6eIpwQEGFGS8AjO1xAZJAeaV+9jVFpab+e81ep4GDKd YQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pap9ecamm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:33 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32E9a48p030620; Tue, 14 Mar 2023 12:12:32 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pap9ecakp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:32 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32E40x2u017797; Tue, 14 Mar 2023 12:12:30 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma06fra.de.ibm.com (PPS) with ESMTPS id 3p8gwfks4y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:30 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32ECCSbl42861214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Mar 2023 12:12:28 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 294082007A; Tue, 14 Mar 2023 12:12:28 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A328B2007D; Tue, 14 Mar 2023 12:12:27 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 14 Mar 2023 12:12:27 +0000 (GMT) From: Niklas Schnelle <schnelle@linux.ibm.com> To: Arnd Bergmann <arnd@arndb.de>, Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Bjorn Helgaas <bhelgaas@google.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Mauro Carvalho Chehab <mchehab@kernel.org>, Alan Stern <stern@rowland.harvard.edu>, "Rafael J. Wysocki" <rafael@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, Arnd Bergmann <arnd@kernel.org>, linux-gpio@vger.kernel.org Subject: [PATCH v3 09/38] gpio: add HAS_IOPORT dependencies Date: Tue, 14 Mar 2023 13:11:47 +0100 Message-Id: <20230314121216.413434-10-schnelle@linux.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230314121216.413434-1-schnelle@linux.ibm.com> References: <20230314121216.413434-1-schnelle@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: cEHcjEXqvTWRaMaQkkURss_TvXpbctNb X-Proofpoint-ORIG-GUID: ehEDXVHTGvLl4-SKScn4k_L8vFGkR48Q X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-14_04,2023-03-14_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 bulkscore=0 suspectscore=0 mlxscore=0 adultscore=0 mlxlogscore=900 impostorscore=0 phishscore=0 malwarescore=0 priorityscore=1501 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303140103 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760345398432409893?= X-GMAIL-MSGID: =?utf-8?q?1760345398432409893?= |
Series |
Kconfig: Introduce HAS_IOPORT config option
|
|
Commit Message
Niklas Schnelle
March 14, 2023, 12:11 p.m. UTC
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.
Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
drivers/gpio/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi Niklas, thanks for your patch! On Tue, Mar 14, 2023 at 1:12 PM Niklas Schnelle <schnelle@linux.ibm.com> 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. > > Co-developed-by: Arnd Bergmann <arnd@kernel.org> > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> > --- > drivers/gpio/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig > index 13be729710f2..5a874e67fc13 100644 > --- a/drivers/gpio/Kconfig > +++ b/drivers/gpio/Kconfig > @@ -688,7 +688,7 @@ config GPIO_VISCONTI > > config GPIO_VX855 > tristate "VIA VX855/VX875 GPIO" > - depends on (X86 || COMPILE_TEST) && PCI > + depends on (X86 || COMPILE_TEST) && PCI && HAS_IOPORT But is this the right fix? Further down in the Kconfig we have: menu "Port-mapped I/O GPIO drivers" depends on X86 # Unconditional I/O space access config GPIO_I8255 tristate select GPIO_REGMAP (...) Isn't the right fix to: 1) Move this Kconfig entry (VX855) down under the Port-mapped /O drivers, and then: 2) Make the whole submenu for port-mapped IO drivers depend on X86 && HAS_IOPORT Yours, Linus Walleij
On Wed, 2023-03-15 at 09:42 +0100, Linus Walleij wrote: > Hi Niklas, > > thanks for your patch! > > On Tue, Mar 14, 2023 at 1:12 PM Niklas Schnelle <schnelle@linux.ibm.com> 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. > > > > Co-developed-by: Arnd Bergmann <arnd@kernel.org> > > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> > > --- > > drivers/gpio/Kconfig | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig > > index 13be729710f2..5a874e67fc13 100644 > > --- a/drivers/gpio/Kconfig > > +++ b/drivers/gpio/Kconfig > > @@ -688,7 +688,7 @@ config GPIO_VISCONTI > > > > config GPIO_VX855 > > tristate "VIA VX855/VX875 GPIO" > > - depends on (X86 || COMPILE_TEST) && PCI > > + depends on (X86 || COMPILE_TEST) && PCI && HAS_IOPORT > > But is this the right fix? Further down in the Kconfig we have: > > menu "Port-mapped I/O GPIO drivers" > depends on X86 # Unconditional I/O space access > > config GPIO_I8255 > tristate > select GPIO_REGMAP > > (...) > > Isn't the right fix to: > > 1) Move this Kconfig entry (VX855) down under the Port-mapped /O drivers, > and then: > > 2) Make the whole submenu for port-mapped IO drivers depend on > X86 && HAS_IOPORT > > Yours, > Linus Walleij Makes sense I changed it to the above approach for v4. One thing this makes me wonder is if then one should change the X86 dependency to at least X86 || COMPILE_TEST or even remove it and rely on HAS_IOPORT. The comment there at least suggests that it is there only for the I/O space access. Thanks, Niklas
On Fri, Apr 28, 2023 at 4:45 PM Niklas Schnelle <schnelle@linux.ibm.com> wrote: > Makes sense I changed it to the above approach for v4. One thing this > makes me wonder is if then one should change the X86 dependency to at > least X86 || COMPILE_TEST or even remove it and rely on HAS_IOPORT. Hm it makes sense I think. I don't know if there may be other X86 deps in these drivers but we don't know until we tried. Yours, Linus Walleij
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 13be729710f2..5a874e67fc13 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -688,7 +688,7 @@ config GPIO_VISCONTI config GPIO_VX855 tristate "VIA VX855/VX875 GPIO" - depends on (X86 || COMPILE_TEST) && PCI + depends on (X86 || COMPILE_TEST) && PCI && HAS_IOPORT select MFD_CORE select MFD_VX855 help