Message ID | 20230314121216.413434-22-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 v21csp1721410wrd; Tue, 14 Mar 2023 05:17:17 -0700 (PDT) X-Google-Smtp-Source: AK7set8wG1V2p8ut1e3XZQ8s55zuU/19AwkftIhIwRYLcfoWpAjkVRFz28mrF2NQMH0PBLKJCtwv X-Received: by 2002:a17:903:1208:b0:19e:e001:6a75 with SMTP id l8-20020a170903120800b0019ee0016a75mr28770618plh.6.1678796236902; Tue, 14 Mar 2023 05:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678796236; cv=none; d=google.com; s=arc-20160816; b=rq1JL1RG0e8pXBksVnPlaPyV8BlS+0/HiO2h7jAPPjfGlp1Bcto2kNQFmqxAW6BQq3 rUC+DeSHu7L7N6H9mWrV8DldsVwAdDlMj/8jTVXE0ax3FYJcDrjsL4byfu5LAQzxhUYa IOaQ9029kpJTmiHdBazc/A8igqRvR4AcP5lbZTD45nCg6T3CbFTuJbjb8hj2uGb5c4r7 vgTieYn2sE/gaxcSZqx38B+RJ4DCf63nHPcHUdOxWhU+q8299fhFItQO+Z2yR7sTV0KC paelA5lnDDrBly0+2C8CgQy1z6/tNTJAk9JQbKRlGQNnEv6QUDbvOnhq1Df56KYVooC3 SZkw== 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=1SRNPJFzhIow93CAQqVptkS+4M3eQneQeH47X7pGUzw=; b=Er3hSxqhvRx2lQfLxdK3ggIuNS87NwZsO4SxvuYx58blV9uNwKbqTnngxTQgISAGn7 u5ifmgxFp4zc7mxHwW3s/CKRaXHLdH1mljDwjSq/svg4KOm9CglkpMQ6y3s6e2izcrxU VMEmH5oXlMIlKI33plUz9b/aSq4Ucuubt3tICqa2NHyWZT/QtOCs64Oz8c5gKZKpvfqD k3IuMVUDhTa0YdjJyP0jjkxXhx9b9EUuRhF3sqN3WyOrziKUPzbpGDk5Hua1kBuvdTn2 j7Zzlw+gV9QYgRnkrCW1f1wmkcaPfmj8NTv6eGjNtBgTuokO7cOfvthmzryGqEixJlx0 a0/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=Alwdz69Z; 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 i1-20020a17090a4b8100b0023b3edc2080si2355333pjh.98.2023.03.14.05.17.00; Tue, 14 Mar 2023 05:17:16 -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=Alwdz69Z; 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 S232005AbjCNMP3 (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Tue, 14 Mar 2023 08:15:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231839AbjCNMN6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Mar 2023 08:13:58 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2964A101C; Tue, 14 Mar 2023 05:13:10 -0700 (PDT) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32EC01Oi030125; Tue, 14 Mar 2023 12:12:46 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=1SRNPJFzhIow93CAQqVptkS+4M3eQneQeH47X7pGUzw=; b=Alwdz69Zk4IcTj67OaM8FMtje+9YMoQkosu7UKQ4z6okxfFtx37FCY4dhNFMW+LCeYN6 SAFrs34SVGIU/bm+dhuNFbnwYLCRZ4S4vN+wzfWUJaMq9dV9pC8yb8fiXkLWn6qhMHdB Ur099nvNJcuXK2ETESmxm//JLw6sjzSfjBv3ZXUKShoq6GqLFQFRWZMMUfoORPDUfrIW ZEf3Obhnqf1TlBFbbaoXGJy0w/mtj2YLEc4n35/XIjujQ0QlK4/O+msybuB4gNZBUwiA rOz5Gpkek5MH+EEQcgK0SaoBcSzCNnv9i89tswyDM+Y/7gv94bIjiY+2CxSa0p+b9vJu 0A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pampuq6hb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:45 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32EB7c20020724; Tue, 14 Mar 2023 12:12:44 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pampuq6gk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:44 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32E7n3O0001030; Tue, 14 Mar 2023 12:12:42 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma03ams.nl.ibm.com (PPS) with ESMTPS id 3p8h96mrw2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:42 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32ECCe4n13369802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Mar 2023 12:12:40 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 67C4A2007B; Tue, 14 Mar 2023 12:12:40 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 01E9D2007A; Tue, 14 Mar 2023 12:12:40 +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:39 +0000 (GMT) From: Niklas Schnelle <schnelle@linux.ibm.com> To: Arnd Bergmann <arnd@arndb.de>, Sudip Mukherjee <sudipm.mukherjee@gmail.com> 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> Subject: [PATCH v3 21/38] parport: PC style parport depends on HAS_IOPORT Date: Tue, 14 Mar 2023 13:11:59 +0100 Message-Id: <20230314121216.413434-22-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-ORIG-GUID: cZDwY7A80dlURZVLhzvrXWsYQQQdAIaH X-Proofpoint-GUID: 086U9OiT888_7KzYR-_C3VXKZZhRL7KR 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 malwarescore=0 impostorscore=0 suspectscore=0 mlxscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 mlxlogscore=633 spamscore=0 adultscore=0 phishscore=0 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?1760345443094125718?= X-GMAIL-MSGID: =?utf-8?q?1760345443094125718?= |
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. As PC style parport uses these functions we need to
handle this dependency.
Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
drivers/parport/Kconfig | 4 ++--
include/linux/parport.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
Comments
On Tue, Mar 14, 2023, at 13:11, Niklas Schnelle wrote: > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends > not being declared. As PC style parport uses these functions we need to > handle this dependency. > > Co-developed-by: Arnd Bergmann <arnd@kernel.org> > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> > > menuconfig PARPORT > tristate "Parallel port support" > - depends on HAS_IOMEM I would leave this dependency, or maybe make it 'HAS_IOMEM || HAS_IOPORT'. at least the parport_atari driver uses MMIO instead of PIO. > help > If you want to use devices connected to your machine's parallel port > (the connector at the computer with 25 holes), e.g. printer, ZIP > @@ -42,7 +41,8 @@ if PARPORT > > config PARPORT_PC > tristate "PC-style hardware" > - depends on ARCH_MIGHT_HAVE_PC_PARPORT || (PCI && !S390) > + depends on ARCH_MIGHT_HAVE_PC_PARPORT > + depends on HAS_IOPORT > help > You should say Y here if you have a PC-style parallel port. All > IBM PC compatible computers and some Alphas have PC-style This would revert 66bcd06099bb ("parport_pc: Also enable driver for PCI systems"), so I think this is wrong. You can drop the !S390 by adding HAS_IOPORT as a dependency, but the other line should still be depends on ARCH_MIGHT_HAVE_PC_PARPORT || PCI Arnd
On Tue, 2023-03-14 at 15:12 +0100, Arnd Bergmann wrote: > > On Tue, Mar 14, 2023, at 13:11, Niklas Schnelle wrote: > > > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends > > > > not being declared. As PC style parport uses these functions we need to > > > > handle this dependency. > > > > > > > > Co-developed-by: Arnd Bergmann <arnd@kernel.org> > > > > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> > > > > > > > > > > menuconfig PARPORT > > > > tristate "Parallel port support" > > > > - depends on HAS_IOMEM > > > > I would leave this dependency, or maybe make it 'HAS_IOMEM || HAS_IOPORT'. > > at least the parport_atari driver uses MMIO instead of PIO. > > > > > > help > > > > If you want to use devices connected to your machine's parallel port > > > > (the connector at the computer with 25 holes), e.g. printer, ZIP > > > > @@ -42,7 +41,8 @@ if PARPORT > > > > > > > > config PARPORT_PC > > > > tristate "PC-style hardware" > > > > - depends on ARCH_MIGHT_HAVE_PC_PARPORT || (PCI && !S390) > > > > + depends on ARCH_MIGHT_HAVE_PC_PARPORT > > > > + depends on HAS_IOPORT > > > > help > > > > You should say Y here if you have a PC-style parallel port. All > > > > IBM PC compatible computers and some Alphas have PC-style > > > > This would revert 66bcd06099bb ("parport_pc: Also enable driver for > > PCI systems"), so I think this is wrong. You can drop the !S390 > > by adding HAS_IOPORT as a dependency, but the other line should still > > be > > > > depends on ARCH_MIGHT_HAVE_PC_PARPORT || PCI > > > > > > Arnd Ok changed for v4. Just saw that commit even nicely references our lack of I/O ports :-)
The wording of this subject line is a bit ambiguous and doesn't quite say what the patch does. It reads like a statement of fact, i.e., "this is the current state," but I think the patch actually *adds* a HAS_IOPORT dependency like many of the other patches. I guess it also *removes* a HAS_IOMEM dependency; I didn't investigate to figure out why that is or whether it's even related (I guess it is, but I don't know how). On Tue, Mar 14, 2023 at 01:11:59PM +0100, Niklas Schnelle wrote: > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends > not being declared. As PC style parport uses these functions we need to > handle this dependency. > > Co-developed-by: Arnd Bergmann <arnd@kernel.org> > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> > --- > drivers/parport/Kconfig | 4 ++-- > include/linux/parport.h | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig > index 5561362224e2..5c471c73629f 100644 > --- a/drivers/parport/Kconfig > +++ b/drivers/parport/Kconfig > @@ -14,7 +14,6 @@ config ARCH_MIGHT_HAVE_PC_PARPORT > > menuconfig PARPORT > tristate "Parallel port support" > - depends on HAS_IOMEM > help > If you want to use devices connected to your machine's parallel port > (the connector at the computer with 25 holes), e.g. printer, ZIP > @@ -42,7 +41,8 @@ if PARPORT > > config PARPORT_PC > tristate "PC-style hardware" > - depends on ARCH_MIGHT_HAVE_PC_PARPORT || (PCI && !S390) > + depends on ARCH_MIGHT_HAVE_PC_PARPORT > + depends on HAS_IOPORT > help > You should say Y here if you have a PC-style parallel port. All > IBM PC compatible computers and some Alphas have PC-style > diff --git a/include/linux/parport.h b/include/linux/parport.h > index a0bc9e0267b7..fff39bc30629 100644 > --- a/include/linux/parport.h > +++ b/include/linux/parport.h > @@ -514,7 +514,7 @@ extern int parport_device_proc_register(struct pardevice *device); > extern int parport_device_proc_unregister(struct pardevice *device); > > /* If PC hardware is the only type supported, we can optimise a bit. */ > -#if !defined(CONFIG_PARPORT_NOT_PC) > +#if !defined(CONFIG_PARPORT_NOT_PC) && defined(CONFIG_PARPORT_PC) > > #include <linux/parport_pc.h> > #define parport_write_data(p,x) parport_pc_write_data(p,x) > -- > 2.37.2 >
diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig index 5561362224e2..5c471c73629f 100644 --- a/drivers/parport/Kconfig +++ b/drivers/parport/Kconfig @@ -14,7 +14,6 @@ config ARCH_MIGHT_HAVE_PC_PARPORT menuconfig PARPORT tristate "Parallel port support" - depends on HAS_IOMEM help If you want to use devices connected to your machine's parallel port (the connector at the computer with 25 holes), e.g. printer, ZIP @@ -42,7 +41,8 @@ if PARPORT config PARPORT_PC tristate "PC-style hardware" - depends on ARCH_MIGHT_HAVE_PC_PARPORT || (PCI && !S390) + depends on ARCH_MIGHT_HAVE_PC_PARPORT + depends on HAS_IOPORT help You should say Y here if you have a PC-style parallel port. All IBM PC compatible computers and some Alphas have PC-style diff --git a/include/linux/parport.h b/include/linux/parport.h index a0bc9e0267b7..fff39bc30629 100644 --- a/include/linux/parport.h +++ b/include/linux/parport.h @@ -514,7 +514,7 @@ extern int parport_device_proc_register(struct pardevice *device); extern int parport_device_proc_unregister(struct pardevice *device); /* If PC hardware is the only type supported, we can optimise a bit. */ -#if !defined(CONFIG_PARPORT_NOT_PC) +#if !defined(CONFIG_PARPORT_NOT_PC) && defined(CONFIG_PARPORT_PC) #include <linux/parport_pc.h> #define parport_write_data(p,x) parport_pc_write_data(p,x)