projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[powerpc.git]
/
arch
/
sparc64
/
mm
/
hugetlbpage.c
diff --git
a/arch/sparc64/mm/hugetlbpage.c
b/arch/sparc64/mm/hugetlbpage.c
index
074620d
..
53b9b1f
100644
(file)
--- a/
arch/sparc64/mm/hugetlbpage.c
+++ b/
arch/sparc64/mm/hugetlbpage.c
@@
-4,7
+4,6
@@
* Copyright (C) 2002, 2003, 2006 David S. Miller (davem@davemloft.net)
*/
* Copyright (C) 2002, 2003, 2006 David S. Miller (davem@davemloft.net)
*/
-#include <linux/config.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/fs.h>
@@
-198,6
+197,13
@@
pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
pmd_t *pmd;
pte_t *pte = NULL;
pmd_t *pmd;
pte_t *pte = NULL;
+ /* We must align the address, because our caller will run
+ * set_huge_pte_at() on whatever we return, which writes out
+ * all of the sub-ptes for the hugepage range. So we have
+ * to give it the first such sub-pte.
+ */
+ addr &= HPAGE_MASK;
+
pgd = pgd_offset(mm, addr);
pud = pud_alloc(mm, pgd, addr);
if (pud) {
pgd = pgd_offset(mm, addr);
pud = pud_alloc(mm, pgd, addr);
if (pud) {