linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] mfd: max8925: request resource region
Date: Mon, 7 May 2012 20:27:03 +0100	[thread overview]
Message-ID: <20120507192702.GA15893@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20120507185735.GO26481@n2100.arm.linux.org.uk>

On Mon, May 07, 2012 at 07:57:35PM +0100, Russell King - ARM Linux wrote:
> On Mon, May 07, 2012 at 11:37:29AM +0100, Mark Brown wrote:

> > So what you're saying is that it's nothing to do with zero and just
> > about plain conflicts - there's nothing magic about zero (which is what
> > Russell seemed to be suggesting)?

> You've totally missed my point if that's what you think I was saying.

I don't think I missed anything.  I understood you were saying you think
this is a terrible idea; I had thought you were saying that it was an
even worse idea for a value of zero for some reason (ie, that that broke
things further).

> The resource system as it stands handles two types of resources:

> 1. MMIO resources, of type IORESOURCE_MEM, registered against the
>    iomem_resource root resource
> 2. PCI/ISA IO resources, of type IORESOURCE_IO, registered against the
>    ioport_resource root resource

> The two root resources are hard coded into the BUSY-marking request/release
> APIs.

There's also IRQ, DMA and BUS resource types defined, though not handled
by kernel/resource.c.

> The problem comes if you start abusing IORESOURCE_IO - which has _always_
> meant "this is a PCI/ISA IO resource", and then you have someone adding
> calls to request_region() etc.  That will make stuff look at the
> ioport_resource root, and it won't work.

Yes, the request_region() usage is totally broken - I hadn't realised
that the original patch was doing that.  I had thought it was just
peering at the start of the address range and using that as the base
address for register I/O which is not wonderful but not actively broken
on the client side.

> In any case, if the resource tree is disconnected from the main two parent
> resources, then the resource probably shouldn't have either IORESOURCE_IO
> nor IORESOURCE_MEM set in it.  It's neither of those two resource types.

There is something of a shortage of other options as things stand...  I
guess using _BUS or something would at least eliminate the possibility
of confusion with the management code would be a quick, short term
improvement.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120507/bb26f1ae/attachment-0001.sig>

  reply	other threads:[~2012-05-07 19:27 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07  3:10 [PATCH 1/2] mfd: max8925: request resource region Haojian Zhuang
2012-05-07  3:10 ` [PATCH 2/2] ARM: mmp: add io head file Haojian Zhuang
2012-05-07  9:23   ` Arnd Bergmann
2012-05-07  7:58 ` [PATCH 1/2] mfd: max8925: request resource region Russell King - ARM Linux
2012-05-07  8:18   ` Haojian Zhuang
2012-05-07  8:59     ` Russell King - ARM Linux
2012-05-07  9:01   ` Mark Brown
2012-05-07  9:08     ` Russell King - ARM Linux
2012-05-07  9:47       ` Mark Brown
2012-05-07 10:14         ` Arnd Bergmann
2012-05-07 10:23           ` Haojian Zhuang
2012-05-07 11:21             ` Arnd Bergmann
2012-05-07 11:29               ` Mark Brown
     [not found]                 ` <201205071319.48768.arnd@arndb.de>
2012-05-07 14:02                   ` Samuel Ortiz
2012-05-07 14:15                   ` Mark Brown
2012-05-07 15:15                     ` Arnd Bergmann
2012-05-07 15:28                       ` Mark Brown
2012-05-07 10:37           ` Mark Brown
     [not found]             ` <201205071314.51886.arnd@arndb.de>
2012-05-07 14:06               ` Mark Brown
2012-05-07 15:09                 ` Arnd Bergmann
2012-05-07 15:17                   ` Mark Brown
2012-05-07 19:26                     ` Arnd Bergmann
2012-05-07 19:58                       ` Mark Brown
2012-05-08  8:17                       ` Mark Brown
2012-05-08 14:44                         ` Arnd Bergmann
2012-05-08 15:31                           ` Mark Brown
2012-05-09 12:43                             ` Arnd Bergmann
2012-05-09 14:13                               ` Mark Brown
2012-05-09 14:19                                 ` Arnd Bergmann
2012-05-09 14:42                                   ` Mark Brown
2012-05-09 15:03                                     ` Arnd Bergmann
2012-05-09 15:28                                       ` Mark Brown
2012-05-09 16:27                                         ` Arnd Bergmann
2012-05-09 16:18                                 ` Russell King - ARM Linux
2012-05-09 16:30                                   ` Mark Brown
2012-05-09 16:07                               ` Russell King - ARM Linux
2012-05-09 16:26                                 ` Arnd Bergmann
2012-05-09 16:27                                   ` Russell King - ARM Linux
2012-05-07 18:57             ` Russell King - ARM Linux
2012-05-07 19:27               ` Mark Brown [this message]
2012-05-07  8:12 ` Samuel Ortiz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120507192702.GA15893@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).