summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/mmu-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/cpu/mmu-common.h')
-rw-r--r--arch/arm/cpu/mmu-common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/cpu/mmu-common.h b/arch/arm/cpu/mmu-common.h
index 37eef3ef28..679799c3c5 100644
--- a/arch/arm/cpu/mmu-common.h
+++ b/arch/arm/cpu/mmu-common.h
@@ -5,4 +5,15 @@ void dma_inv_range(void *ptr, size_t size);
void *dma_alloc_map(size_t size, dma_addr_t *dma_handle, unsigned flags);
void __mmu_init(bool mmu_on);
+static inline void arm_mmu_not_initialized_error(void)
+{
+ /*
+ * This means:
+ * - one of the MMU functions like dma_alloc_coherent
+ * or remap_range is called too early, before the MMU is initialized
+ * - Or the MMU initialization has failed earlier
+ */
+ panic("MMU not initialized\n");
+}
+
#endif \ No newline at end of file