Re: [PATCH v3 3/5] drm/i915/guc: Simplify GuC doorbell logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Michał Winiarski (2017-09-14 09:32:14)
> +       /* we're not expecting the doorbell cookie to change behind our back */
> +       cookie = READ_ONCE(db->cookie);
> +       if (cmpxchg(&db->cookie, cookie, cookie + 1) != cookie)
> +               BUG();

Or just
WARN_ON_ONCE(xchg(&db->cookie, cookie + 1) != cookie);
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux