From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support
Date: Wed, 24 Oct 2012 16:56:02 +0200 [thread overview]
Message-ID: <20121024165602.631f070b@skate> (raw)
In-Reply-To: <5087FD91.1050803@free-electrons.com>
Dear Gregory CLEMENT,
On Wed, 24 Oct 2012 16:39:13 +0200, Gregory CLEMENT wrote:
> > As others said, the prefix is wrong. Since the file is named coherency,
> > maybe just "coherency_" as the prefix? Not sure, though. Shouldn't the
> > file be named coherency-armada-370-xp.c, as we have done for the irq
> > controller file? In that case, the armada_370_xp prefix would make
> > sense
>
> I would prefer to just use coherency_ everywhere and keep the name of
> the file as is. It made sense to suffix the irq file with
> armada-370-xp because the other mvebu SoCs have their own irq
> controller. Whereas, as far as I know the coherency unit is only
> present in the Armada 370/XP.
Well your argumentation may also be seen as an argument to name it
coherency-armada-370-xp.c :-) I don't have a strong opinion on this
though, and we can always rename it later if needed.
> >> int armada_xp_get_cpu_count(void)
> >> {
> >> int reg, cnt;
> >
> > static?
>
> Which function?
> armada_xp_get_cpu_count and armada_370_xp_set_cpu_coherent are exported
> and moreover are not part of this patch set but the SMP one.
Ok, then maybe this function shouldn't be between the DMA operations
implementation and the bus notifier callback.
> Yes indeed code in headsmp.S and armada_xp_smp_prepare_cpus() are
> redundant we can simplify it. I will change it in the SMP series and
> for this series also.
Great, thanks!
> > Do we have a good reason for having
> > armada_370_xp_coherency_iocache_init() separate from
> > armada_370_xp_coherency_iocache_init() ? I.e, what prevents us from
>
> No good reason because they are the same! ;)
Oops, indeed. but I see that you fixed the problem.
> But more seriously, armada_370_xp_coherency_init() is called as an
> early_init call whereas armada_370_xp_coherency_iocache_init() is called
> later by armada_370_xp_dt_init(). I have to check if we can use
> bus_register_notifier() from an early_init call or if we still need to
> call armada_370_xp_coherency_init() as an early_init call.
The early_initcall() is mandatory, see the comment on top of it:
+/* Coherency initialization have to be done before the SMP
+ * initialization of the CPUs*/
+early_initcall(armada_370_xp_coherency_init);
(BTW, there is a missing space between CPUs and the comment terminator).
So, my point was more: is it possible to register the bus notifier
as early as inside an early_initcall() callback.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Lior Amsalem <alior@marvell.com>, Andrew Lunn <andrew@lunn.ch>,
Ike Pan <ike.pan@canonical.com>,
Nadav Haklai <nadavh@marvell.com>,
Ian Molton <ian.molton@codethink.co.uk>,
David Marlin <dmarlin@redhat.com>,
Yehuda Yitschak <yehuday@marvell.com>,
Jani Monoses <jani.monoses@canonical.com>,
Russell King <linux@arm.linux.org.uk>,
Tawfik Bayouk <tawfik@marvell.com>,
Dan Frazier <dann.frazier@canonical.com>,
Eran Ben-Avi <benavi@marvell.com>,
Leif Lindholm <leif.lindholm@arm.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Jason Cooper <jason@lakedaemon.net>,
Arnd Bergmann <arnd@arndb.de>, Jon Masters <jcm@redhat.com>,
Rob Herring <rob.herring@calxeda.com>,
Ben Dooks <ben-linux@fluff.org>,
linux-arm-kernel@lists.infradead.org,
Chris Van Hoof <vanhoof@canonical.com>,
Nicolas Pitre <nico@fluxnic.net>,
linux-kernel@vger.kernel.org, Maen Suleiman <maen@marvell.com>,
Shadi Ammouri <shadi@marvell.com>,
Olof Johansson <olof@lixom.net>
Subject: Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support
Date: Wed, 24 Oct 2012 16:56:02 +0200 [thread overview]
Message-ID: <20121024165602.631f070b@skate> (raw)
In-Reply-To: <5087FD91.1050803@free-electrons.com>
Dear Gregory CLEMENT,
On Wed, 24 Oct 2012 16:39:13 +0200, Gregory CLEMENT wrote:
> > As others said, the prefix is wrong. Since the file is named coherency,
> > maybe just "coherency_" as the prefix? Not sure, though. Shouldn't the
> > file be named coherency-armada-370-xp.c, as we have done for the irq
> > controller file? In that case, the armada_370_xp prefix would make
> > sense
>
> I would prefer to just use coherency_ everywhere and keep the name of
> the file as is. It made sense to suffix the irq file with
> armada-370-xp because the other mvebu SoCs have their own irq
> controller. Whereas, as far as I know the coherency unit is only
> present in the Armada 370/XP.
Well your argumentation may also be seen as an argument to name it
coherency-armada-370-xp.c :-) I don't have a strong opinion on this
though, and we can always rename it later if needed.
> >> int armada_xp_get_cpu_count(void)
> >> {
> >> int reg, cnt;
> >
> > static?
>
> Which function?
> armada_xp_get_cpu_count and armada_370_xp_set_cpu_coherent are exported
> and moreover are not part of this patch set but the SMP one.
Ok, then maybe this function shouldn't be between the DMA operations
implementation and the bus notifier callback.
> Yes indeed code in headsmp.S and armada_xp_smp_prepare_cpus() are
> redundant we can simplify it. I will change it in the SMP series and
> for this series also.
Great, thanks!
> > Do we have a good reason for having
> > armada_370_xp_coherency_iocache_init() separate from
> > armada_370_xp_coherency_iocache_init() ? I.e, what prevents us from
>
> No good reason because they are the same! ;)
Oops, indeed. but I see that you fixed the problem.
> But more seriously, armada_370_xp_coherency_init() is called as an
> early_init call whereas armada_370_xp_coherency_iocache_init() is called
> later by armada_370_xp_dt_init(). I have to check if we can use
> bus_register_notifier() from an early_init call or if we still need to
> call armada_370_xp_coherency_init() as an early_init call.
The early_initcall() is mandatory, see the comment on top of it:
+/* Coherency initialization have to be done before the SMP
+ * initialization of the CPUs*/
+early_initcall(armada_370_xp_coherency_init);
(BTW, there is a missing space between CPUs and the comment terminator).
So, my point was more: is it possible to register the bus notifier
as early as inside an early_initcall() callback.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2012-10-24 14:56 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 8:03 [PATCH 0/2] Add hardware I/O coherency support for Armada 370/XP Gregory CLEMENT
2012-10-24 8:03 ` Gregory CLEMENT
2012-10-24 8:04 ` [PATCH 1/2] arm: plat-orion: Add coherency attribute when setup mbus target Gregory CLEMENT
2012-10-24 8:04 ` Gregory CLEMENT
2012-10-24 11:55 ` Thomas Petazzoni
2012-10-24 11:55 ` Thomas Petazzoni
2012-10-24 8:04 ` [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support Gregory CLEMENT
2012-10-24 8:04 ` Gregory CLEMENT
2012-10-24 8:11 ` Yehuda Yitschak
2012-10-24 8:11 ` Yehuda Yitschak
2012-10-24 8:13 ` Gregory CLEMENT
2012-10-24 8:25 ` Andrew Lunn
2012-10-24 11:50 ` Gregory CLEMENT
2012-10-24 11:50 ` Gregory CLEMENT
2012-10-24 11:36 ` Arnd Bergmann
2012-10-24 11:36 ` Arnd Bergmann
2012-10-24 11:48 ` Gregory CLEMENT
2012-10-24 11:48 ` Gregory CLEMENT
2012-10-24 11:53 ` Gregory CLEMENT
2012-10-24 11:53 ` Gregory CLEMENT
2012-10-24 12:24 ` Arnd Bergmann
2012-10-24 12:24 ` Arnd Bergmann
2012-10-24 13:56 ` Gregory CLEMENT
2012-10-24 13:56 ` Gregory CLEMENT
2012-10-24 20:30 ` Arnd Bergmann
2012-10-24 20:30 ` Arnd Bergmann
2012-10-24 12:27 ` Thomas Petazzoni
2012-10-24 12:27 ` Thomas Petazzoni
2012-10-24 14:39 ` Gregory CLEMENT
2012-10-24 14:39 ` Gregory CLEMENT
2012-10-24 14:56 ` Thomas Petazzoni [this message]
2012-10-24 14:56 ` Thomas Petazzoni
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=20121024165602.631f070b@skate \
--to=thomas.petazzoni@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.