Skip to content

Commit 8fb5428

Browse files
author
Santosh Shilimkar
committed
ARM: mm: Add strongly ordered descriptor support.
On certain architectures, there might be a need to mark certain addresses with strongly ordered memory attributes to avoid ordering issues at the interconnect level. On OMAP4, the asynchronous bridge buffers can only be drained with strongly ordered accesses and hence the need to mark the memory strongly ordered. Signed-off-by: Santosh Shilimkar <[email protected]> Signed-off-by: Woodruff Richard <[email protected]> Tested-by: Vishwanath BS <[email protected]>
1 parent 48af9fe commit 8fb5428

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

arch/arm/include/asm/mach/map.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ struct map_desc {
2929
#define MT_MEMORY_NONCACHED 11
3030
#define MT_MEMORY_DTCM 12
3131
#define MT_MEMORY_ITCM 13
32+
#define MT_MEMORY_SO 14
3233

3334
#ifdef CONFIG_MMU
3435
extern void iotable_init(struct map_desc *, int);

arch/arm/include/asm/pgtable.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ extern pgprot_t pgprot_kernel;
232232
#define pgprot_writecombine(prot) \
233233
__pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE)
234234

235+
#define pgprot_stronglyordered(prot) \
236+
__pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED)
237+
235238
#ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
236239
#define pgprot_dmacoherent(prot) \
237240
__pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE | L_PTE_XN)

arch/arm/mm/mmu.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,14 @@ static struct mem_type mem_types[] = {
273273
.prot_l1 = PMD_TYPE_TABLE,
274274
.domain = DOMAIN_KERNEL,
275275
},
276+
[MT_MEMORY_SO] = {
277+
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
278+
L_PTE_MT_UNCACHED,
279+
.prot_l1 = PMD_TYPE_TABLE,
280+
.prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_S |
281+
PMD_SECT_UNCACHED | PMD_SECT_XN,
282+
.domain = DOMAIN_KERNEL,
283+
},
276284
};
277285

278286
const struct mem_type *get_mem_type(unsigned int type)

0 commit comments

Comments
 (0)