All of lore.kernel.org
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv3 2/3] ARM: mm: add support for HW coherent systems in PL310
Date: Thu, 15 May 2014 10:36:39 +0100	[thread overview]
Message-ID: <20140515093639.GF11117@localhost> (raw)
In-Reply-To: <1400145519-28530-3-git-send-email-thomas.petazzoni@free-electrons.com>

On Thu, May 15, 2014 at 10:18:38AM +0100, Thomas Petazzoni wrote:
> When a PL310 cache is used on a system that provides hardware
> coherency, the outer cache sync operation is useless, and can be
> skipped. Moreover, on some systems, it is harmful as it causes
> deadlocks between the Marvell coherency mechanism, the Marvell PCIe
> controller and the Cortex-A9.
> 
> To avoid this, this commit introduces a new Device Tree property
> 'dma-coherent' for the L2 cache controller node, valid only for the
> PL310 cache. It identifies the usage of the PL310 cache in an I/O
> coherent configuration. Internally, it makes the driver use a
> different set of l2x0_of_data, in which the ->sync operation is NULL.
> 
> Note that technically speaking, a fully coherent system wouldn't
> require any of the other .outer_cache operations. However, in
> practice, when booting secondary CPUs, these are not yet coherent, and
> therefore a set of cache maintenance operations are necessary at this
> point. This explains why we keep the other .outer_cache operations and
> only ->sync is disabled.
> 
> While in theory any write to a PL310 register could cause the
> deadlock, in practice, disabling ->sync is sufficient to workaround
> the deadlock, since the other cache maintenance operations are only
> used in very specific situations.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>
To: Thomas Petazzoni
	<thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	Will Deacon <Will.Deacon-5wv7dgnIgG8@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Grant Likely
	<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Albin Tonnerre <Albin.Tonnerre-5wv7dgnIgG8@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
	Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>,
	Sebastian Hesselbarth
	<sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Gregory Clement
	<gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Tawfik Bayouk <tawfik-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	Nadav Haklai <nadavh-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	Lior Amsalem <alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	Ezequiel Garcia
	<ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Subject: Re: [PATCHv3 2/3] ARM: mm: add support for HW coherent systems in PL310
Date: Thu, 15 May 2014 10:36:39 +0100	[thread overview]
Message-ID: <20140515093639.GF11117@localhost> (raw)
In-Reply-To: <1400145519-28530-3-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

On Thu, May 15, 2014 at 10:18:38AM +0100, Thomas Petazzoni wrote:
> When a PL310 cache is used on a system that provides hardware
> coherency, the outer cache sync operation is useless, and can be
> skipped. Moreover, on some systems, it is harmful as it causes
> deadlocks between the Marvell coherency mechanism, the Marvell PCIe
> controller and the Cortex-A9.
> 
> To avoid this, this commit introduces a new Device Tree property
> 'dma-coherent' for the L2 cache controller node, valid only for the
> PL310 cache. It identifies the usage of the PL310 cache in an I/O
> coherent configuration. Internally, it makes the driver use a
> different set of l2x0_of_data, in which the ->sync operation is NULL.
> 
> Note that technically speaking, a fully coherent system wouldn't
> require any of the other .outer_cache operations. However, in
> practice, when booting secondary CPUs, these are not yet coherent, and
> therefore a set of cache maintenance operations are necessary at this
> point. This explains why we keep the other .outer_cache operations and
> only ->sync is disabled.
> 
> While in theory any write to a PL310 register could cause the
> deadlock, in practice, disabling ->sync is sufficient to workaround
> the deadlock, since the other cache maintenance operations are only
> used in very specific situations.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

Acked-by: Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-05-15  9:36 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15  9:18 [PATCHv3 0/3] ARM: implement workaround for Cortex-A9/PL310/PCIe deadlock Thomas Petazzoni
2014-05-15  9:18 ` Thomas Petazzoni
2014-05-15  9:18 ` [PATCHv3 1/3] ARM: mm: allow sub-architectures to override PCI I/O memory type Thomas Petazzoni
2014-05-15  9:18   ` Thomas Petazzoni
2014-05-15 13:21   ` Arnd Bergmann
2014-05-15 13:21     ` Arnd Bergmann
2014-05-15 13:51     ` Thomas Petazzoni
2014-05-15 13:51       ` Thomas Petazzoni
2014-05-15 14:29       ` Will Deacon
2014-05-15 14:29         ` Will Deacon
2014-05-15 14:32         ` Arnd Bergmann
2014-05-15 14:32           ` Arnd Bergmann
2014-05-15 15:34           ` Will Deacon
2014-05-15 15:34             ` Will Deacon
2014-05-15 15:55             ` Arnd Bergmann
2014-05-15 15:55               ` Arnd Bergmann
2014-05-16  9:53               ` Will Deacon
2014-05-16  9:53                 ` Will Deacon
2014-05-19 13:19                 ` Arnd Bergmann
2014-05-19 13:19                   ` Arnd Bergmann
2014-05-19 14:23                   ` Will Deacon
2014-05-19 14:23                     ` Will Deacon
2014-05-19 16:40                     ` Arnd Bergmann
2014-05-19 16:40                       ` Arnd Bergmann
2014-05-19 16:50                       ` Will Deacon
2014-05-19 16:50                         ` Will Deacon
2014-05-19 17:04                         ` Arnd Bergmann
2014-05-19 17:04                           ` Arnd Bergmann
2014-05-21  5:20                 ` Jason Gunthorpe
2014-05-21  5:20                   ` Jason Gunthorpe
2014-05-21  8:20                   ` Arnd Bergmann
2014-05-21  8:20                     ` Arnd Bergmann
2014-05-15 17:53             ` Jason Gunthorpe
2014-05-15 17:53               ` Jason Gunthorpe
2014-05-16  9:57               ` Will Deacon
2014-05-16  9:57                 ` Will Deacon
2014-05-16 15:33                 ` Jason Gunthorpe
2014-05-16 15:33                   ` Jason Gunthorpe
2014-05-15  9:18 ` [PATCHv3 2/3] ARM: mm: add support for HW coherent systems in PL310 Thomas Petazzoni
2014-05-15  9:18   ` Thomas Petazzoni
2014-05-15  9:36   ` Catalin Marinas [this message]
2014-05-15  9:36     ` Catalin Marinas
2014-05-15 11:39     ` Thomas Petazzoni
2014-05-15 11:39       ` Thomas Petazzoni
2014-05-15 13:23   ` Arnd Bergmann
2014-05-15 13:23     ` Arnd Bergmann
2014-05-15 13:35   ` Rob Herring
2014-05-15 13:35     ` Rob Herring
2014-05-15 13:46     ` Thomas Petazzoni
2014-05-15 13:46       ` Thomas Petazzoni
2014-05-15  9:18 ` [PATCHv3 3/3] ARM: mvebu: implement L2/PCIe deadlock workaround Thomas Petazzoni
2014-05-15  9:18   ` Thomas Petazzoni
2014-05-15  9:36   ` Catalin Marinas
2014-05-15  9:36     ` Catalin Marinas
2014-05-15 13:21   ` Jason Cooper
2014-05-15 13:21     ` Jason Cooper
2014-05-15 13:50     ` Thomas Petazzoni
2014-05-15 13:50       ` Thomas Petazzoni
2014-05-15 15:31       ` Jason Cooper
2014-05-15 15:31         ` Jason Cooper
2014-05-16  7:19         ` Thomas Petazzoni
2014-05-16  7:19           ` Thomas Petazzoni
2014-05-15 13:26   ` Arnd Bergmann
2014-05-15 13:26     ` Arnd Bergmann
2014-05-15 14:22     ` Thomas Petazzoni
2014-05-15 14: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=20140515093639.GF11117@localhost \
    --to=catalin.marinas@arm.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.