From: Joerg Roedel <joro@8bytes.org>
To: Will Deacon <will.deacon@arm.com>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <robh+dt@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, Joerg Roedel <jroedel@suse.de>
Subject: [PATCH 0/2 v2] Fix MAX_PHANDLE_ARGS limitations
Date: Thu, 16 Jul 2015 10:22:55 +0200 [thread overview]
Message-ID: <1437034977-5266-1-git-send-email-joro@8bytes.org> (raw)
From: Joerg Roedel <jroedel@suse.de>
Hi,
here is the second version of my patches to fix the
MAX_PHANDLE_ARGS limitation for the arm-smmu driver. On my
AMD Seattle system the max value of 16 is not enough to
initialize the SMMU, as the device tree node has an entry
with 25 phandle args (possible are up to 128). The result is
a WARNING and incorrect SMMU initialization.
On the other side MAX_PHANDLE_ARGS can't grow indefinitly,
as it causes 'struct of_phandle_args' to get bigger. This
struct is often allocated on-stack and should be small by
default.
So these patches introduce a way to make 'struct
of_phandle_args' bigger only when needed and change the
ARM-SMMU driver to make use of it.
The patches have been tested on my AMD Seattle system.
Please review.
Thanks,
Joerg
Changes to v1:
* Rebased to v4.2-rc2
* Fixed leak in patch 2, as pointed out by Will
Deacon
Joerg Roedel (2):
of: base: Allow more args than MAX_PHANDLE_ARGS if required
arm/smmu: Make use of of_parse_phandle_with_var_args
drivers/iommu/arm-smmu.c | 23 ++++++++++++++++-------
drivers/of/base.c | 43 ++++++++++++++++++++++++++++++++++++-------
include/linux/of.h | 7 +++++++
3 files changed, 59 insertions(+), 14 deletions(-)
--
1.8.4.5
next reply other threads:[~2015-07-16 8:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 8:22 Joerg Roedel [this message]
2015-07-16 8:22 ` [PATCH 1/2] of: base: Allow more args than MAX_PHANDLE_ARGS if required Joerg Roedel
2015-07-16 8:22 ` [PATCH 2/2] arm/smmu: Make use of of_parse_phandle_with_var_args Joerg Roedel
-- strict thread matches above, loose matches on Subject: below --
2015-07-16 8:30 [PATCH 0/2 v2] Fix MAX_PHANDLE_ARGS limitations 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=1437034977-5266-1-git-send-email-joro@8bytes.org \
--to=joro@8bytes.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jroedel@suse.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).