Skip to content

Commit

Permalink
powerpc/mm: Use HPTE constants when updating hpte bits
Browse files Browse the repository at this point in the history
Even though we have same value for linux PTE bits and hash PTE pits
use the hash pte bits wen updating hash pte

Signed-off-by: Aneesh Kumar K.V <[email protected]>
Acked-by: Paul Mackerras <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
  • Loading branch information
kvaneesh authored and ozbenh committed Dec 9, 2013
1 parent 6f4441e commit 92c08a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/platforms/cell/beat_htab.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static long beat_lpar_hpte_insert(unsigned long hpte_group,
DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);

if (rflags & _PAGE_NO_CACHE)
hpte_r &= ~_PAGE_COHERENT;
hpte_r &= ~HPTE_R_M;

raw_spin_lock(&beat_htab_lock);
lpar_rc = beat_read_mask(hpte_group);
Expand Down Expand Up @@ -337,7 +337,7 @@ static long beat_lpar_hpte_insert_v3(unsigned long hpte_group,
DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);

if (rflags & _PAGE_NO_CACHE)
hpte_r &= ~_PAGE_COHERENT;
hpte_r &= ~HPTE_R_M;

/* insert into not-volted entry */
lpar_rc = beat_insert_htab_entry3(0, hpte_group, hpte_v, hpte_r,
Expand Down
3 changes: 2 additions & 1 deletion arch/powerpc/platforms/pseries/lpar.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ static long pSeries_lpar_hpte_insert(unsigned long hpte_group,

/* Make pHyp happy */
if ((rflags & _PAGE_NO_CACHE) && !(rflags & _PAGE_WRITETHRU))
hpte_r &= ~_PAGE_COHERENT;
hpte_r &= ~HPTE_R_M;

if (firmware_has_feature(FW_FEATURE_XCMO) && !(hpte_r & HPTE_R_N))
flags |= H_COALESCE_CAND;

Expand Down

0 comments on commit 92c08a0

Please sign in to comment.