From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Rob Herring <robherring2@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>,
Will Deacon <will.deacon@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <robh+dt@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Albin Tonnerre <albin.tonnerre@arm.com>,
"linux-arm-kernel@lists.infradead.org\"
<linux-arm-kernel@lists.infradead.org>,
Jason Cooper <jason@lakedaemon.net>,
Andrew Lunn <andrew@lunn.ch>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Gregory Clement <gregory.clement@free-electrons.com>,
Tawfik Bayouk <tawfik@marvell.com>,
Nadav Haklai <nadavh@marvell.com>,
Lior Amsalem <alior@marvell.com>,
Ezequiel Garcia
<ezequiel.garcia@free-electrons.com>"@mail.free-electrons.com
Subject: Re: [PATCHv4 2/3] ARM: mm: add support for HW coherent systems in PL310
Date: Sat, 17 May 2014 10:25:07 +0200 [thread overview]
Message-ID: <20140517102507.52c5d8ae@free-electrons.com> (raw)
In-Reply-To: <CAL_Jsq+VRZdJD6sMR=whC=bmjgODb01h8dci_KsjHx7pMLDhuA@mail.gmail.com>
Dear Rob Herring,
On Thu, 15 May 2014 14:08:39 -0500, Rob Herring wrote:
> > of_init = true;
> > memcpy(&outer_cache, &data->outer_cache, sizeof(outer_cache));
> > +
> > + /*
> > + * outer sync operations are not needed when the system is I/O
> > + * coherent, and potentially harmful in certain situations
> > + * (PCIe/PL310 deadlock on Armada 375/38x due to hardware I/O
> > + * coherency). The other operations are kept because they are
> > + * infrequent (therefore do not cause the deadlock) and needed
> > + * for secondary CPU boot and other power management
> > + * activities.
> > + */
> > + if (of_device_is_compatible(np, "arm,pl310-cache") &&
>
> Don't we have a pl310 specific init function this can be placed in
> removing this check? We could probably remove this check here anyway
> because we're never going to see this on an L210 or L220.
We have a pl310 specific init function called pl310_of_init(). However
it gets called *before* the global outer_cache structure gets memcpy()
from the specific L2 cache type chosen by the compatible string.
Therefore, it cannot null-ify the .sync operation. It is also unable to
do it directly in the pl310_data structure, because 1/ this structure
is const and 2/ I believe it would be ugly.
Therefore, we don't have much other choice than to do that where I'm
doing at the moment. I'll respin the patch series to remove the
"arm,pl310-cache" check, as you suggested.
Thanks for the review,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-05-17 8:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-15 14:59 [PATCHv4 0/3] ARM: implement workaround for Cortex-A9/PL310/PCIe deadlock Thomas Petazzoni
[not found] ` <1400165974-9059-1-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-15 14:59 ` [PATCHv4 1/3] ARM: mm: use MT_UNCACHED as the memory type for PCI I/O mappings Thomas Petazzoni
2014-05-15 14:59 ` [PATCHv4 2/3] ARM: mm: add support for HW coherent systems in PL310 Thomas Petazzoni
[not found] ` <1400165974-9059-3-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-15 19:08 ` Rob Herring
2014-05-17 8:25 ` Thomas Petazzoni [this message]
2014-05-15 14:59 ` [PATCHv4 3/3] ARM: mvebu: implement L2/PCIe deadlock workaround Thomas Petazzoni
[not found] ` <1400165974-9059-4-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-16 6:08 ` Jason Cooper
[not found] ` <20140516060851.GF27822-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2014-05-16 7:07 ` Thomas Petazzoni
[not found] ` <20140516090727.5264dc75-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-16 12:58 ` Jason Cooper
[not found] ` <20140516125847.GG27822-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2014-05-16 13:21 ` Thomas Petazzoni
2014-05-16 19:09 ` Jason Cooper
2014-05-16 19:08 ` Jason Cooper
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=20140517102507.52c5d8ae@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc="linux-arm-kernel@lists.infradead.org\" <linux-arm-kernel@lists.infradead.org>, Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>, Gregory Clement <gregory.clement@free-electrons.com>, Tawfik Bayouk <tawfik@marvell.com>, Nadav Haklai <nadavh@marvell.com>, Lior Amsalem <alior@marvell.com>, Ezequiel Garcia <ezequiel.garcia@free-electrons.com>"@mail.free-electrons.com \
--cc=albin.tonnerre@arm.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@secretlab.ca \
--cc=linux@arm.linux.org.uk \
--cc=robh+dt@kernel.org \
--cc=robherring2@gmail.com \
--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).