Message ID | 20230314121216.413434-3-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 v21csp1721082wrd; Tue, 14 Mar 2023 05:16:37 -0700 (PDT) X-Google-Smtp-Source: AK7set810J5JPy7blR/oKw+qGt79YFXdYnr2bodVJrGXLp65BDaBF32p6WzcZFxKCi6k8BH0Zvsf X-Received: by 2002:a17:902:c94f:b0:19e:73df:b0e9 with SMTP id i15-20020a170902c94f00b0019e73dfb0e9mr47459661pla.21.1678796197126; Tue, 14 Mar 2023 05:16:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678796197; cv=none; d=google.com; s=arc-20160816; b=xZAIJ91du58pcAgT+On1dmx+6M6hU5RSdwBowRBMBiDISwV/HWaEK1RahLhZWiUrow yi6xcA3AjvMr2nvgFfcO57N4Bvq2QGPJI9LWxITQ37KOMwgV2Ug60072T/iz/Ck51kBI oZYNJKLKIcGSD3qwBUTXihDS4ebBipCTYkN/o9Dkcxd+HRgsv2FPl2EdNBivdjL2LVEM zKar//QHXJblALRFNoRuMcXynpIuUACgKcngxhL/yQjbQi4iXcUEiJ43CjEvqu5RxIVI S5GZIuF6qLB6AWf+gy/+W8Zovz3q8R8AMpoCGn25Wlp8cK8j1BhIiVQSj+6ND6B6uAwD 6jNg== 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=tB/P7ATyxenNTmxe1GmAjnypUakLdBfrmfOs1am8WME=; b=ciyNDvZRcSY/DEE9k7TviifDm5pPkAR/H1iJRx1q26D7MRVTOCrs5LzJnWgc8DX/fb RVPVrhtsoE6rgUlq4jMuhuXT42MCIesA7Kd1+6jgCy9OWlfUIxMHhwqzwg4d4g+c/Y0q igfrm3uPNwrTOB4EvfjTfGv2TQ5xladN+zyzE11zYQ0t9JQ/QTU56Revp6k5mQQ0oQsZ fGgWWC/6cWoGYR8P4mHE2u8fSsCPtR69ed4ZCmu+l3Iw4P/BmDwNNss8s6kljA46leBk UUEf7YH7Mou0VmkKSj3zurTmc6fdI26K7Ok0dqLR6Ix7wUFKWZ1wnYhrlqIm4A1LW5sF Rcxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=cyeDreqE; 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 li8-20020a170903294800b001a0448731c5si2330561plb.506.2023.03.14.05.16.22; Tue, 14 Mar 2023 05:16:37 -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=cyeDreqE; 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 S231803AbjCNMNb (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Tue, 14 Mar 2023 08:13:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229925AbjCNMNR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Mar 2023 08:13:17 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DD3F17175; Tue, 14 Mar 2023 05:12:45 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32EBwC2S016799; Tue, 14 Mar 2023 12:12:28 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=tB/P7ATyxenNTmxe1GmAjnypUakLdBfrmfOs1am8WME=; b=cyeDreqErwzDRhuxEGSS2TkWem15jYqnaA9dToCz+uucm1Xy7s+ZlnPgAkVXngjCqzoT VTzHE6APHnYNa6s1nqPmdnzb9P7GrcxwGEOhsoqWm+r65fTieLJY26YcixoctjbKFxt/ KpaCQLkrx8Ra2eKNhRLBDel86tbc6/xwccUQIONzzM1tlFaaZ5jCMQGHe22YaXC5kBXb vWaY14g4mOmDn8C8xshUIxqgZh8cXB7nQ5mh26BkjbGdcWxmWJHoYKab0LlcWEaafelS n++9HmTsBK2WedHR38d2erenIcm4D+mFzlzUUO7UUUy5nCbpFuh3F9A+u0WeEM2eSvZX 4Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3paph23u52-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:27 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32EAbPHm005258; Tue, 14 Mar 2023 12:12:26 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 3paph23u42-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:26 +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 32E8dNFS028582; Tue, 14 Mar 2023 12:12:23 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma06fra.de.ibm.com (PPS) with ESMTPS id 3p8gwfks4w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:23 +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 32ECCLAi46858832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Mar 2023 12:12:21 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 68EDD2007B; Tue, 14 Mar 2023 12:12:21 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E60A72007C; Tue, 14 Mar 2023 12:12:20 +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:20 +0000 (GMT) From: Niklas Schnelle <schnelle@linux.ibm.com> To: Arnd Bergmann <arnd@arndb.de>, Damien Le Moal <damien.lemoal@opensource.wdc.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>, linux-ide@vger.kernel.org Subject: [PATCH v3 02/38] ata: add HAS_IOPORT dependencies Date: Tue, 14 Mar 2023 13:11:40 +0100 Message-Id: <20230314121216.413434-3-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: JYTQ8Gzm14XXA76Vp2bOyDsDVcS_RRoj X-Proofpoint-GUID: KUUDBVC_s6UJnWGB-1_JWP1rwoc_YTok 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_06,2023-03-14_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 malwarescore=0 suspectscore=0 adultscore=0 phishscore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 spamscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=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,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?1760345401042933688?= X-GMAIL-MSGID: =?utf-8?q?1760345401042933688?= |
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/ata/Kconfig | 1 +
1 file changed, 1 insertion(+)
Comments
On 3/14/23 21:11, 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. I do not see HAS_IOPORT=y defined anywhere in 6.3-rc. Is that in linux-next ? There is a HAS_IOPORT_MAP, but I guess it is different. > > Co-developed-by: Arnd Bergmann <arnd@kernel.org> > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> > --- > drivers/ata/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig > index b56fba76b43f..e5e67bdc2dff 100644 > --- a/drivers/ata/Kconfig > +++ b/drivers/ata/Kconfig > @@ -342,6 +342,7 @@ endif # HAS_DMA > > config ATA_SFF > bool "ATA SFF support (for legacy IDE and PATA)" > + depends on HAS_IOPORT > default y > help > This option adds support for ATA controllers with SFF
On Wed, Mar 15, 2023, at 02:23, Damien Le Moal wrote: > On 3/14/23 21:11, 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. > > I do not see HAS_IOPORT=y defined anywhere in 6.3-rc. Is that in linux-next ? > There is a HAS_IOPORT_MAP, but I guess it is different. It's defined in patch 1 of the series, so the later patches can't be applied into subsystem trees without that. We can either merge patch 1 as a preparation first, or keep it all together as a series. Arnd
On 3/15/23 15:46, Arnd Bergmann wrote: > On Wed, Mar 15, 2023, at 02:23, Damien Le Moal wrote: >> On 3/14/23 21:11, 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. >> >> I do not see HAS_IOPORT=y defined anywhere in 6.3-rc. Is that in linux-next ? >> There is a HAS_IOPORT_MAP, but I guess it is different. > > It's defined in patch 1 of the series, so the later patches > can't be applied into subsystem trees without that. > > We can either merge patch 1 as a preparation first, or keep it > all together as a series. Got it. Either is fine with me. To allow option 2, I will send my ack. Thanks ! > > Arnd
On 3/14/23 21:11, 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. > > Co-developed-by: Arnd Bergmann <arnd@kernel.org> > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> > --- > drivers/ata/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig > index b56fba76b43f..e5e67bdc2dff 100644 > --- a/drivers/ata/Kconfig > +++ b/drivers/ata/Kconfig > @@ -342,6 +342,7 @@ endif # HAS_DMA > > config ATA_SFF > bool "ATA SFF support (for legacy IDE and PATA)" > + depends on HAS_IOPORT > default y > help > This option adds support for ATA controllers with SFF Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Hi Niklas, 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> Thanks for your patch! > --- a/drivers/ata/Kconfig > +++ b/drivers/ata/Kconfig > @@ -342,6 +342,7 @@ endif # HAS_DMA > > config ATA_SFF > bool "ATA SFF support (for legacy IDE and PATA)" > + depends on HAS_IOPORT > default y > help > This option adds support for ATA controllers with SFF ATA_SFF is a dependency for lots of (S)ATA drivers. (at least) The following don't use I/O port access: CONFIG_SATA_RCAR (arm/arm64) CONFIG_PATA_FALCON (m68k/atari and m68k/q40) CONFIG_PATA_GAYLE (m68k/amiga) CONFIG_PATA_BUDDHA (m68k/amiga) (at least) The following can use either MMIO or I/O port accesses: CONFIG_PATA_PLATFORM (m68k/mac) Gr{oetje,eeting}s, Geert
On 3/15/23 17:39, Geert Uytterhoeven wrote: > Hi Niklas, > > 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> > > Thanks for your patch! > >> --- a/drivers/ata/Kconfig >> +++ b/drivers/ata/Kconfig >> @@ -342,6 +342,7 @@ endif # HAS_DMA >> >> config ATA_SFF >> bool "ATA SFF support (for legacy IDE and PATA)" >> + depends on HAS_IOPORT >> default y >> help >> This option adds support for ATA controllers with SFF > > ATA_SFF is a dependency for lots of (S)ATA drivers. > (at least) The following don't use I/O port access: > > CONFIG_SATA_RCAR (arm/arm64) > CONFIG_PATA_FALCON (m68k/atari and m68k/q40) > CONFIG_PATA_GAYLE (m68k/amiga) > CONFIG_PATA_BUDDHA (m68k/amiga) > > (at least) The following can use either MMIO or I/O port accesses: > > CONFIG_PATA_PLATFORM (m68k/mac) But for these arch/platforms, would there be any reason to not have HAS_IOPORT ? It is supported right now, so we should have HAS_IOPORT for them. > > Gr{oetje,eeting}s, > > Geert >
Hi Damien, On Wed, Mar 15, 2023 at 10:12 AM Damien Le Moal <damien.lemoal@opensource.wdc.com> wrote: > On 3/15/23 17:39, Geert Uytterhoeven wrote: > > 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> > > > > Thanks for your patch! > > > >> --- a/drivers/ata/Kconfig > >> +++ b/drivers/ata/Kconfig > >> @@ -342,6 +342,7 @@ endif # HAS_DMA > >> > >> config ATA_SFF > >> bool "ATA SFF support (for legacy IDE and PATA)" > >> + depends on HAS_IOPORT > >> default y > >> help > >> This option adds support for ATA controllers with SFF > > > > ATA_SFF is a dependency for lots of (S)ATA drivers. > > (at least) The following don't use I/O port access: > > > > CONFIG_SATA_RCAR (arm/arm64) > > CONFIG_PATA_FALCON (m68k/atari and m68k/q40) > > CONFIG_PATA_GAYLE (m68k/amiga) > > CONFIG_PATA_BUDDHA (m68k/amiga) > > > > (at least) The following can use either MMIO or I/O port accesses: > > > > CONFIG_PATA_PLATFORM (m68k/mac) > > But for these arch/platforms, would there be any reason to not have HAS_IOPORT ? > It is supported right now, so we should have HAS_IOPORT for them. That's the point: on Amiga and Atari, HAS_IOPORT is optional, and not related to IDE support. On Mac, it is never present. Gr{oetje,eeting}s, Geert
On 2023/03/15 20:36, Geert Uytterhoeven wrote: > Hi Damien, > > On Wed, Mar 15, 2023 at 10:12 AM Damien Le Moal > <damien.lemoal@opensource.wdc.com> wrote: >> On 3/15/23 17:39, Geert Uytterhoeven wrote: >>> 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> >>> >>> Thanks for your patch! >>> >>>> --- a/drivers/ata/Kconfig >>>> +++ b/drivers/ata/Kconfig >>>> @@ -342,6 +342,7 @@ endif # HAS_DMA >>>> >>>> config ATA_SFF >>>> bool "ATA SFF support (for legacy IDE and PATA)" >>>> + depends on HAS_IOPORT >>>> default y >>>> help >>>> This option adds support for ATA controllers with SFF >>> >>> ATA_SFF is a dependency for lots of (S)ATA drivers. >>> (at least) The following don't use I/O port access: >>> >>> CONFIG_SATA_RCAR (arm/arm64) >>> CONFIG_PATA_FALCON (m68k/atari and m68k/q40) >>> CONFIG_PATA_GAYLE (m68k/amiga) >>> CONFIG_PATA_BUDDHA (m68k/amiga) >>> >>> (at least) The following can use either MMIO or I/O port accesses: >>> >>> CONFIG_PATA_PLATFORM (m68k/mac) >> >> But for these arch/platforms, would there be any reason to not have HAS_IOPORT ? >> It is supported right now, so we should have HAS_IOPORT for them. > > That's the point: on Amiga and Atari, HAS_IOPORT is optional, and > not related to IDE support. On Mac, it is never present. Ah. OK. I see now. So indeed, applying the dependency on the entire ATA_SFF group of drivers is very coarse. Niklas, Can you change this to apply the dependency per driver ?
On Thu, Mar 16, 2023, at 00:57, Damien Le Moal wrote: > On 2023/03/15 20:36, Geert Uytterhoeven wrote: > Ah. OK. I see now. So indeed, applying the dependency on the entire ATA_SFF > group of drivers is very coarse. > Can you change this to apply the dependency per driver ? I think that will fail to build because of this function on architectures that drop their non-functional inb/outb helpers: int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev) { unsigned long bmdma = pci_resource_start(pdev, 4); u8 simplex; if (bmdma == 0) return -ENOENT; simplex = inb(bmdma + 0x02); outb(simplex & 0x60, bmdma + 0x02); simplex = inb(bmdma + 0x02); if (simplex & 0x80) return -EOPNOTSUPP; return 0; } This is only called from five pata drivers (ali, amd, cmd64x, netcell, serverworks), so an easy workaround would be to make sure those depend on HAS_IOPORT and enclose the function definition in an #ifdef. Arnd
On Thu, 2023-03-16 at 16:21 +0100, Arnd Bergmann wrote: > On Thu, Mar 16, 2023, at 00:57, Damien Le Moal wrote: > > On 2023/03/15 20:36, Geert Uytterhoeven wrote: > > > Ah. OK. I see now. So indeed, applying the dependency on the entire ATA_SFF > > group of drivers is very coarse. > > > > Can you change this to apply the dependency per driver ? > > I think that will fail to build because of this function > on architectures that drop their non-functional > inb/outb helpers: > > int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev) > { > unsigned long bmdma = pci_resource_start(pdev, 4); > u8 simplex; > > if (bmdma == 0) > return -ENOENT; > > simplex = inb(bmdma + 0x02); > outb(simplex & 0x60, bmdma + 0x02); > simplex = inb(bmdma + 0x02); > if (simplex & 0x80) > return -EOPNOTSUPP; > return 0; > } > > This is only called from five pata drivers (ali, amd, > cmd64x, netcell, serverworks), so an easy workaround > would be to make sure those depend on HAS_IOPORT > and enclose the function definition in an #ifdef. > > Arnd There were a few additional inb()/outb() uses so a few more drivers had to have the dependency added but for v4 it will no longer be on the ATA_SFF option and I used your suggestion above for this function. There was another call to it in ata_generic_init_one() that is only done for PCI_VENDOR_ID_AL so I added an #ifdef CONFIG_PATA_ALI around that. Thanks, Niklas
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index b56fba76b43f..e5e67bdc2dff 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -342,6 +342,7 @@ endif # HAS_DMA config ATA_SFF bool "ATA SFF support (for legacy IDE and PATA)" + depends on HAS_IOPORT default y help This option adds support for ATA controllers with SFF