Skip to contentSkip to conversation

drm/nouveau: inline nv_printk into nv_assert

PATCH In review Marcin Slusarz 2 participants 2 messages Sep 12, 2012 – Sep 14, 2012 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau: inline nv_printk into nv_assert

nv_object uses nv_assert, nv_assert uses nv_printk and nv_printk uses nv_object - which leads to recursion:

drivers/gpu/drm/nouveau/core/include/core/object.h:31:1: sorry, unimplemented:
inlining failed in call to ‘nv_object.constprop.0’: recursive inlining

As nv_object call from nv_assert is not needed (object is always NULL), inline nv_printk into nv_assert.

It would be good to fold it into commit which introduced logging macros because it breaks bisection.

---
 drivers/gpu/drm/nouveau/core/include/core/printk.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/core/include/core/printk.h +2 -1
index 7deeae2..89eba02 100644
@@ -37,7 +37,8 @@ bool nv_printk_enabled_(struct nouveau_object *object, int level);
 #define nv_spam(o,f,a...) nv_printk((o), SPAM, f, ##a)
 
 #define nv_assert(f,a...) do {                                                 \
-	nv_printk(NULL, FATAL, f "\n", ##a);                                   \
+	if (NV_DBG_FATAL <= CONFIG_NOUVEAU_DEBUG)                              \
+		nv_printk_(NULL, NV_PRINTK_FATAL, NV_DBG_FATAL, f "\n", ##a);  \
 	BUG_ON(1);                                                             \
 } while(0)
 
Signature · 6 lines
1.7.12

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 11 lines · Marcin Slusarz

nv_object uses nv_assert, nv_assert uses nv_printk and nv_printk uses nv_object - which leads to recursion:

drivers/gpu/drm/nouveau/core/include/core/object.h:31:1: sorry, unimplemented:
inlining failed in call to ‘nv_object.constprop.0’: recursive inlining

As nv_object call from nv_assert is not needed (object is always NULL), inline nv_printk into nv_assert.

It would be good to fold it into commit which introduced logging macros because it breaks bisection.

Thanks, squashed into the relevant commit.

Quoted 23 lines
---
 drivers/gpu/drm/nouveau/core/include/core/printk.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/core/include/core/printk.h +2 -1
index 7deeae2..89eba02 100644
@@ -37,7 +37,8 @@ bool nv_printk_enabled_(struct nouveau_object *object, int level);
 #define nv_spam(o,f,a...) nv_printk((o), SPAM, f, ##a)
 
 #define nv_assert(f,a...) do {                                                 \
-	nv_printk(NULL, FATAL, f "\n", ##a);                                   \
+	if (NV_DBG_FATAL <= CONFIG_NOUVEAU_DEBUG)                              \
+		nv_printk_(NULL, NV_PRINTK_FATAL, NV_DBG_FATAL, f "\n", ##a);  \
 	BUG_ON(1);                                                             \
 } while(0)
 
Signature · 1 line
1.7.12

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau