From: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
To: Nicolas Pitre <nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Jon Medhurst <tixy-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
Santosh Shilimkar
<santosh.shilimkar-l0cyMroinI0@public.gmane.org>,
Amit Kucheria
<amit.kucheria-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [RFC PATCH] drivers: bus: add ARM CCI support
Date: Mon, 22 Apr 2013 15:24:57 +0100 [thread overview]
Message-ID: <20130422142457.GM14496@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <alpine.LFD.2.03.1304181341020.17375-hIgblCxmbi8OMTOF05IoTw@public.gmane.org>
On Thu, Apr 18, 2013 at 01:54:04PM -0400, Nicolas Pitre wrote:
> On Thu, 18 Apr 2013, Stephen Boyd wrote:
>
> > On 04/11/13 07:47, Lorenzo Pieralisi wrote:
> > > diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
> > > new file mode 100644
> > > index 0000000..81953de
> > > --- /dev/null
> > > +++ b/drivers/bus/arm-cci.c
> > [...]
> > > +static void notrace cci_port_control(unsigned int port, bool enable)
> > > +{
> > > + void __iomem *base = ports[port].base;
> > > +
> > > + if (!base)
> > > + return;
> > > +
> > > + writel_relaxed(enable, base + CCI_PORT_CTRL);
> > > + while (readl_relaxed(cci_ctrl_base + CCI_CTRL_STATUS) & 0x1)
> > > + ;
> >
> > cpu_relax()?
>
> In some cases there is no more cache coherence when this is called and
> the hardware might not be in a good state to cope with whatever action
> people might be tempted to insert into cpu_relax(). After the CCI is
> disabled it is important to keep a low profile and not touch anything
> global. With some early hardware revision, even a DMB here was harmful.
It would be useful if there was a comment in the code explaining this.
As it stands, you _will_ get a stream of patches from kernel janitors
itching to add cpu_relax() there.
If you're going to do something different from the norm, it _needs_ to
definitely be commented and explained.
next prev parent reply other threads:[~2013-04-22 14:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 14:47 [RFC PATCH] ARM CCI support Lorenzo Pieralisi
[not found] ` <1365691679-28674-1-git-send-email-lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>
2013-04-11 14:47 ` [RFC PATCH] drivers: bus: add " Lorenzo Pieralisi
[not found] ` <1365691679-28674-2-git-send-email-lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>
2013-04-18 17:20 ` Stephen Boyd
2013-04-18 17:54 ` Nicolas Pitre
2013-04-18 18:11 ` Stephen Boyd
[not found] ` <alpine.LFD.2.03.1304181341020.17375-hIgblCxmbi8OMTOF05IoTw@public.gmane.org>
2013-04-22 14:24 ` Russell King - ARM Linux [this message]
[not found] ` <20130422142457.GM14496-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-04-22 15:18 ` Nicolas Pitre
[not found] ` <51702B70.9000908-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2013-04-19 11:21 ` Lorenzo Pieralisi
2013-04-23 13:52 ` Jon Medhurst (Tixy)
[not found] ` <1366725128.8473.21.camel-bdq14YP6qtQBuz+Z8zjtIQ@public.gmane.org>
2013-04-23 14:27 ` Lorenzo Pieralisi
2013-04-23 16:28 ` Dave Martin
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=20130422142457.GM14496@n2100.arm.linux.org.uk \
--to=linux-lfz/pmaqli7xmaaqvzeohq@public.gmane.org \
--cc=amit.kucheria-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=santosh.shilimkar-l0cyMroinI0@public.gmane.org \
--cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=tixy-QSEj5FYQhm4dnm+yROfE0A@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).