From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
Cc: Neil Leeder <nleeder@codeaurora.org>,
Mark Langsdorf <mlangsdo@redhat.com>,
Jon Masters <jcm@redhat.com>, Timur Tabi <timur@codeaurora.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Mark Brown <broonie@kernel.org>, Mark Salter <msalter@redhat.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Will Deacon <will.deacon@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Linuxarm <linuxarm@huawei.com>
Subject: Re: [PATCH 1/2] acpi: arm64: add iort support for PMCG
Date: Wed, 31 Jan 2018 12:34:34 +0000 [thread overview]
Message-ID: <20180131123434.GA933@e107981-ln.cambridge.arm.com> (raw)
In-Reply-To: <5FC3163CFD30C246ABAA99954A238FA838641882@FRAEML521-MBX.china.huawei.com>
On Wed, Jan 31, 2018 at 12:10:47PM +0000, Shameerali Kolothum Thodi wrote:
[...]
> > I went back and re-read the patches, I think the point here is that the
> > perf driver (ie PATCH 2 that, by the way, is not maiinline) uses
> > devm_ioremap_resource() to map the counters and that's what is causing
> > failures when PMCG is part of SMMUv3 registers.
>
> Thanks for going through this. No, this is not where we are seeing the failure.
> May be I was not clear in my earlier mail. The failure happens in SMMUv3
> driver probe function when it calls devm_ioremap_resource().
Understood - because the PMU PMCG driver calls it first, that's what
I was referring to.
My point is that:
- the PMCG platform device resources should be built with the correct
resource hierarchy
- and even then, I do not think that using devm_ioremap_resource() in
the PMCG PMU driver is the correct way of handling its resource
reservation (ie the kernel must be able to detect that a resource is
contained in a parent one but I am not sure devm_ioremap_resource()
is the way to handle this correctly)
> > It is the resources hierarchy that is wrong and in turn, I do not think
> > devm_request_mem_region() is the right way of requesting it for the
> > PMCG driver.
> >
> > I need to look into this but I suspect that's something that should
> > be handled in the PMCG driver, that has to request the memory region
> > _differently_ (ie ioremap copes with this overlap - it is the
> > devm_request_mem_region() in devm_ioremap_resource() that fails, correct
> > ?).
>
> It looks like, in IORT code,
>
> iort_add_platform_device()--> platform_device_add()-->insert_resource(), inserts
> both SMMUv3 and PMCG resources into the resource tree and then when the probe
> of SMMUv3 is called, it detects the conflict.
>
> [ 85.548749] arm-smmu-v3 arm-smmu-v3.0.auto: can't request region for resource [mem 0x148000000-0x14801ffff]
>
> Of course, changing devm_ioremap_resource() to devm_ioremap() in SMMv3
> driver probe solves the issue for us, but not sure that's the right approach or not.
See above.
Lorenzo
next prev parent reply other threads:[~2018-01-31 12:34 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-04 19:59 [PATCH 0/2] arm64 SMMUv3 PMU driver with IORT support Neil Leeder
2017-08-04 19:59 ` [PATCH 1/2] acpi: arm64: add iort support for PMCG Neil Leeder
2017-08-07 11:17 ` Robin Murphy
2017-08-07 20:52 ` Leeder, Neil
2017-08-07 16:44 ` Lorenzo Pieralisi
2017-08-07 21:00 ` Leeder, Neil
2018-01-30 10:39 ` Shameerali Kolothum Thodi
2018-01-30 18:00 ` Lorenzo Pieralisi
2018-01-31 12:10 ` Shameerali Kolothum Thodi
2018-01-31 12:34 ` Lorenzo Pieralisi [this message]
2017-08-04 19:59 ` [PATCH 2/2] perf: add arm64 smmuv3 pmu driver Neil Leeder
2017-08-07 14:31 ` Robin Murphy
2017-08-07 21:18 ` Leeder, Neil
2017-12-05 5:01 ` Linu Cherian
2018-03-29 7:03 ` Yisheng Xie
[not found] ` <e55ab4404143ea0b3cc4795a93e37480@codeaurora.org>
2018-04-01 5:44 ` Neil Leeder
2018-04-02 6:37 ` Yisheng Xie
2018-04-02 14:24 ` Hanjun Guo
2018-04-02 17:59 ` Neil Leeder
2018-04-03 1:15 ` Hanjun Guo
2018-04-04 11:35 ` Lorenzo Pieralisi
2018-05-02 14:20 ` Agustin Vega-Frias
2018-05-03 9:22 ` Shameerali Kolothum Thodi
2018-04-18 11:05 ` Shameerali Kolothum Thodi
2018-04-19 1:17 ` Yisheng Xie
2017-08-09 7:56 ` [PATCH 0/2] arm64 SMMUv3 PMU driver with IORT support Hanjun Guo
2017-08-09 15:48 ` Leeder, Neil
2017-08-10 1:26 ` Hanjun Guo
2017-08-11 3:28 ` Leeder, Neil
2017-10-12 10:58 ` Hanjun Guo
2017-10-12 11:05 ` Lorenzo Pieralisi
2017-10-12 11:11 ` Hanjun Guo
2017-10-31 23:33 ` Yury Norov
2017-11-02 20:38 ` Leeder, Neil
2017-12-10 2:35 ` Linu Cherian
2017-12-18 14:48 ` Robin Murphy
2017-12-18 15:39 ` Marc Zyngier
2017-12-19 6:55 ` Linu Cherian
2017-12-19 12:11 ` Marc Zyngier
2017-12-19 6:36 ` Linu Cherian
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=20180131123434.GA933@e107981-ln.cambridge.arm.com \
--to=lorenzo.pieralisi@arm.com \
--cc=broonie@kernel.org \
--cc=jcm@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mark.rutland@arm.com \
--cc=mlangsdo@redhat.com \
--cc=msalter@redhat.com \
--cc=nleeder@codeaurora.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=timur@codeaurora.org \
--cc=will.deacon@arm.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®