linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 2/7] powerpc/mm: define an empty mm_iommu_init()
Date: Fri, 22 Mar 2019 08:08:40 +0000 (UTC)	[thread overview]
Message-ID: <2d9fe7eac16d51000747648b5f84a58ef258633e.1553242059.git.christophe.leroy@c-s.fr> (raw)
In-Reply-To: <a2ac33258063682558fe0cac8eedcbd28aa4a141.1553242059.git.christophe.leroy@c-s.fr>

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>
---
 arch/powerpc/include/asm/mmu_context.h | 1 +
 arch/powerpc/kernel/setup-common.c     | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h
index 6ee8195a2ffb..95b93ce428b7 100644
--- a/arch/powerpc/include/asm/mmu_context.h
+++ b/arch/powerpc/include/asm/mmu_context.h
@@ -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);
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 971f50d99d87..a90e8367ccde 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -956,9 +956,7 @@ void __init setup_arch(char **cmdline_p)
 #endif
 #endif
 
-#ifdef CONFIG_SPAPR_TCE_IOMMU
 	mm_iommu_init(&init_mm);
-#endif
 	irqstack_early_init();
 	exc_lvl_early_init();
 	emergency_stack_init();
-- 
2.13.3


  reply	other threads:[~2019-03-22  8:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22  8:08 [PATCH 1/7] powerpc/fadump: define an empty fadump_cleanup() Christophe Leroy
2019-03-22  8:08 ` Christophe Leroy [this message]
2019-03-22  8:08 ` [PATCH 3/7] powerpc/setup: define cpu_pvr at all time Christophe Leroy
2019-03-26  6:13   ` Christophe Leroy
2019-03-22  8:08 ` [PATCH 4/7] powerpc/setup: Remove unnecessary #ifdef CONFIG_ALTIVEC Christophe Leroy
2019-03-22  8:08 ` [PATCH 5/7] powerpc/setup: cleanup ifdef mess in check_cache_coherency() Christophe Leroy
2019-03-22  8:08 ` [PATCH 6/7] powerpc/setup: cleanup the #ifdef CONFIG_TAU block Christophe Leroy
2019-03-22  8:08 ` [PATCH 7/7] powerpc/setup: replace ifdefs by IS_ENABLED() wherever possible Christophe Leroy
2019-05-03  6:59 ` [PATCH 1/7] powerpc/fadump: define an empty fadump_cleanup() Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d9fe7eac16d51000747648b5f84a58ef258633e.1553242059.git.christophe.leroy@c-s.fr \
    --to=christophe.leroy@c-s.fr \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).