Commit 06365c08 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: allow pSeries LPAR insert_pte to fail

parent 36f5a420
......@@ -349,6 +349,9 @@ int __hash_page(unsigned long ea, unsigned long access, unsigned long vsid,
}
}
if (unlikely(slot == -2))
panic("hash_page: pte_insert failed\n");
pte_val(new_pte) |= (slot<<12) & _PAGE_GROUP_IX;
/*
......
......@@ -460,8 +460,13 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group,
if (lpar_rc == H_PTEG_Full)
return -1;
/*
* Since we try and ioremap PHBs we dont own, the pte insert
* will fail. However we must catch the failure in hash_page
* or we will loop forever, so return -2 in this case.
*/
if (lpar_rc != H_Success)
panic("Bad return code from pte enter rc = %lx\n", lpar_rc);
return -2;
return slot;
}
......
......@@ -233,6 +233,7 @@ static void map_io_page(unsigned long ea, unsigned long pa, int flags)
hpteg = ((hash & htab_data.htab_hash_mask)*HPTES_PER_GROUP);
/* Panic if a pte grpup is full */
if (ppc_md.hpte_insert(hpteg, va, pa >> PAGE_SHIFT, 0,
_PAGE_NO_CACHE|_PAGE_GUARDED|PP_RWXX,
1, 0) == -1) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment