Flush caches on DMA memory.

* grub-core/kern/mips/cache.S (grub_arch_sync_dma_caches): New function.
	* grub-core/bus/pci.c (grub_memalign_dma32): Flush caches.
	(grub_dma_free): Likewise.
	* include/grub/cache.h (grub_arch_sync_dma_caches): New declaration.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-05-13 20:56:50 +02:00
parent 91bbcc0cb6
commit 19e1c41bbf
4 changed files with 64 additions and 1 deletions

View file

@ -37,4 +37,14 @@ grub_arch_sync_caches (void *address __attribute__ ((unused)),
void EXPORT_FUNC(grub_arch_sync_caches) (void *address, grub_size_t len);
#endif
#ifdef _mips
void EXPORT_FUNC(grub_arch_sync_dma_caches) (void *address, grub_size_t len);
#else
static inline void
grub_arch_sync_dma_caches (void *address __attribute__ ((unused)),
grub_size_t len __attribute__ ((unused)))
{
}
#endif
#endif /* ! GRUB_CACHE_HEADER */