iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>,
	David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Suresh Siddha
	<suresh.b.siddha-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 1/2] resources: set type of new resource returned by __request_region()
Date: Wed, 23 May 2012 12:40:09 +0200	[thread overview]
Message-ID: <20120523104009.GD12795@8bytes.org> (raw)
In-Reply-To: <CAErSpo582Ok9arr+3krKTQdue4i3wQOixVkBbheDX6a3v8xMHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Mon, May 21, 2012 at 07:52:24AM -0600, Bjorn Helgaas wrote:
> On Mon, May 21, 2012 at 7:04 AM, Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> wrote:
> > On Fri, May 18, 2012 at 05:18:32PM -0600, Bjorn Helgaas wrote:
> >> Previously we returned a new struct resource with only IORESOURCE_BUSY
> >> set (and possibly IORESOURCE_MUXED or IORESOURCE_EXCLUSIVE), but no
> >> MEM/IO/etc. bits set.  The new resource should inherit the type of
> >> its parent.
> >
> > Should it? What about IORESOURCE_WINDOW for example? Any particular
> > reason for this change to the interface of the __request_region()
> > function?
> 
> Yes, I should have explained the connection :)  The next patch prints
> the resource returned from request_mem_region().  Without this
> __request_region() patch, that resource has no type, so %pR can't
> print it correctly.
> 
> Good question about IORESOURCE_WINDOW.  Maybe it should inherit only
> the IORESOURCE_TYPE_BITS part (IO/MEM/IRQ/DMA/BUS).  But it seemed
> like it should also inherit PREFETCH, READONLY, CACHEABLE, etc.  Maybe
> we should inherit everything but clear IORESOURCE_WINDOW?  I'm open to
> suggestions here.

I am still not sure whether the inheritance is a good idea. How about
changing the define of request_mem_region to:

#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name), IORESOURCE_MEM)

?

	Joerg

  parent reply	other threads:[~2012-05-23 10:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18 23:18 [PATCH 0/2] iommu: request CSR space Bjorn Helgaas
     [not found] ` <20120518231238.31187.44571.stgit-1RhO1Y9PlrnlUACayq9hv/yj43VRqXoZVpNB7YpNyf8@public.gmane.org>
2012-05-18 23:18   ` [PATCH 1/2] resources: set type of new resource returned by __request_region() Bjorn Helgaas
     [not found]     ` <20120518231832.31187.10630.stgit-1RhO1Y9PlrnlUACayq9hv/yj43VRqXoZVpNB7YpNyf8@public.gmane.org>
2012-05-21 13:04       ` Joerg Roedel
     [not found]         ` <20120521130451.GK2313-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2012-05-21 13:52           ` Bjorn Helgaas
     [not found]             ` <CAErSpo582Ok9arr+3krKTQdue4i3wQOixVkBbheDX6a3v8xMHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-23 10:40               ` Joerg Roedel [this message]
2012-05-18 23:18   ` [PATCH 2/2] iommu: Request IOMMU CSR space Bjorn Helgaas
     [not found]     ` <20120518231837.31187.29401.stgit-1RhO1Y9PlrnlUACayq9hv/yj43VRqXoZVpNB7YpNyf8@public.gmane.org>
2012-05-21 13:15       ` Joerg Roedel

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=20120523104009.GD12795@8bytes.org \
    --to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
    --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mingo-X9Un+BFzKDI@public.gmane.org \
    --cc=suresh.b.siddha-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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).