[2/2] drm/i915: Print caller when tainting for CI
diff mbox series

Message ID 20200706104953.139261-2-michal@hardline.pl
State New
Headers show
Series
  • [v2,1/2] drm/i915: Reboot CI if we get wedged during driver init
Related show

Commit Message

Michał Winiarski July 6, 2020, 10:49 a.m. UTC
We can add taint from multiple places, printing the caller allows us to
have a better overview of what exactly caused us to do the tainting.

Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
---
 drivers/gpu/drm/i915/i915_utils.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Chris Wilson July 6, 2020, 11:08 a.m. UTC | #1
Quoting Michał Winiarski (2020-07-06 11:49:53)
> We can add taint from multiple places, printing the caller allows us to
> have a better overview of what exactly caused us to do the tainting.
> 
> Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_utils.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
> index 03a73d2bd50d..1ed5c47eae8f 100644
> --- a/drivers/gpu/drm/i915/i915_utils.h
> +++ b/drivers/gpu/drm/i915/i915_utils.h
> @@ -444,6 +444,7 @@ static inline void add_taint_for_CI(unsigned int taint)
>          * CI checks the taint state after every test and will reboot
>          * the machine if the kernel is tainted.
>          */
> +       pr_info("CI taint: %ps\n", __builtin_return_address(0));

pr_note("CI tainted:%x by %ps\n", taint, __builtin_return_address(0));

Though if we are adding a message here, we probably should pass in the
i915 so we can declare which device caused the taint.
-Chris

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
index 03a73d2bd50d..1ed5c47eae8f 100644
--- a/drivers/gpu/drm/i915/i915_utils.h
+++ b/drivers/gpu/drm/i915/i915_utils.h
@@ -444,6 +444,7 @@  static inline void add_taint_for_CI(unsigned int taint)
 	 * CI checks the taint state after every test and will reboot
 	 * the machine if the kernel is tainted.
 	 */
+	pr_info("CI taint: %ps\n", __builtin_return_address(0));
 	add_taint(taint, LOCKDEP_STILL_OK);
 }