All of lore.kernel.org
 help / color / mirror / Atom feed
From: gregory.clement@free-electrons.com (Gregory CLEMENT)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: mvebu: map PCI I/O regions strongly ordered
Date: Thu, 16 Jun 2016 17:01:07 +0200	[thread overview]
Message-ID: <87mvml9o0c.fsf@free-electrons.com> (raw)
In-Reply-To: <1466084547-31343-3-git-send-email-thomas.petazzoni@free-electrons.com> (Thomas Petazzoni's message of "Thu, 16 Jun 2016 15:42:26 +0200")

Hi Thomas,
 
 On jeu., juin 16 2016, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> In order for HW I/O coherency to work on Cortex-A9 based Marvell SoCs,
> all MMIO registers must be mapped strongly ordered. In commit
> 1c8c3cf0b5239 ("ARM: 8060/1: mm: allow sub-architectures to override PCI
> I/O memory type") we implemented a new function,
> pci_ioremap_set_mem_type(), that allow sub-architecture code to override
> the memory type used to map PCI I/O regions.
>
> In the discussion around this patch series [1], Arnd Bergmann made the
> comment that maybe all PCI I/O regions should be mapped
> strongly-ordered, which would have made our proposal to add
> pci_ioremap_set_mem_type() irrelevant. So, we submitted a patch [2] that
> did what Arnd suggested.
>
> However, Russell in the end merged our initial proposal to add
> pci_ioremap_set_mem_type(), but it was never used anywhere. Further
> discussion with Arnd and other folks on IRC lead to the conclusion that
> in fact using strongly-ordered for all platforms was maybe not
> desirable, and therefore, using pci_ioremap_set_mem_type() was the most
> appropriate solution.
>
> As a consequence, this commit finally adds the
> pci_ioremap_set_mem_type() call in the mach-mvebu platform code, which
> was originally part of our initial patch series [3] and is necessary for
> the whole mechanism to work.
>
> [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/256565.html
> [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/256755.html
> [3] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/256563.html
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Applied on mvebu/fixes

Thanks,

Gregory

> ---
>  arch/arm/mach-mvebu/coherency.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
> index 474abff..e80f0dd 100644
> --- a/arch/arm/mach-mvebu/coherency.c
> +++ b/arch/arm/mach-mvebu/coherency.c
> @@ -181,6 +181,7 @@ static void __init armada_375_380_coherency_init(struct device_node *np)
>  
>  	coherency_cpu_base = of_iomap(np, 0);
>  	arch_ioremap_caller = armada_wa_ioremap_caller;
> +	pci_ioremap_set_mem_type(MT_UNCACHED);
>  
>  	/*
>  	 * We should switch the PL310 to I/O coherency mode only if
> -- 
> 2.7.4
>

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2016-06-16 15:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 13:42 [PATCH 0/3] Misc fixes for Marvell EBU platforms Thomas Petazzoni
2016-06-16 13:42 ` [PATCH 1/3] ARM: mvebu: fix HW I/O coherency related deadlocks Thomas Petazzoni
2016-06-16 13:42   ` Thomas Petazzoni
2016-06-16 14:52   ` Gregory CLEMENT
2016-06-16 14:52     ` Gregory CLEMENT
2016-06-16 13:42 ` [PATCH 2/3] ARM: mvebu: map PCI I/O regions strongly ordered Thomas Petazzoni
2016-06-16 15:01   ` Gregory CLEMENT [this message]
2016-06-16 13:42 ` [PATCH 3/3] ARM: dts: armada-38x: fix MBUS_ID for crypto SRAM on Armada 385 Linksys Thomas Petazzoni
2016-06-16 13:42   ` Thomas Petazzoni
2016-06-16 15:02   ` Gregory CLEMENT
2016-06-16 15:02     ` Gregory CLEMENT

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=87mvml9o0c.fsf@free-electrons.com \
    --to=gregory.clement@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.