From: Bjorn Helgaas <bhelgaas@google.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
Ingo Molnar <mingo@elte.hu>,
Suresh Siddha <suresh.b.siddha@intel.com>
Subject: [PATCH 1/2] resources: set type of new resource returned by __request_region()
Date: Fri, 18 May 2012 17:18:32 -0600 [thread overview]
Message-ID: <20120518231832.31187.10630.stgit@bhelgaas.mtv.corp.google.com> (raw)
In-Reply-To: <20120518231238.31187.44571.stgit@bhelgaas.mtv.corp.google.com>
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.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
kernel/resource.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/resource.c b/kernel/resource.c
index 7e8ea66..04bb527 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -847,7 +847,8 @@ struct resource * __request_region(struct resource *parent,
res->name = name;
res->start = start;
res->end = start + n - 1;
- res->flags = IORESOURCE_BUSY;
+ res->flags = parent->flags;
+ res->flags |= IORESOURCE_BUSY;
res->flags |= flags;
write_lock(&resource_lock);
next prev parent reply other threads:[~2012-05-18 23:18 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
2012-05-18 23:18 ` Bjorn Helgaas [this message]
2012-05-21 13:04 ` [PATCH 1/2] resources: set type of new resource returned by __request_region() Joerg Roedel
2012-05-21 13:52 ` Bjorn Helgaas
2012-05-23 10:40 ` Joerg Roedel
2012-05-18 23:18 ` [PATCH 2/2] iommu: Request IOMMU CSR space Bjorn Helgaas
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=20120518231832.31187.10630.stgit@bhelgaas.mtv.corp.google.com \
--to=bhelgaas@google.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
/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
all inboxes | Powered by JetHome®