mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-27 00:40:17 +00:00
hv_vm: Fix bad asserts
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
e9aa876d12
commit
1a5ba2c67e
1 changed files with 1 additions and 2 deletions
|
@ -122,7 +122,7 @@ static void hv_pt_free_l3(u64 *l3)
|
||||||
static void hv_pt_map_l2(u64 from, u64 to, u64 size, u64 incr)
|
static void hv_pt_map_l2(u64 from, u64 to, u64 size, u64 incr)
|
||||||
{
|
{
|
||||||
assert((from & MASK(VADDR_L2_OFFSET_BITS)) == 0);
|
assert((from & MASK(VADDR_L2_OFFSET_BITS)) == 0);
|
||||||
assert((IS_SW(to) || to & PTE_TARGET_MASK & MASK(VADDR_L2_OFFSET_BITS)) == 0);
|
assert(IS_SW(to) || (to & PTE_TARGET_MASK & MASK(VADDR_L2_OFFSET_BITS)) == 0);
|
||||||
assert((size & MASK(VADDR_L2_OFFSET_BITS)) == 0);
|
assert((size & MASK(VADDR_L2_OFFSET_BITS)) == 0);
|
||||||
|
|
||||||
to |= FIELD_PREP(PTE_TYPE, PTE_BLOCK);
|
to |= FIELD_PREP(PTE_TYPE, PTE_BLOCK);
|
||||||
|
@ -512,7 +512,6 @@ bool hv_handle_dabort(u64 *regs)
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(IS_SW(pte));
|
assert(IS_SW(pte));
|
||||||
assert(FIELD_GET(PTE_TYPE, pte) == PTE_PAGE);
|
|
||||||
|
|
||||||
u64 target = pte & PTE_TARGET_MASK_L4;
|
u64 target = pte & PTE_TARGET_MASK_L4;
|
||||||
u64 paddr = target | (far & MASK(VADDR_L4_OFFSET_BITS));
|
u64 paddr = target | (far & MASK(VADDR_L4_OFFSET_BITS));
|
||||||
|
|
Loading…
Reference in a new issue