Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298841
b: refs/heads/master
c: 12400f1
h: refs/heads/master
i:
  298839: c684daa
v: v3
  • Loading branch information
Chris Metcalf committed Apr 2, 2012
1 parent 4420c95 commit 4a37da6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 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: 48292738d06d7b46d861652ef59bd03be931c2c9
refs/heads/master: 12400f1f22ad7651efa1d3d06dd8b6b178d19ea3
16 changes: 12 additions & 4 deletions trunk/arch/tile/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,18 @@ void __set_pte(pte_t *ptep, pte_t pte)

void set_pte(pte_t *ptep, pte_t pte)
{
struct page *page = pfn_to_page(pte_pfn(pte));

/* Update the home of a PTE if necessary */
pte = pte_set_home(pte, page_home(page));
if (pte_present(pte) &&
(!CHIP_HAS_MMIO() || hv_pte_get_mode(pte) != HV_PTE_MODE_MMIO)) {
/* The PTE actually references physical memory. */
unsigned long pfn = pte_pfn(pte);
if (pfn_valid(pfn)) {
/* Update the home of the PTE from the struct page. */
pte = pte_set_home(pte, page_home(pfn_to_page(pfn)));
} else if (hv_pte_get_mode(pte) == 0) {
/* remap_pfn_range(), etc, must supply PTE mode. */
panic("set_pte(): out-of-range PFN and mode 0\n");
}
}

__set_pte(ptep, pte);
}
Expand Down

0 comments on commit 4a37da6

Please sign in to comment.