lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 19 Apr 2011 22:16:53 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Anton Vorontsov <cbouatmailru@...il.com>
Cc:	Grant Likely <grant.likely@...retlab.ca>,
	Jean Delvare <khali@...ux-fr.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Jamie Iles <jamie@...ieiles.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>, arnd@...db.de
Subject: Re: [PATCH] gpio: New driver for the Intel 82801 (ICH) GPIO pins

On Wed, 20 Apr 2011 00:30:31 +0400
Anton Vorontsov <cbouatmailru@...il.com> wrote:

> On Tue, Apr 19, 2011 at 06:08:29PM +0100, Alan Cox wrote:
> > > How about exporting some bus/device-type neutral probe function, like
> > > we do in drivers/ata/pata_platform.c ?
> > 
> > Not sure you want to be using resources as the basic currency, nor do you
> > want your generic code doing the request_region stuff. That was a nasty
> > mistake we made in the IDE code.
> > 
> > Maybe the platform code should do that bit, but the generic stuff not - in
> > the PCI case the caller will have done pci_request_* itself and chances
> > are several of the resources are the same pci device resource and
> > different offsets so doing request_resource on them will blow up.
> 
> Oh, right. How about this:
> 
> int __devinit bgpio_probe(struct device *dev,
>                           unsigned long sz,
>                           void __iomem *dat,
>                           void __iomem *set,
>                           void __iomem *clr,
>                           void __iomem *dirout,
>                           void __iomem *dirin,
>                           bool big_endian);
> 
> I.e. PCI driver can now map the whole area with a single ioremap(),
> and then call bgpio_probe(), which will provide accessors and
> common MMIO GPIO registration stuff.

Looks sane and providing its all using iomap/ioread/iowrite it covers all
cases nicely.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ