Changeset 0abc2ae in mainline for kernel/arch/arm32/include/arch/barrier.h
- Timestamp:
- 2018-08-13T00:11:39Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f34d2be
- Parents:
- 05882233
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/include/arch/barrier.h
r05882233 r0abc2ae 117 117 */ 118 118 119 #if defined PROCESSOR_ARCH_armv7_a | defined PROCESSOR_ARCH_armv6 | defined KERNEL 120 //TODO might be PL1 only on armv5- 121 #define smc_coherence(a) \ 122 do { \ 123 dcache_clean_mva_pou(ALIGN_DOWN((uintptr_t) a, CP15_C7_MVA_ALIGN)); \ 124 write_barrier(); /* Wait for completion */\ 125 icache_invalidate();\ 126 inst_barrier(); /* Wait for Inst refetch */\ 127 } while (0) 119 #ifdef KERNEL 120 128 121 /* 129 122 * @note: Cache type register is not available in uspace. We would need 130 123 * to export the cache line value, or use syscall for uspace smc_coherence 131 124 */ 132 #define smc_coherence _block(a, l) \125 #define smc_coherence(a, l) \ 133 126 do { \ 134 127 for (uintptr_t addr = (uintptr_t) a; addr < (uintptr_t) a + l; \ 135 128 addr += CP15_C7_MVA_ALIGN) \ 136 smc_coherence(addr); \ 129 dcache_clean_mva_pou(ALIGN_DOWN((uintptr_t) a, CP15_C7_MVA_ALIGN)); \ 130 write_barrier(); /* Wait for completion */\ 131 icache_invalidate();\ 132 write_barrier();\ 133 inst_barrier(); /* Wait for Inst refetch */\ 137 134 } while (0) 138 #else 139 #define smc_coherence(a) 140 #define smc_coherence_block(a, l) 135 141 136 #endif 142 137
Note:
See TracChangeset
for help on using the changeset viewer.