]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
powerpc/mm: define an empty mm_iommu_init()
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 22 Mar 2019 08:08:40 +0000 (08:08 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 2 May 2019 15:58:11 +0000 (01:58 +1000)
To avoid ifdefs, define a empty static inline mm_iommu_init() function
when CONFIG_SPAPR_TCE_IOMMU is not selected.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/mmu_context.h
arch/powerpc/kernel/setup-common.c

index 66a3805dc9352e81f387190e32b8bdeee7948089..611204e588b9c247aa10dfc993f840330ad6908f 100644 (file)
@@ -52,6 +52,7 @@ static inline bool mm_iommu_is_devmem(struct mm_struct *mm, unsigned long hpa,
 {
        return false;
 }
+static inline void mm_iommu_init(struct mm_struct *mm) { }
 #endif
 extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm);
 extern void set_context(unsigned long id, pgd_t *pgd);
index 13054980e11a20068085bc34bfb825ef885e33f5..d06d50fe1e7e6692c8c6343bfba13fc57da9c5fa 100644 (file)
@@ -931,9 +931,7 @@ void __init setup_arch(char **cmdline_p)
        init_mm.end_data = (unsigned long) _edata;
        init_mm.brk = klimit;
 
-#ifdef CONFIG_SPAPR_TCE_IOMMU
        mm_iommu_init(&init_mm);
-#endif
        irqstack_early_init();
        exc_lvl_early_init();
        emergency_stack_init();