diff options
Diffstat (limited to 'arch/sparc64/mm')
-rw-r--r-- | arch/sparc64/mm/fault.c | 6 | ||||
-rw-r--r-- | arch/sparc64/mm/hugetlbpage.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c index 0db2f7d9fab5..6e002aacb961 100644 --- a/arch/sparc64/mm/fault.c +++ b/arch/sparc64/mm/fault.c | |||
@@ -327,8 +327,12 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) | |||
327 | insn = get_fault_insn(regs, 0); | 327 | insn = get_fault_insn(regs, 0); |
328 | if (!insn) | 328 | if (!insn) |
329 | goto continue_fault; | 329 | goto continue_fault; |
330 | /* All loads, stores and atomics have bits 30 and 31 both set | ||
331 | * in the instruction. Bit 21 is set in all stores, but we | ||
332 | * have to avoid prefetches which also have bit 21 set. | ||
333 | */ | ||
330 | if ((insn & 0xc0200000) == 0xc0200000 && | 334 | if ((insn & 0xc0200000) == 0xc0200000 && |
331 | (insn & 0x1780000) != 0x1680000) { | 335 | (insn & 0x01780000) != 0x01680000) { |
332 | /* Don't bother updating thread struct value, | 336 | /* Don't bother updating thread struct value, |
333 | * because update_mmu_cache only cares which tlb | 337 | * because update_mmu_cache only cares which tlb |
334 | * the access came from. | 338 | * the access came from. |
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c index 074620d413d4..fbbbebbad8a4 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) | |||
198 | pmd_t *pmd; | 198 | pmd_t *pmd; |
199 | pte_t *pte = NULL; | 199 | pte_t *pte = NULL; |
200 | 200 | ||
201 | /* We must align the address, because our caller will run | ||
202 | * set_huge_pte_at() on whatever we return, which writes out | ||
203 | * all of the sub-ptes for the hugepage range. So we have | ||
204 | * to give it the first such sub-pte. | ||
205 | */ | ||
206 | addr &= HPAGE_MASK; | ||
207 | |||
201 | pgd = pgd_offset(mm, addr); | 208 | pgd = pgd_offset(mm, addr); |
202 | pud = pud_alloc(mm, pgd, addr); | 209 | pud = pud_alloc(mm, pgd, addr); |
203 | if (pud) { | 210 | if (pud) { |