mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 09:44:13 +00:00
dart: Fix silent logic for dart_translate()
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
8c107bf80a
commit
c83ad3fc4d
1 changed files with 8 additions and 6 deletions
14
src/dart.c
14
src/dart.c
|
@ -628,9 +628,10 @@ static void *dart_translate_internal(dart_dev_t *dart, uintptr_t iova, int silen
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(dart->l1[ttbr][l1_index] & DART_PTE_VALID) && !silent) {
|
if (!(dart->l1[ttbr][l1_index] & DART_PTE_VALID)) {
|
||||||
printf("dart[%lx %u]: l1 translation failure %x %lx\n", dart->regs, dart->device, l1_index,
|
if (!silent)
|
||||||
iova);
|
printf("dart[%lx %u]: l1 translation failure %x %lx\n", dart->regs, dart->device,
|
||||||
|
l1_index, iova);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -638,9 +639,10 @@ static void *dart_translate_internal(dart_dev_t *dart, uintptr_t iova, int silen
|
||||||
u64 *l2 = (u64 *)(FIELD_GET(dart->params->offset_mask, dart->l1[ttbr][l1_index])
|
u64 *l2 = (u64 *)(FIELD_GET(dart->params->offset_mask, dart->l1[ttbr][l1_index])
|
||||||
<< DART_PTE_OFFSET_SHIFT);
|
<< DART_PTE_OFFSET_SHIFT);
|
||||||
|
|
||||||
if (!(l2[l2_index] & DART_PTE_VALID) && !silent) {
|
if (!(l2[l2_index] & DART_PTE_VALID)) {
|
||||||
printf("dart[%lx %u]: l2 translation failure %x:%x %lx\n", dart->regs, dart->device,
|
if (!silent)
|
||||||
l1_index, l2_index, iova);
|
printf("dart[%lx %u]: l2 translation failure %x:%x %lx\n", dart->regs, dart->device,
|
||||||
|
l1_index, l2_index, iova);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue