[PATCH v3 7/8] grlib: make memory coherency cpu-independent

Jiri Gaisler jiri at gaisler.se
Mon Jan 21 10:30:00 UTC 2019


On 1/21/19 11:16 AM, Jiri Gaisler wrote:
> On 1/21/19 7:26 AM, Sebastian Huber wrote:
>> On 18/01/2019 23:34, Jiri Gaisler wrote:
>>>    */
>>>   -extern int   CPU_SPARC_HAS_SNOOPING;
>>> +extern int   GRLIB_DMA_IS_CACHE_COHERENT;
>> I would leave the SPARC BSPs as is. Maybe someone uses this CPU_SPARC_HAS_SNOOPING in external drivers or whatever. I would use the GRLIB_DMA_IS_CACHE_COHERENT only in the grlib and place something like this in grlib_impl.h:
>>
>> #include <bsp.h>
>>
>> #ifdef __sparc__
>> #define GRLIB_DMA_IS_CACHE_COHERENT CPU_SPARC_HAS_SNOOPING
>> #else
>> #define GRLIB_DMA_IS_CACHE_COHERENT 1
>> #endif
>>
> OK, I will fix this. I will skip '#include <bsp.h>' as it creates problems in grlib/mem/mctrl.c (redefinition of struct mctrl_regs). However, since CPU_SPARC_HAS_SNOOPING is defined in bsp.h, any external driver that uses CPU_SPARC_HAS_SNOOPING already include bsp.h ...


How about something like this?



-------------- next part --------------
A non-text attachment was scrubbed...
Name: grlib_coherency.patch
Type: text/x-patch
Size: 1459 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190121/4c0e4350/attachment-0002.bin>


More information about the devel mailing list