Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 297fda2c in mainline


Ignore:
Timestamp:
2013-01-20T17:46:12Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
a202dbb
Parents:
33d394a
Message:

arm32: Implement smc_coherence_block.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/include/barrier.h

    r33d394a r297fda2c  
    113113        inst_barrier();              /* Wait for Inst refetch */\
    114114} while (0)
    115 // TODO: Implement blocks
    116 #define smc_coherence_block(a, l) smc_coherence(a)
     115//TODO would be better to use cacheline size here
     116#define smc_coherence_block(a, l) \
     117do { \
     118        for (uintptr_t addr = (uintptr_t)a; addr < (uintptr_t)a + l; addr += 4)\
     119                smc_coherence(addr); \
     120} while (0)
    117121#else
    118122#define smc_coherence(a)
    119 #define smc_coherence_block(a, l) smc_coherence(a)
     123#define smc_coherence_block(a, l)
    120124#endif
    121125
Note: See TracChangeset for help on using the changeset viewer.