All of lore.kernel.org
 help / color / mirror / Atom feed
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] bus: mvebu-mbus: do not set WIN_CTRL_SYNCBARRIER on non io-coherent platforms.
Date: Fri, 24 Apr 2015 16:54:01 +0200	[thread overview]
Message-ID: <20150424165401.733666b4@free-electrons.com> (raw)
In-Reply-To: <1429886671-14415-1-git-send-email-nschichan@freebox.fr>

Dear Nicolas Schichan,

On Fri, 24 Apr 2015 16:44:31 +0200, Nicolas Schichan wrote:
> On those platforms (orion5x, kirkwood and dove AFAICS) the
> WIN_CTRL_SYNCBARRIER bit in the window control register is either
> reserved (all windows except 6 and 7) or enables read-only protection
> (windows 6 and 7).
> 
> Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
> ---
> 
> Hello Thomas,
> 
> Please find here my attempt at fixing this. I have been relying on the
> hw_io_coherency field of the struct mvebu_mbus_state which is always
> false for the platforms without the WIN_CTRL_SYNCBARRIER bit available
> (orion5x, kirkwood, and dove).
> 
> I was going to add a field to mvebu_soc_data documenting the
> availability of the WIN_CTRL_SYNCBARRIER bit for each platform but for
> that purpose, the mvebu_mbus_state struct hw_io_coherency field looks
> to be enough.
> 
> This has been tested on mv88f6282 (kirkwood).

Thanks, it looks good to me. Can you resend with:

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: <stable@vger.kernel.org> # v4.0+
Fixes: a0b5cd4ac2d6 ("bus: mvebu-mbus: use automatic I/O synchronization barriers")

An addition to the commit log like:

Commit a0b5cd4ac2d6 ("bus: mvebu-mbus: use automatic I/O
synchronization barriers") enabled the usage of automatic I/O
synchronization barriers by enabling bit WIN_CTRL_SYNCBARRIER in the
control registers of MBus windows, but....

And in the code, maybe add a comment above the WIN_CTRL_SYNCBARRIER
definition like:

/* Only on HW I/O coherency capable platforms */
#define WIN_CTRL_SYNCBARRIER ...

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-04-24 14:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 16:11 [PATCHv2 0/3] ARM: mvebu: I/O coherency related fixes Thomas Petazzoni
2015-01-16 16:11 ` [PATCHv2 1/3] ARM: mvebu: completely disable hardware I/O coherency Thomas Petazzoni
2015-01-16 16:11 ` [PATCHv2 2/3] bus: mvebu-mbus: use automatic I/O synchronization barriers Thomas Petazzoni
2015-04-17 10:45   ` Nicolas Schichan
2015-04-17 11:23     ` Thomas Petazzoni
2015-04-24 14:44       ` [RFC PATCH] bus: mvebu-mbus: do not set WIN_CTRL_SYNCBARRIER on non io-coherent platforms Nicolas Schichan
2015-04-24 14:54         ` Thomas Petazzoni [this message]
2015-04-24 15:12       ` [PATCH] " Nicolas Schichan
2015-05-28 19:43     ` [PATCHv2 2/3] bus: mvebu-mbus: use automatic I/O synchronization barriers Aaro Koskinen
2015-05-28 19:57       ` Thomas Petazzoni
2015-01-16 16:11 ` [PATCHv2 3/3] ARM: mvebu: use arm_coherent_dma_ops and re-enable hardware I/O coherency Thomas Petazzoni
2015-01-16 16:15   ` Andrew Lunn
2015-01-16 16:20     ` Thomas Petazzoni
2015-01-19 22:36 ` [PATCHv2 0/3] ARM: mvebu: I/O coherency related fixes Andrew Lunn
2015-01-20 15:22   ` 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=20150424165401.733666b4@free-electrons.com \
    --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.