From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Jarkko Sakkinen
<jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: jethro-LmnypSVwBK6EVqv0pETR8A@public.gmane.org,
tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: resource sanity fails on ioremap
Date: Thu, 4 Feb 2016 22:08:50 -0700 [thread overview]
Message-ID: <20160205050850.GA23820@obsidianresearch.com> (raw)
In-Reply-To: <20160205040500.GA7708-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
On Thu, Feb 04, 2016 at 08:05:00PM -0800, Jarkko Sakkinen wrote:
> 4.4 does not use devm_ioremap_resource(). That is why this is
> confusing. If that was the kernel from my master branch, then this
> would make sense.
It makes sense, the MSFT resource is created by the kernel when it
parses the ACPI tables.
devm_ioremap_resource creates a child resource of the above owned by
the driver.
Eg, a PCI example:
$ cat /proc/iomem
d0000000-d0003fff : 0000:06:00.0
d0000000-d0003fff : r8169
0000:06:00.0 is created by parsing the BAR, it always exists,
equivalent to the MSFT resource
r8169 is created when the driver attaches to it, and serves to lock
the memory range from other drivers.
tpm_crb works the same.
ioremap complains if a mapping crosses any resource boundary, not
just driver created resources.
Jason
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
next prev parent reply other threads:[~2016-02-05 5:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 23:37 resource sanity fails on ioremap Jarkko Sakkinen
[not found] ` <20160203233701.GA10585-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-02-04 23:49 ` Jason Gunthorpe
[not found] ` <20160204234947.GA20269-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-02-05 4:05 ` Jarkko Sakkinen
[not found] ` <20160205040500.GA7708-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-02-05 5:08 ` Jason Gunthorpe [this message]
[not found] ` <20160205050850.GA23820-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-02-05 16:47 ` Jarkko Sakkinen
[not found] ` <20160205164704.GA8112-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-02-05 17:42 ` Jason Gunthorpe
[not found] ` <20160205174258.GA29116-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-02-05 19:28 ` Jarkko Sakkinen
[not found] ` <20160205192857.GA23523-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-02-10 12:22 ` Jarkko Sakkinen
[not found] ` <20160210122227.GA31734-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-02-10 12:42 ` Jarkko Sakkinen
[not found] ` <20160210124216.GA18392-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-02-10 16:02 ` Jason Gunthorpe
[not found] ` <20160210160238.GA20730-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-02-11 6:39 ` Jarkko Sakkinen
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=20160205050850.GA23820@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=jethro-LmnypSVwBK6EVqv0pETR8A@public.gmane.org \
--cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@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).