mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 19:16:41 +07:00
drm/panfrost: Don't try to map on error faults
If the exception type isn't a translation fault, don't try to map and
instead go straight to a terminal fault.
Otherwise, we can get flooded by kernel warnings and further faults.
Fixes: 187d292920
("drm/panfrost: Add support for GPU heap allocations")
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200212202236.13095-1-robh@kernel.org
This commit is contained in:
parent
fbb30168c7
commit
eb9d8ddbc1
@ -601,33 +601,27 @@ static irqreturn_t panfrost_mmu_irq_handler_thread(int irq, void *data)
|
|||||||
source_id = (fault_status >> 16);
|
source_id = (fault_status >> 16);
|
||||||
|
|
||||||
/* Page fault only */
|
/* Page fault only */
|
||||||
if ((status & mask) == BIT(i)) {
|
ret = -1;
|
||||||
WARN_ON(exception_type < 0xC1 || exception_type > 0xC4);
|
if ((status & mask) == BIT(i) && (exception_type & 0xF8) == 0xC0)
|
||||||
|
|
||||||
ret = panfrost_mmu_map_fault_addr(pfdev, i, addr);
|
ret = panfrost_mmu_map_fault_addr(pfdev, i, addr);
|
||||||
if (!ret) {
|
|
||||||
mmu_write(pfdev, MMU_INT_CLEAR, BIT(i));
|
|
||||||
status &= ~mask;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* terminal fault, print info about the fault */
|
if (ret)
|
||||||
dev_err(pfdev->dev,
|
/* terminal fault, print info about the fault */
|
||||||
"Unhandled Page fault in AS%d at VA 0x%016llX\n"
|
dev_err(pfdev->dev,
|
||||||
"Reason: %s\n"
|
"Unhandled Page fault in AS%d at VA 0x%016llX\n"
|
||||||
"raw fault status: 0x%X\n"
|
"Reason: %s\n"
|
||||||
"decoded fault status: %s\n"
|
"raw fault status: 0x%X\n"
|
||||||
"exception type 0x%X: %s\n"
|
"decoded fault status: %s\n"
|
||||||
"access type 0x%X: %s\n"
|
"exception type 0x%X: %s\n"
|
||||||
"source id 0x%X\n",
|
"access type 0x%X: %s\n"
|
||||||
i, addr,
|
"source id 0x%X\n",
|
||||||
"TODO",
|
i, addr,
|
||||||
fault_status,
|
"TODO",
|
||||||
(fault_status & (1 << 10) ? "DECODER FAULT" : "SLAVE FAULT"),
|
fault_status,
|
||||||
exception_type, panfrost_exception_name(pfdev, exception_type),
|
(fault_status & (1 << 10) ? "DECODER FAULT" : "SLAVE FAULT"),
|
||||||
access_type, access_type_name(pfdev, fault_status),
|
exception_type, panfrost_exception_name(pfdev, exception_type),
|
||||||
source_id);
|
access_type, access_type_name(pfdev, fault_status),
|
||||||
|
source_id);
|
||||||
|
|
||||||
mmu_write(pfdev, MMU_INT_CLEAR, mask);
|
mmu_write(pfdev, MMU_INT_CLEAR, mask);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user