mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-21 22:23:05 +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;
|
||||
}
|
||||
|
||||
if (!(dart->l1[ttbr][l1_index] & DART_PTE_VALID) && !silent) {
|
||||
printf("dart[%lx %u]: l1 translation failure %x %lx\n", dart->regs, dart->device, l1_index,
|
||||
iova);
|
||||
if (!(dart->l1[ttbr][l1_index] & DART_PTE_VALID)) {
|
||||
if (!silent)
|
||||
printf("dart[%lx %u]: l1 translation failure %x %lx\n", dart->regs, dart->device,
|
||||
l1_index, iova);
|
||||
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])
|
||||
<< DART_PTE_OFFSET_SHIFT);
|
||||
|
||||
if (!(l2[l2_index] & DART_PTE_VALID) && !silent) {
|
||||
printf("dart[%lx %u]: l2 translation failure %x:%x %lx\n", dart->regs, dart->device,
|
||||
l1_index, l2_index, iova);
|
||||
if (!(l2[l2_index] & DART_PTE_VALID)) {
|
||||
if (!silent)
|
||||
printf("dart[%lx %u]: l2 translation failure %x:%x %lx\n", dart->regs, dart->device,
|
||||
l1_index, l2_index, iova);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue