linux-mips
[Top] [All Lists]

[PATCH] MIPS: Fix build failure by adding definition of pfn_pmd().

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH] MIPS: Fix build failure by adding definition of pfn_pmd().
From: David Daney <ddaney.cavm@gmail.com>
Date: Fri, 18 Jan 2013 11:16:40 -0800
Cc: David Daney <david.daney@cavium.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=T6YwWIa1kCDtE4E8jmcdXmY47NZ+S6gieRO3GBNO+NE=; b=ra+IZlnTeZuGor3QALwTrXCGHu3XRhuKQehe8SiVUGoLVMVNnQHzGsA7nijKZMVTpt aRF2ivZaWq8kfUvyYjEmVEMMPmw8YbY/QsafHUPVxjIUrO1yMWqbxfR8054syDEX9/Nv jRRmMVrouXNZ8yR1SRTD10LXI82Z5daHzOCyEcVLwqr3xNTGQXA8EYr1ozoexkwG7F0X pTRiQpWIbVsv+rs5OW0zJNOc7Rr4BM9dO8xcHetvWFrQ7/u9oxD8SSOUFCYuYVIXaxEe Sbh4HUwpvVNnAEbTmWS9wIFI274sgXyS+Ftaour/y8MIypsyNxghWU88KODgCUyGJLpV fcEw==
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Sender: linux-mips-bounce@linux-mips.org
From: David Daney <david.daney@cavium.com>

With CONFIG_TRANSPARENT_HUGEPAGE=y and CONFIG_HUGETLBFS=y we get the
following build failure:
.
.
.
  CC      mm/huge_memory.o
mm/huge_memory.c: In function 'set_huge_zero_page':
mm/huge_memory.c:780:2: error: implicit declaration of function 'pfn_pmd' 
[-Werror=implicit-function-declaration]
mm/huge_memory.c:780:8: error: incompatible types when assigning to type 
'pmd_t' from type 'int'
.
.
.

Add a definition of pfn_pmd() for 64-bit kernels (the only place huge
pages are currently supported).

Signed-off-by: David Daney <david.daney@cavium.com>
---

Failing v3.8-rc1 and later.  Ralf, please consider for 3.8.

 arch/mips/include/asm/pgtable-64.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/include/asm/pgtable-64.h 
b/arch/mips/include/asm/pgtable-64.h
index c631910..013d5f7 100644
--- a/arch/mips/include/asm/pgtable-64.h
+++ b/arch/mips/include/asm/pgtable-64.h
@@ -230,6 +230,7 @@ static inline void pud_clear(pud_t *pudp)
 #else
 #define pte_pfn(x)             ((unsigned long)((x).pte >> _PFN_SHIFT))
 #define pfn_pte(pfn, prot)     __pte(((pfn) << _PFN_SHIFT) | pgprot_val(prot))
+#define pfn_pmd(pfn, prot)     __pmd(((pfn) << _PFN_SHIFT) | pgprot_val(prot))
 #endif
 
 #define __pgd_offset(address)  pgd_index(address)
-- 
1.7.11.7


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] MIPS: Fix build failure by adding definition of pfn_pmd()., David Daney <=