Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305253
b: refs/heads/master
c: 4de5185
h: refs/heads/master
i:
  305251: bd9653c
v: v3
  • Loading branch information
Paul Mundt committed May 14, 2012
1 parent b15298d commit e929848
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c06fd28387a3da2cc4763f7f471f735ccdd61b88
refs/heads/master: 4de5185629f44942f60e2fd536709ef31bd5a9c1
2 changes: 1 addition & 1 deletion trunk/arch/sh/kernel/cpu/sh5/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ tlb_miss:
/* If the fast path handler fixed the fault, just drop through quickly
to the restore code right away to return to the excepting context.
*/
beqi/u r2, 0, tr1
bnei/u r2, 0, tr1

fast_tlb_miss_restore:
ld.q SP, SAVED_TR0, r2
Expand Down
36 changes: 18 additions & 18 deletions trunk/arch/sh/mm/tlbex_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,23 @@ static int handle_vmalloc_fault(struct mm_struct *mm,

pud = pud_offset(dir, address);
if (pud_none_or_clear_bad(pud))
return 0;
return 1;

pmd = pmd_offset(pud, address);
if (pmd_none_or_clear_bad(pmd))
return 0;
return 1;

pte = pte_offset_kernel(pmd, address);
entry = *pte;

if (pte_none(entry) || !pte_present(entry))
return 0;
return 1;
if ((pte_val(entry) & protection_flags) != protection_flags)
return 0;
return 1;

update_mmu_cache(NULL, address, pte);

return 1;
return 0;
}

static int handle_tlbmiss(struct mm_struct *mm,
Expand All @@ -94,27 +94,27 @@ static int handle_tlbmiss(struct mm_struct *mm,
the next test is necessary. - RPC */
if (address >= (unsigned long) TASK_SIZE)
/* upper half - never has page table entries. */
return 0;
return 1;

dir = pgd_offset(mm, address);
if (pgd_none(*dir) || !pgd_present(*dir))
return 0;
return 1;
if (!pgd_present(*dir))
return 0;
return 1;

pud = pud_offset(dir, address);
if (pud_none(*pud) || !pud_present(*pud))
return 0;
return 1;

pmd = pmd_offset(pud, address);
if (pmd_none(*pmd) || !pmd_present(*pmd))
return 0;
return 1;

pte = pte_offset_kernel(pmd, address);
entry = *pte;

if (pte_none(entry) || !pte_present(entry))
return 0;
return 1;

/*
* If the page doesn't have sufficient protection bits set to
Expand All @@ -123,11 +123,11 @@ static int handle_tlbmiss(struct mm_struct *mm,
* handler.
*/
if ((pte_val(entry) & protection_flags) != protection_flags)
return 0;
return 1;

update_mmu_cache(NULL, address, pte);

return 1;
return 0;
}

/*
Expand Down Expand Up @@ -214,12 +214,12 @@ asmlinkage int do_fast_page_fault(unsigned long long ssr_md,
* Process-contexts can never have this address
* range mapped
*/
if (handle_vmalloc_fault(mm, protection_flags, address))
return 1;
if (handle_vmalloc_fault(mm, protection_flags, address) == 0)
return 0;
} else if (!in_interrupt() && mm) {
if (handle_tlbmiss(mm, protection_flags, address))
return 1;
if (handle_tlbmiss(mm, protection_flags, address) == 0)
return 0;
}

return 0;
return 1;
}

0 comments on commit e929848

Please sign in to comment.