Skip to contentSkip to conversation

drm/nouveau: make sure ret is initialized in nouveau_ttm_io_mem_reserve

PATCH New Sasha Levin 1 participant 2 messages Dec 12, 2020

Subsystems (3)
lore
Share & tools
lore

Sasha Levin

author maintainer
#0 lore raw

PATCH 1/2 drm/nouveau: make sure ret is initialized in nouveau_ttm_io_mem_reserve

From: Christian König <[email protected]>

[ Upstream commit aea656b0d05ec5b8ed5beb2f94c4dd42ea834e9d ]

This wasn't initialized for pre NV50 hardware.

---
 drivers/gpu/drm/nouveau/nouveau_bo.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/nouveau/nouveau_bo.c +1 -0
index 78f520d05de92..3801abe8e6d41 100644
@@ -1395,6 +1395,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
 			nvkm_vm_map(&node->bar_vma, node);
 			mem->bus.offset = node->bar_vma.offset;
 		}
+		ret = 0;
 		break;
 	default:
 		return -EINVAL;
Signature · 6 lines
2.27.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#1 lore raw

PATCH 2/2 dm table: Remove BUG_ON(in_interrupt())

From: Thomas Gleixner <[email protected]>

[ Upstream commit e7b624183d921b49ef0a96329f21647d38865ee9 ]

The BUG_ON(in_interrupt()) in dm_table_event() is a historic leftover from a rework of the dm table code which changed the calling context.

Issuing a BUG for a wrong calling context is frowned upon and in_interrupt() is deprecated and only covering parts of the wrong contexts. The sanity check for the context is covered by CONFIG_DEBUG_ATOMIC_SLEEP and other debug facilities already.

---
 drivers/md/dm-table.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/md/dm-table.c +0 -6
index 466158d06ab1b..8eed39dc2036a 100644
@@ -1154,12 +1154,6 @@ void dm_table_event_callback(struct dm_table *t,
 
 void dm_table_event(struct dm_table *t)
 {
-	/*
-	 * You can no longer call dm_table_event() from interrupt
-	 * context, use a bottom half instead.
-	 */
-	BUG_ON(in_interrupt());
-
 	mutex_lock(&_event_lock);
 	if (t->event_fn)
 		t->event_fn(t->event_context);
Signature · 7 lines
2.27.0


--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel