linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix undefined ioremap_huge_init when CONFIG_MMU is not set
@ 2015-03-05 15:44 Toshi Kani
  2015-03-05 23:41 ` Stephen Rothwell
  0 siblings, 1 reply; 3+ messages in thread
From: Toshi Kani @ 2015-03-05 15:44 UTC (permalink / raw)
  To: akpm
  Cc: linux-mm, linux-next, linux-kernel, kbuild-all, sfr,
	fengguang.wu, hannes, Toshi Kani

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 */

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix undefined ioremap_huge_init when CONFIG_MMU is not set
  2015-03-05 15:44 [PATCH] Fix undefined ioremap_huge_init when CONFIG_MMU is not set Toshi Kani
@ 2015-03-05 23:41 ` Stephen Rothwell
  2015-03-05 23:43   ` Toshi Kani
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2015-03-05 23:41 UTC (permalink / raw)
  To: Toshi Kani
  Cc: akpm, linux-mm, linux-next, linux-kernel, kbuild-all,
	fengguang.wu, hannes

[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

Hi Toshi,

On Thu,  5 Mar 2015 08:44:06 -0700 Toshi Kani <toshi.kani@hp.com> wrote:
>
> 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(-)

Added to my copy of the akpm-current tree today (and so into linux-next).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix undefined ioremap_huge_init when CONFIG_MMU is not set
  2015-03-05 23:41 ` Stephen Rothwell
@ 2015-03-05 23:43   ` Toshi Kani
  0 siblings, 0 replies; 3+ messages in thread
From: Toshi Kani @ 2015-03-05 23:43 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: akpm, linux-mm, linux-next, linux-kernel, kbuild-all,
	fengguang.wu, hannes

On Fri, 2015-03-06 at 10:41 +1100, Stephen Rothwell wrote:
> Hi Toshi,
> 
> On Thu,  5 Mar 2015 08:44:06 -0700 Toshi Kani <toshi.kani@hp.com> wrote:
> >
> > 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(-)
> 
> Added to my copy of the akpm-current tree today (and so into linux-next).

Thanks Stephen!
-Toshi



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-05 23:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-05 15:44 [PATCH] Fix undefined ioremap_huge_init when CONFIG_MMU is not set Toshi Kani
2015-03-05 23:41 ` Stephen Rothwell
2015-03-05 23:43   ` Toshi Kani

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).