Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1605068 > unrolled thread

[PATCH v2 4/4] asm-generic/io.h: Drop ioremap_uc() stub for systems with MMU

Started byBjorn Helgaas <bhelgaas@google.com>
First post2017-03-20 19:50 +0100
Last post2017-03-20 19:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 4/4] asm-generic/io.h: Drop ioremap_uc() stub for systems  with MMU Bjorn Helgaas <bhelgaas@google.com> - 2017-03-20 19:50 +0100

#1605068 — [PATCH v2 4/4] asm-generic/io.h: Drop ioremap_uc() stub for systems with MMU

FromBjorn Helgaas <bhelgaas@google.com>
Date2017-03-20 19:50 +0100
Subject[PATCH v2 4/4] asm-generic/io.h: Drop ioremap_uc() stub for systems with MMU
Message-ID<tnaxt-nq-43@gated-at.bofh.it>
8c7ea50c010b ("x86/mm, asm-generic: Add IOMMU ioremap_uc() variant
default") added a default ioremap_uc() implementation that always returns
NULL to indicate failure.

For arches that don't implement their own ioremap_uc(), the default
implementation allows us to *build* drivers that use ioremap_uc(), but they
won't work.

Remove the default ioremap_uc() so a driver that depends on it will fail at
build-time rather than at run-time.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 include/asm-generic/io.h |   22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 3f8a7e589071..7b0617d2d210 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -798,29 +798,15 @@ static inline void *phys_to_virt(unsigned long address)
 }
 #endif
 
+#ifndef CONFIG_MMU
+
 /**
  * DOC: ioremap() and ioremap_*() variants
  *
  * If you have an MMU, your architecture must implement both ioremap() and
- * iounmap().
+ * iounmap(), as well as variants like ioremap_nocache(), ioremap_uc(),
+ * and ioremap_wc().
  *
- * It must also implement variants such as ioremap_uc().  The default
- * implementation here returns failure (NULL) to avoid improper behavior.
- */
-
-#ifdef CONFIG_MMU
-
-#ifndef ioremap_uc
-#define ioremap_uc ioremap_uc
-static inline void __iomem *ioremap_uc(phys_addr_t offset, size_t size)
-{
-	return NULL;
-}
-#endif
-
-#else /* !CONFIG_MMU */
-
-/*
  * If you don't have an MMU, the default implementations here provide
  * direct identity mapping.  You can override these if necessary.
  */

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web