From: dwalker@codeaurora.org (Daniel Walker)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 05/18] arm: msm: implement ioremap_strongly_ordered
Date: Mon, 11 Jan 2010 14:47:24 -0800 [thread overview]
Message-ID: <1263250057-26692-6-git-send-email-dwalker@codeaurora.org> (raw)
In-Reply-To: <1263250057-26692-1-git-send-email-dwalker@codeaurora.org>
From: Larry Bassel <lbassel@quicinc.com>
Both the clean and invalidate functionality needed
for the video encoder and 7x27 barrier code
need to have a strongly ordered mapping set up
so that one may perform a write to strongly ordered
memory. The generic ARM code does not provide this.
The generic ARM code does provide MT_DEVICE, which starts
as strongly ordered, but the code later turns the buffered flag
on for ARMv6 in order to make the device shared. This is not
suitable for my purpose, so this patch adds code for a
MT_DEVICE_STRONGLY_ORDERED mapping type.
Signed-off-by: Larry Bassel <lbassel@quicinc.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
---
arch/arm/include/asm/io.h | 2 ++
arch/arm/include/asm/mach/map.h | 1 +
arch/arm/mm/mmu.c | 6 ++++++
3 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index d2a59cf..05b281e 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -222,12 +222,14 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
#ifndef __arch_ioremap
#define ioremap(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE)
#define ioremap_nocache(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE)
+#define ioremap_strongly_ordered(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_STRONGLY_ORDERED)
#define ioremap_cached(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_CACHED)
#define ioremap_wc(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_WC)
#define iounmap(cookie) __iounmap(cookie)
#else
#define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
#define ioremap_nocache(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
+#define ioremap_strongly_ordered(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_STRONGLY_ORDERED)
#define ioremap_cached(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_CACHED)
#define ioremap_wc(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_WC)
#define iounmap(cookie) __arch_iounmap(cookie)
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h
index 742c2aa..ddff29f 100644
--- a/arch/arm/include/asm/mach/map.h
+++ b/arch/arm/include/asm/mach/map.h
@@ -27,6 +27,7 @@ struct map_desc {
#define MT_MEMORY 9
#define MT_ROM 10
#define MT_MEMORY_NONCACHED 11
+#define MT_DEVICE_STRONGLY_ORDERED 12
#ifdef CONFIG_MMU
extern void iotable_init(struct map_desc *, int);
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 1708da8..bcbf774 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -201,6 +201,12 @@ static struct mem_type mem_types[] = {
.prot_sect = PROT_SECT_DEVICE | PMD_SECT_S,
.domain = DOMAIN_IO,
},
+ [MT_DEVICE_STRONGLY_ORDERED] = { /* Guaranteed strongly ordered */
+ .prot_pte = PROT_PTE_DEVICE,
+ .prot_l1 = PMD_TYPE_TABLE,
+ .prot_sect = PROT_SECT_DEVICE | PMD_SECT_UNCACHED,
+ .domain = DOMAIN_IO,
+ },
[MT_DEVICE_NONSHARED] = { /* ARMv6 non-shared device */
.prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_NONSHARED,
.prot_l1 = PMD_TYPE_TABLE,
--
1.6.3.3
next prev parent reply other threads:[~2010-01-11 22:47 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 22:47 [RFC 00/18] generic arm needed for msm Daniel Walker
2010-01-11 22:47 ` [RFC 01/18] arm: msm: allow ARCH_MSM to have v7 cpus Daniel Walker
2010-01-11 22:47 ` [RFC 02/18] arm: msm: add oprofile pmu support Daniel Walker
2010-01-11 22:47 ` [RFC 03/18] arm: boot: remove old ARM ID for QSD Daniel Walker
2010-01-15 21:26 ` Russell King - ARM Linux
2010-01-11 22:47 ` [RFC 04/18] arm: cache-l2x0: add l2x0 suspend and resume functions Daniel Walker
2010-01-11 23:44 ` Russell King - ARM Linux
2010-01-12 0:52 ` Ruan, Willie
2010-01-11 22:47 ` Daniel Walker [this message]
2010-01-11 23:37 ` [RFC 05/18] arm: msm: implement ioremap_strongly_ordered Russell King - ARM Linux
2010-01-28 23:04 ` Larry Bassel
2010-02-03 14:59 ` Russell King - ARM Linux
2010-01-11 22:47 ` [RFC 06/18] arm: msm: implement proper dmb() for 7x27 Daniel Walker
2010-01-11 23:39 ` Russell King - ARM Linux
2010-01-11 23:45 ` Daniel Walker
2010-01-12 0:01 ` Russell King - ARM Linux
2010-01-19 17:28 ` Jamie Lokier
2010-01-19 18:04 ` Russell King - ARM Linux
2010-01-19 21:12 ` Jamie Lokier
2010-01-19 23:11 ` Russell King - ARM Linux
2010-01-19 17:16 ` Jamie Lokier
2010-01-11 22:47 ` [RFC 07/18] arm: mm: retry on QSD icache parity errors Daniel Walker
2010-01-18 18:42 ` Ashwin Chaugule
2010-01-19 16:16 ` Ashwin Chaugule
2010-01-11 22:47 ` [RFC 08/18] arm: msm: set L2CR1 to enable prefetch and burst on Scorpion Daniel Walker
2010-01-11 23:45 ` Russell King - ARM Linux
2010-01-12 10:51 ` [RFC 08/18] arm: msm: set L2CR1 to enable prefetch and burston Scorpion Catalin Marinas
2010-01-12 11:23 ` Shilimkar, Santosh
2010-01-12 11:44 ` Russell King - ARM Linux
2010-01-12 13:32 ` [RFC 08/18] arm: msm: set L2CR1 to enable prefetch and burstonScorpion Catalin Marinas
2010-01-12 13:58 ` Russell King - ARM Linux
2010-01-12 14:41 ` [RFC 08/18] arm: msm: set L2CR1 to enable prefetch andburstonScorpion Catalin Marinas
2010-01-12 18:23 ` Daniel Walker
2010-01-13 10:36 ` Catalin Marinas
2010-01-19 17:38 ` Jamie Lokier
2010-01-13 6:14 ` [RFC 08/18] arm: msm: set L2CR1 to enable prefetch and burstonScorpion Shilimkar, Santosh
2010-01-12 20:21 ` [RFC 08/18] arm: msm: set L2CR1 to enable prefetch and burston Scorpion Nicolas Pitre
2010-01-11 22:47 ` [RFC 09/18] arm: mm: support error reporting in L1/L2 caches on QSD Daniel Walker
2010-01-11 22:47 ` [RFC 10/18] arm: mm: enable L2X0 to use L2 cache on MSM7X27 Daniel Walker
2010-01-11 22:47 ` [RFC 11/18] arm: msm: add ARCH_MSM_SCORPION to CPU_V7 Daniel Walker
2010-01-11 23:13 ` Russell King - ARM Linux
2010-01-11 23:17 ` Daniel Walker
2010-01-11 22:47 ` [RFC 12/18] arm: msm: Enable frequency scaling Daniel Walker
2010-01-11 22:47 ` [RFC 13/18] arm: msm: define HAVE_CLK for ARCH_MSM Daniel Walker
2010-01-11 22:47 ` [RFC 14/18] arm: msm: add v7 support for compiler version-4.1.1 Daniel Walker
2010-01-11 23:07 ` Russell King - ARM Linux
2010-01-11 22:47 ` [RFC 15/18] arm: vfp: Add additional vfp interfaces Daniel Walker
2010-01-11 22:47 ` [RFC 16/18] arm: msm: add arch_has_speculative_dfetch() Daniel Walker
2010-01-11 23:33 ` Russell King - ARM Linux
2010-01-12 0:28 ` Daniel Walker
2010-01-12 8:59 ` Russell King - ARM Linux
2010-01-11 22:47 ` [RFC 17/18] arm: mm: Add SW emulation for ARM domain manager feature Daniel Walker
2010-01-25 16:40 ` Catalin Marinas
2010-01-25 17:04 ` Nicolas Pitre
2010-01-25 18:25 ` Daniel Walker
2010-03-22 18:11 ` Daniel Walker
2010-03-22 18:58 ` Nicolas Pitre
2010-03-22 20:01 ` Daniel Walker
2010-03-22 20:32 ` Nicolas Pitre
2010-03-23 10:04 ` Catalin Marinas
2010-01-11 22:47 ` [RFC 18/18] arm: mm: qsd8x50: Fix incorrect permission faults Daniel Walker
2010-01-11 23:11 ` Russell King - ARM Linux
2010-01-19 17:10 ` Jamie Lokier
2010-01-19 17:33 ` Daniel Walker
2010-01-19 17:43 ` Jamie Lokier
2010-01-19 17:49 ` Daniel Walker
2010-01-19 18:09 ` Russell King - ARM Linux
2010-02-04 0:09 ` David Brown
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=1263250057-26692-6-git-send-email-dwalker@codeaurora.org \
--to=dwalker@codeaurora.org \
--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.