Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1110005imm; Fri, 8 Jun 2018 10:08:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLBKnewsl1vWiIG1S9M8PpPii8HvENWbHz6fySoaAJniHWrLq0XkRLkwBBmM175PjnmmrYM X-Received: by 2002:a63:384c:: with SMTP id h12-v6mr2463547pgn.230.1528477739033; Fri, 08 Jun 2018 10:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528477739; cv=none; d=google.com; s=arc-20160816; b=T+d9w4i2k7T5lysm1vVqWUfqpxnThyTor9CCGtEmNIFopYHunvQCm1g1uyOq/SnKBt azntfI+7j3eEBxL0spmcDDG2iUzKB1dWRbsXOWPYCpeEwZQGl2wcF2Ii7sXkKmgOVmZ/ tU7JZ6qN3zEgJPoKOI/lETuhwYni2HVnKDNKlfNK5eETGKY+SlaxxsmQiP+XW8kS1tUf jU1cEAG95haFGj4d56+sID2wC/9A4QdAyJCbcewa2FAXo38DJW3rP0yvX7e8Rjjspasq HaanQRXIzQbGcXwPPPVC105ASooUXBR4Sq5/aZ/faG5z/px8zwWaffgaZVK9zlEHeloN 0ZQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from :arc-authentication-results; bh=abS8D8uu2/bXbW1XGBlibUAeye4sM1N4j3FtMZsHTHc=; b=kBgmX2DJljtbDdHjy5hd3EVHyVljk0MnlDtYMM1CvNUHN0DoqV1+d5V8ZCTZhDRKIf +MH/cMvNPUP+Vlm9ZNEukgCNq608ge8iaITUoTmvnCpqorFSMcAdgSKChlPURlcSI08p Fl9H4htO3SlrRx7l05iC6l/B7aoRq5JwvU/3AJel6aiN3Q0vqcG3lQRh5JTIdEPeUts3 5/i06RuIeOndi43Ro3dXzUm4p2anw0thXyEywZoA6XOHtMot9eRA9x+nRgX5TY3AY/kj YRCyPKNtz/q0GTviiCE7dAvtqbQw2XSwy6g/kBnI5SZtsLlS1L/uJwj2prVlBT2fICOR rFuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11-v6si33634300pll.255.2018.06.08.10.08.44; Fri, 08 Jun 2018 10:08:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752863AbeFHRII (ORCPT + 99 others); Fri, 8 Jun 2018 13:08:08 -0400 Received: from anholt.net ([50.246.234.109]:40140 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752411AbeFHRIF (ORCPT ); Fri, 8 Jun 2018 13:08:05 -0400 Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id D4FE910A1860; Fri, 8 Jun 2018 10:08:04 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at anholt.net Received: from anholt.net ([127.0.0.1]) by localhost (kingsolver.anholt.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ImP5RkL9H6_f; Fri, 8 Jun 2018 10:08:03 -0700 (PDT) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id B502710A01F9; Fri, 8 Jun 2018 10:08:03 -0700 (PDT) Received: by eliezer.anholt.net (Postfix, from userid 1000) id E89062FE462E; Fri, 8 Jun 2018 10:08:02 -0700 (PDT) From: Eric Anholt To: Lucas Stach , dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 3/3] drm/v3d: Add a note about locking of v3d_fence_create(). In-Reply-To: <1528453446.26356.12.camel@pengutronix.de> References: <20180605190302.18279-1-eric@anholt.net> <20180605190302.18279-3-eric@anholt.net> <1528453446.26356.12.camel@pengutronix.de> User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/25.2.2 (x86_64-pc-linux-gnu) Date: Fri, 08 Jun 2018 10:08:02 -0700 Message-ID: <87vaatxl3h.fsf@anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Lucas Stach writes: > Am Dienstag, den 05.06.2018, 12:03 -0700 schrieb Eric Anholt: >> This isn't the first time I've had to argue to myself why the '++' was >> safe. > > And now you need to do the same thing with me... > >> Signed-off-by: Eric Anholt >> --- >> =C2=A0drivers/gpu/drm/v3d/v3d_fence.c | 3 +++ >> =C2=A01 file changed, 3 insertions(+) >>=20 >> diff --git a/drivers/gpu/drm/v3d/v3d_fence.c b/drivers/gpu/drm/v3d/v3d_f= ence.c >> index bfe31a89668b..6265e9ab4a13 100644 >> --- a/drivers/gpu/drm/v3d/v3d_fence.c >> +++ b/drivers/gpu/drm/v3d/v3d_fence.c >> @@ -3,6 +3,9 @@ >> =C2=A0 >> =C2=A0#include "v3d_drv.h" >> =C2=A0 >> +/* Note that V3D fences are created during v3d_job_run(), so we're >> + * already implictly locked. >> + */ > I don't see where you would be locked in the job_run path. I think what > you mean is that this path needs no locks, as it is driven by a single > scheduler thread, right? Yeah, it's only called from run_job, and run_job can't reenter. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlsat/IACgkQtdYpNtH8 nug0mQ/+IMSetfCyvK+L46SrA8It0CnDp54NK9KeuBk/mjj6CbZG0Ej/Savq5mJN xJZSDNx6uMYSe4gpOwlfD8qzAWtXtFf3H8RJMx1ijqRet42e6v6oDHY3y3C/2LtN A4sopkjFut7hGdVvahwvR/HiVFO8SSpVPS+HPWlgRECoYAYCc1/9hnYxq+XELCK6 1ux3ekduqDcDZ/WOTNa3VY0Hr2aDFkKyTYeULkGtamh57IXso3RN7rYnuXuE29Yd T3NehonlofNVjhcHau6VEknCaki+lsQjJ5owXgL/Q61HBFMIzdXA3cK5Q2G84Rew 6Gmo9//vBUfvhg/Dt2rO8ul+N1VvLz77UTUHMdEo3FdfaKGSsIRY2xosBQ268RCk g48sKpw90rH3G0Wa0Dc2ycp20c9m0EJXq7rTUD7uSCDzfB3NicVONKATBRTVRw6T FtNH4FYi8HzeQS9ydK7tXVlDc4y5YUHCTIo6kbqVlwZLUXSDgZOljzBlQZWwjdc/ 9Elgs3noZeZMytbR9Kv8FYCvjgqFH6lT8MfR3XL3H3RBJxp0+ufHw7TjOy5TgCLC TGwr/aKWiQRmgBl1AtYx4Q7c+KhHWyEQ20TmCmQmlF6BMNLnQHbeRa+XaXHvzD5N W7l4ltptfQzvMFto2KMPJja8gGB94oJHsnhp9Bv+BVYWVz2wD38= =5GKX -----END PGP SIGNATURE----- --=-=-=--