[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <2f07c421-7f9c-4e53-8bd5-46be07bb5c89@app.fastmail.com>
Date: Thu, 16 Mar 2023 16:21:58 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Damien Le Moal" <damien.lemoal@...nsource.wdc.com>,
"Geert Uytterhoeven" <geert@...ux-m68k.org>
Cc: "Niklas Schnelle" <schnelle@...ux.ibm.com>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
"Bjorn Helgaas" <bhelgaas@...gle.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
"Mauro Carvalho Chehab" <mchehab@...nel.org>,
"Alan Stern" <stern@...land.harvard.edu>,
"Rafael J . Wysocki" <rafael@...nel.org>,
"Paul Walmsley" <paul.walmsley@...ive.com>,
"Palmer Dabbelt" <palmer@...belt.com>,
"Albert Ou" <aou@...s.berkeley.edu>, linux-kernel@...r.kernel.org,
Linux-Arch <linux-arch@...r.kernel.org>,
linux-pci@...r.kernel.org, "Arnd Bergmann" <arnd@...nel.org>,
linux-ide@...r.kernel.org
Subject: Re: [PATCH v3 02/38] ata: add HAS_IOPORT dependencies
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
Powered by blists - more mailing lists