kernel/arch/mips/include/asm/dma-coherence.h
.. .. @@ -20,6 +20,12 @@ 20 20 #elif defined(CONFIG_DMA_MAYBE_COHERENT) 21 21 extern enum coherent_io_user_state coherentio; 22 22 extern int hw_coherentio; 23 +24 +static inline bool dev_is_dma_coherent(struct device *dev)25 +{26 + return coherentio == IO_COHERENCE_ENABLED ||27 + (coherentio == IO_COHERENCE_DEFAULT && hw_coherentio);28 +}23 29 #else 24 30 #ifdef CONFIG_DMA_NONCOHERENT 25 31 #define coherentio IO_COHERENCE_DISABLED