[lkml]   [2012]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] asm-generic, mm: pgtable: fix include for my_zero_pfn()
From: Deng-Cheng Zhu <>

A MIPS build showed:

In file included from arch/mips/include/asm/pgtable.h:388,
from mm/init-mm.c:9:
include/asm-generic/pgtable.h: In function 'my_zero_pfn':
include/asm-generic/pgtable.h:462: error: 'mem_map' undeclared (first use
in this function)
include/asm-generic/pgtable.h:462: error: (Each undeclared identifier is
reported only once
include/asm-generic/pgtable.h:462: error: for each function it appears in.)

This was caused by the following commit:
816422ad76 asm-generic, mm: pgtable: consolidate zero page helpers

Changing my_zero_pfn from #define to an inline function requires the
include fix. I believe s390 has the same problem as mips.

Although Ralf has added "#include <linux/mmzone.h>" in
arch/mips/include/asm/pgtable.h in his "MIPS: Transparent Huge Pages
support" commit, and this error went away, I think this fix is needed
since asm-generic/pgtable.h is now the place of the function my_zero_pfn()
who requires the definition of mem_map and this header could be included by

Cc: Kirill A. Shutemov <>
Cc: Ralf Baechle <>
Cc: Steven J. Hill <>
Signed-off-by: Deng-Cheng Zhu <>
include/asm-generic/pgtable.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 284e808..628dbbb 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -4,7 +4,7 @@
#ifndef __ASSEMBLY__

-#include <linux/mm_types.h>
+#include <linux/mm.h>
#include <linux/bug.h>


 \ /
  Last update: 2012-12-15 22:21    [W:0.036 / U:3.816 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site