OK, according to https://www.kernel.org/doc/Documentation/memory-barriers.txt, SLEEP AND WAKE-UP FUNCTIONS sections implies that.

Will respin the patch.

Andrey


On 06/20/2018 11:02 AM, Andrey Grodzovsky wrote:

Are you referring to insert_work->smp_mb(); ?

Andrey


On 06/20/2018 10:50 AM, Christian König wrote:
+     * Try to submit work so SQ_EDC_INFO can be accessed from
+     * BH. If previous work submission hasn't finished yet
+     * just print whatever info is possible directly from the ISR.
+     */
+    if (work_pending(&adev->gfx.sq_work.work)) {
+        gfx_v8_0_parse_sq_irq(adev, ih_data);
+    } else {
+        adev->gfx.sq_work.ih_data = ih_data;
+        /* Verify the new value visible in BH handler */
+        smp_wmb();

You can drop the barrier here and in gfx_v8_0_sq_irq_work_func(), the schedule_work() function is a barrier itself for both reads and writes anyway.

Apart from that the both patches are Acked-by: Christian König <[email protected]>.

Regards,
Christian.


_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to