From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Print the condition causing GEM_BUG_ON
Date: Mon, 16 Oct 2017 18:42:15 +0300 [thread overview]
Message-ID: <1508168535.3000.9.camel@linux.intel.com> (raw)
In-Reply-To: <20171016152623.1177-1-mika.kuoppala@linux.intel.com>
On Mon, 2017-10-16 at 18:26 +0300, Mika Kuoppala wrote:
> It is easier to categorize and debug bugs if the failed condition
> is in plain sight in the actual dmesg output. Make it so.
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
<SNIP>
That's one off my TODO list. This would make life easier for CI people.
> @@ -28,7 +28,10 @@
> #include <linux/bug.h>
>
> #ifdef CONFIG_DRM_I915_DEBUG_GEM
> -#define GEM_BUG_ON(expr) BUG_ON(expr)
> +#define GEM_BUG_ON(condition) do { if (unlikely(condition)) { \
> + printk(KERN_ERR "GEM_BUG: %s\n", __stringify(condition)); BUG(); \
> + } \
> + } while(0)
To keep style consistent with WARN_ON make it;
printk(KERN_ERR "GEM_BUG_ON(%s)\n", __stringify(condition))
Then, this is;
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-16 15:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 15:26 [PATCH] drm/i915: Print the condition causing GEM_BUG_ON Mika Kuoppala
2017-10-16 15:42 ` Joonas Lahtinen [this message]
2017-10-16 16:03 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-17 4:04 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1508168535.3000.9.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.