From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv4 1/3] ARM: mm: use MT_UNCACHED as the memory type for PCI I/O mappings
Date: Thu, 15 May 2014 16:59:32 +0200 [thread overview]
Message-ID: <1400165974-9059-2-git-send-email-thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <1400165974-9059-1-git-send-email-thomas.petazzoni@free-electrons.com>
Arnd Bergmann explains: "The PCI I/O space semantics require
non-posted writes, which is the main difference between device and
strongly-ordered mappings."
This patch therefore changes the memory type used for PCI I/O mappings
from MT_DEVICE to MT_UNCACHED. On Marvell EBU platforms, it is part of
a workaround for a deadlock situation occuring on Armada 375/38x
between PCIe/PL310 and hardware I/O coherency in SMP situations.
As Arnd Bergmann indicates: "the same fix is required both for mvebu
as a workaround for the deadlock as well as for everyone else as a fix
for an incorrect PCI behavior."
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/mm/ioremap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index f9c32ba..631b0e6 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -445,7 +445,7 @@ int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr)
return ioremap_page_range(PCI_IO_VIRT_BASE + offset,
PCI_IO_VIRT_BASE + offset + SZ_64K,
phys_addr,
- __pgprot(get_mem_type(MT_DEVICE)->prot_pte));
+ __pgprot(get_mem_type(MT_UNCACHED)->prot_pte));
}
EXPORT_SYMBOL_GPL(pci_ioremap_io);
#endif
--
1.9.3
next prev parent reply other threads:[~2014-05-15 14:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-15 14:59 [PATCHv4 0/3] ARM: implement workaround for Cortex-A9/PL310/PCIe deadlock Thomas Petazzoni
2014-05-15 14:59 ` Thomas Petazzoni [this message]
2014-05-15 14:59 ` [PATCHv4 2/3] ARM: mm: add support for HW coherent systems in PL310 Thomas Petazzoni
2014-05-15 19:08 ` Rob Herring
2014-05-15 14:59 ` [PATCHv4 3/3] ARM: mvebu: implement L2/PCIe deadlock workaround Thomas Petazzoni
2014-05-16 6:08 ` Jason Cooper
2014-05-16 7:07 ` Thomas Petazzoni
2014-05-16 12:58 ` Jason Cooper
2014-05-16 13:21 ` Thomas Petazzoni
2014-05-16 19:09 ` Jason Cooper
2014-05-16 19:08 ` Jason Cooper
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=1400165974-9059-2-git-send-email-thomas.petazzoni@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox