Changeset 7328ff4 in mainline for kernel/arch/sparc64/src/smc.c
- Timestamp:
- 2018-09-06T18:18:52Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ffa73c6
- Parents:
- d51cca8
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-13 01:29:17)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-09-06 18:18:52)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/smc.c
rd51cca8 r7328ff4 27 27 */ 28 28 29 /** @addtogroup mips32 30 * @{ 31 */ 32 /** @file 33 */ 29 #include <barrier.h> 30 #include <arch/barrier.h> 34 31 35 #ifndef KERN_mips32_BARRIER_H_ 36 #define KERN_mips32_BARRIER_H_ 32 #if defined(US) 37 33 38 /* 39 * TODO: implement true MIPS memory barriers for macros below. 40 */ 41 #define CS_ENTER_BARRIER() asm volatile ("" ::: "memory") 42 #define CS_LEAVE_BARRIER() asm volatile ("" ::: "memory") 34 #define FLUSH_INVAL_MIN 4 43 35 44 #define memory_barrier() asm volatile ("" ::: "memory")45 #define read_barrier() asm volatile ("" ::: "memory") 46 #define write_barrier() asm volatile ("" ::: "memory") 36 void smc_coherence(void *a, size_t l) 37 { 38 asm volatile ("membar #StoreStore\n" ::: "memory"); 47 39 48 #ifdef KERNEL 40 for (size_t i = 0; i < l; i += FLUSH_INVAL_MIN) { 41 asm volatile ( 42 "flush %[reg]\n" 43 :: [reg] "r" (a + i) 44 : "memory" 45 ); 46 } 47 } 49 48 50 # define smc_coherence(a, l)49 #elif defined (US3) 51 50 52 #endif /* KERNEL */53 51 54 #endif 52 void smc_coherence(void *a, size_t l) 53 { 54 asm volatile ("membar #StoreStore\n" ::: "memory"); 55 55 56 /** @} 57 */ 56 flush_pipeline(); 57 } 58 59 #endif /* defined(US3) */ 60
Note:
See TracChangeset
for help on using the changeset viewer.