diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-02 12:48:07 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-02 12:48:07 -0700 |
commit | 23344cb341902f4e3431d8137dca93d6e186d054 (patch) | |
tree | 2a0e443ade173b80cb0df261f4b2d66f79b9270e /arch/sparc64/mm/hugetlbpage.c | |
parent | bacd3add087770333bdce65cd3dd25e3b2cd67ac (diff) | |
parent | 289eee6fa78e999208120c856ef3ae5a817fd59c (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC]: Wire up sys_sync_file_range() into syscall tables.
[SPARC]: Wire up sys_splice() into the syscall tables.
[SPARC64]: Update defconfig.
[SPARC64]: Align address in huge_pte_alloc().
[SPARC64]: Document the instruction checks we do in do_sparc64_fault().
[SPARC64]: Make tsb_sync() mm comparison more precise.
Diffstat (limited to 'arch/sparc64/mm/hugetlbpage.c')
-rw-r--r-- | arch/sparc64/mm/hugetlbpage.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c index 074620d413d..fbbbebbad8a 100644 --- a/arch/sparc64/mm/hugetlbpage.c +++ b/arch/sparc64/mm/hugetlbpage.c @@ -198,6 +198,13 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) 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) { |