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, 7 Aug 2012 09:28:13 +0100
From:	Russell King <rmk@....linux.org.uk>
To:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc:	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Haojian Zhuang <haojian.zhuang@...il.com>,
	sameo@...ux.intel.com, rpurdie@...ys.net, bryan.wu@...onical.com,
	linux-kernel@...r.kernel.org, Bergmann Arnd <arnd@...db.de>
Subject: Re: [PATCH 0/5] mfd: replace IORESOURCE_IO by IORESOURCE_MEM

On Tue, Aug 07, 2012 at 06:22:22PM +1000, Benjamin Herrenschmidt wrote:
> On Mon, 2012-08-06 at 22:31 +0100, Russell King wrote:
> > 
> > So, if we made this a numeric index, then we have 32 resource types
> > to deal with, and no need to bugger around with re-using an existing
> > type for something else.
> > 
> > This makes sense, MEM, IRQ and DMA are all mutually exclusive, as
> > should be MEM and IO (because they can't coexist in two resource trees
> > at the same time.)  BUS only gets used in a hand-full of places and
> > not with any other flags.
> > 
> > So, looks like we can have 27 new resource types fairly easily.
> 
> Besides we can easily use a single IORESOURCE_OTHER for most things
> really, if we prefer, make it IORESOURCE_IO | IORESOURCE_MEM and have
> platform device avoid that combo...

That will work just the same way that I'm suggesting.  We can keep
the existing bit-based numbers, and:

#define IORESOURCE_OTHER	0x00000300

and the platform code will avoid using the standard resource trees,
because it does things correctly here:

                        if (resource_type(r) == IORESOURCE_MEM)
                                p = &iomem_resource;
                        else if (resource_type(r) == IORESOURCE_IO)
                                p = &ioport_resource;

Same for the resource getting functions.  Hardly surprising this, because
I wrote this code...

So, no need to touch any existing users or change their behaviour in
any way.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
--
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