From: Toshi Kani <toshi.kani@hp.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-next@vger.kernel.org,
linux-kernel@vger.kernel.org, kbuild-all@01.org,
sfr@canb.auug.org.au, fengguang.wu@intel.com, hannes@cmpxchg.org,
Toshi Kani <toshi.kani@hp.com>
Subject: [PATCH] Fix undefined ioremap_huge_init when CONFIG_MMU is not set
Date: Thu, 5 Mar 2015 08:44:06 -0700 [thread overview]
Message-ID: <1425570246-812-1-git-send-email-toshi.kani@hp.com> (raw)
Fix a build error, undefined reference to ioremap_huge_init, when
CONFIG_MMU is not defined on linux-next and -mm tree.
lib/ioremap.o is not linked to the kernel when CONFIG_MMU is not
defined.
Signed-off-by: Toshi Kani <toshi.kani@hp.com>
---
include/linux/io.h | 5 +++--
lib/ioremap.c | 1 -
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/io.h b/include/linux/io.h
index 1ce8b4e..4cc299c 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -38,11 +38,12 @@ static inline int ioremap_page_range(unsigned long addr, unsigned long end,
}
#endif
-void __init ioremap_huge_init(void);
-
#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
+void __init ioremap_huge_init(void);
int arch_ioremap_pud_supported(void);
int arch_ioremap_pmd_supported(void);
+#else
+static inline void ioremap_huge_init(void) { }
#endif
/*
diff --git a/lib/ioremap.c b/lib/ioremap.c
index 3055ada..be24906 100644
--- a/lib/ioremap.c
+++ b/lib/ioremap.c
@@ -46,7 +46,6 @@ static inline int ioremap_pmd_enabled(void)
}
#else /* !CONFIG_HAVE_ARCH_HUGE_VMAP */
-void __init ioremap_huge_init(void) { }
static inline int ioremap_pud_enabled(void) { return 0; }
static inline int ioremap_pmd_enabled(void) { return 0; }
#endif /* CONFIG_HAVE_ARCH_HUGE_VMAP */
next reply other threads:[~2015-03-05 15:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 15:44 Toshi Kani [this message]
2015-03-05 23:41 ` [PATCH] Fix undefined ioremap_huge_init when CONFIG_MMU is not set Stephen Rothwell
2015-03-05 23:43 ` Toshi Kani
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=1425570246-812-1-git-send-email-toshi.kani@hp.com \
--to=toshi.kani@hp.com \
--cc=akpm@linux-foundation.org \
--cc=fengguang.wu@intel.com \
--cc=hannes@cmpxchg.org \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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).