Commit ec884f74 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/fifo/gf100-: recover from host mmu faults

This has been on the TODO list for a while now, recovering from things
such as attempting to execute a push buffer or touch a semaphore in an
unmapped memory area.

The only thing required on the HW side here is that the offending
channel is removed from the runlist, and *not* a full reset of PFIFO.

This used to be a bit messier to handle before the rework to make use
of engine topology info, but is apparently now trivial.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent a8f6cb7b
...@@ -180,7 +180,8 @@ gf100_fifo_recover(struct gf100_fifo *fifo, struct nvkm_engine *engine, ...@@ -180,7 +180,8 @@ gf100_fifo_recover(struct gf100_fifo *fifo, struct nvkm_engine *engine,
list_del_init(&chan->head); list_del_init(&chan->head);
chan->killed = true; chan->killed = true;
fifo->recover.mask |= 1ULL << engine->subdev.index; if (engine != &fifo->base.engine)
fifo->recover.mask |= 1ULL << engine->subdev.index;
schedule_work(&fifo->recover.work); schedule_work(&fifo->recover.work);
} }
......
...@@ -743,14 +743,14 @@ gk104_fifo_fault_engine[] = { ...@@ -743,14 +743,14 @@ gk104_fifo_fault_engine[] = {
{ 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR }, { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },
{ 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM }, { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
{ 0x06, "SCHED" }, { 0x06, "SCHED" },
{ 0x07, "HOST0" }, { 0x07, "HOST0", NULL, NVKM_ENGINE_FIFO },
{ 0x08, "HOST1" }, { 0x08, "HOST1", NULL, NVKM_ENGINE_FIFO },
{ 0x09, "HOST2" }, { 0x09, "HOST2", NULL, NVKM_ENGINE_FIFO },
{ 0x0a, "HOST3" }, { 0x0a, "HOST3", NULL, NVKM_ENGINE_FIFO },
{ 0x0b, "HOST4" }, { 0x0b, "HOST4", NULL, NVKM_ENGINE_FIFO },
{ 0x0c, "HOST5" }, { 0x0c, "HOST5", NULL, NVKM_ENGINE_FIFO },
{ 0x0d, "HOST6" }, { 0x0d, "HOST6", NULL, NVKM_ENGINE_FIFO },
{ 0x0e, "HOST7" }, { 0x0e, "HOST7", NULL, NVKM_ENGINE_FIFO },
{ 0x0f, "HOSTSR" }, { 0x0f, "HOSTSR" },
{ 0x10, "MSVLD", NULL, NVKM_ENGINE_MSVLD }, { 0x10, "MSVLD", NULL, NVKM_ENGINE_MSVLD },
{ 0x11, "MSPPP", NULL, NVKM_ENGINE_MSPPP }, { 0x11, "MSPPP", NULL, NVKM_ENGINE_MSPPP },
......
...@@ -32,14 +32,14 @@ gm107_fifo_fault_engine[] = { ...@@ -32,14 +32,14 @@ gm107_fifo_fault_engine[] = {
{ 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR }, { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },
{ 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM }, { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
{ 0x06, "SCHED" }, { 0x06, "SCHED" },
{ 0x07, "HOST0" }, { 0x07, "HOST0", NULL, NVKM_ENGINE_FIFO },
{ 0x08, "HOST1" }, { 0x08, "HOST1", NULL, NVKM_ENGINE_FIFO },
{ 0x09, "HOST2" }, { 0x09, "HOST2", NULL, NVKM_ENGINE_FIFO },
{ 0x0a, "HOST3" }, { 0x0a, "HOST3", NULL, NVKM_ENGINE_FIFO },
{ 0x0b, "HOST4" }, { 0x0b, "HOST4", NULL, NVKM_ENGINE_FIFO },
{ 0x0c, "HOST5" }, { 0x0c, "HOST5", NULL, NVKM_ENGINE_FIFO },
{ 0x0d, "HOST6" }, { 0x0d, "HOST6", NULL, NVKM_ENGINE_FIFO },
{ 0x0e, "HOST7" }, { 0x0e, "HOST7", NULL, NVKM_ENGINE_FIFO },
{ 0x0f, "HOSTSR" }, { 0x0f, "HOSTSR" },
{ 0x13, "PERF" }, { 0x13, "PERF" },
{ 0x17, "PMU" }, { 0x17, "PMU" },
......
...@@ -30,17 +30,17 @@ gp100_fifo_fault_engine[] = { ...@@ -30,17 +30,17 @@ gp100_fifo_fault_engine[] = {
{ 0x03, "IFB", NULL, NVKM_ENGINE_IFB }, { 0x03, "IFB", NULL, NVKM_ENGINE_IFB },
{ 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR }, { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },
{ 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM }, { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
{ 0x06, "HOST0" }, { 0x06, "HOST0", NULL, NVKM_ENGINE_FIFO },
{ 0x07, "HOST1" }, { 0x07, "HOST1", NULL, NVKM_ENGINE_FIFO },
{ 0x08, "HOST2" }, { 0x08, "HOST2", NULL, NVKM_ENGINE_FIFO },
{ 0x09, "HOST3" }, { 0x09, "HOST3", NULL, NVKM_ENGINE_FIFO },
{ 0x0a, "HOST4" }, { 0x0a, "HOST4", NULL, NVKM_ENGINE_FIFO },
{ 0x0b, "HOST5" }, { 0x0b, "HOST5", NULL, NVKM_ENGINE_FIFO },
{ 0x0c, "HOST6" }, { 0x0c, "HOST6", NULL, NVKM_ENGINE_FIFO },
{ 0x0d, "HOST7" }, { 0x0d, "HOST7", NULL, NVKM_ENGINE_FIFO },
{ 0x0e, "HOST8" }, { 0x0e, "HOST8", NULL, NVKM_ENGINE_FIFO },
{ 0x0f, "HOST9" }, { 0x0f, "HOST9", NULL, NVKM_ENGINE_FIFO },
{ 0x10, "HOST10" }, { 0x10, "HOST10", NULL, NVKM_ENGINE_FIFO },
{ 0x13, "PERF" }, { 0x13, "PERF" },
{ 0x17, "PMU" }, { 0x17, "PMU" },
{ 0x18, "PTP" }, { 0x18, "PTP" },
......
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