diff options
author | Achin Gupta <achin.gupta@arm.com> | 2014-07-25 14:47:05 +0100 |
---|---|---|
committer | Soby Mathew <soby.mathew@arm.com> | 2014-08-19 14:29:23 +0100 |
commit | 04fafcee2b08948d2d366c448bec059a90d224f4 (patch) | |
tree | a8d3869221dc769431832c7162a143095845b862 | |
parent | f139a39a612e152706120529c640410e05fcc976 (diff) |
Add macro to flush per-CPU data
This patch adds a macro which will flush the contents of the specified member of
the per-CPU data structure to the PoC. This is required to enable an update of a
per-CPU data member to be visible to all observers.
Change-Id: I20e0feb9b9f345dc5a1162e88adc7956a7ad7a64
-rw-r--r-- | include/bl31/cpu_data.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/bl31/cpu_data.h b/include/bl31/cpu_data.h index ef0b68cf..9015c4b3 100644 --- a/include/bl31/cpu_data.h +++ b/include/bl31/cpu_data.h @@ -104,6 +104,10 @@ void init_cpu_data_ptr(void); #define get_cpu_data_by_mpidr(_id, _m) _cpu_data_by_mpidr(_id)->_m #define set_cpu_data_by_mpidr(_id, _m, _v) _cpu_data_by_mpidr(_id)->_m = _v +#define flush_cpu_data(_m) flush_dcache_range((uint64_t) \ + &(_cpu_data()->_m), \ + sizeof(_cpu_data()->_m)) + #endif /* __ASSEMBLY__ */ #endif /* __CPU_DATA_H__ */ |