Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp676953rwo; Wed, 2 Aug 2023 02:16:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlES91xIEx8ktXO7UnJKg8JuRrnsOAmn3PINzNRsnS7/EPiXiQrtZ2diKJNNuUczYg+xZdOn X-Received: by 2002:a17:903:32c2:b0:1bc:ae0:9d76 with SMTP id i2-20020a17090332c200b001bc0ae09d76mr8941708plr.20.1690967766804; Wed, 02 Aug 2023 02:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690967766; cv=none; d=google.com; s=arc-20160816; b=kDj5VwupqwSv6rKrEjrN2zZpn+kA5Dkca6BVS7Kwq+tBzhZJbEin19Db8Iy1qawre1 T4viqVILngC1yVY9XakU3XpBWzVl0F03PYGEcBa2hZHBxG2w0BKpDL2BqbypEGHMU3F1 Yjkp59BB/UowFlCXpVLnZTFdKOYb8WUo8wp3Ud6Y9SX11ZGl4DbQnmLr0kXCeM89lDeD qUGChQoJUGnhF/50Q7ql8UEhpmmMtxg+wNaZzvdqB8sR5iJ1Ve9YxjRf6ETkkHf9rrXH ZH1YCR7mlIzJBgrvS1dw679h2UiNhxbu8SMp9Mw0YWNoKUpp0JS8wumbqgRMye0ofU2Y RA6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=nwhyDlk6TAwpAhBI3YFnIgFq7eJSx5UC/NeXeHfryAk=; fh=VrhkW1Ox5N0nrgkclpQZIOw/AcTVncwPXEOLt3/nqQw=; b=Ma18W6dcjRk6qVNcveoFi1VVQhLtUCZhB5tjeKoBCvY7ehzb9QSnvA/LbdvDKwaJyk RATZi7xEjwlQ5aQO55OKHD9Sc02MKKChuxd4i2lAYpiVCtgw1HydrZVeBh/ryY/6xP0W qPTfu/UxM82/5WN7cxvRyCWYtdY2QWum2skJAbFAmm0cxPm7SbuuLrUIk/LSa2okkWvf e4puVtJZLNvPr6BUMqpUuginlWPZdSpY0QRNbXVk+PrnC14E04L6QhmgRo0M5uGfvupp qA0lXKfJj2bXqrw4SxFe8w3gubLNOksD35wvWeegQWuNYNDZL8H97MTccRtLw40EFESt /xhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=GssfvuMo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a170902650700b001bc3948d598si98952plk.448.2023.08.02.02.15.44; Wed, 02 Aug 2023 02:16:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=GssfvuMo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230338AbjHBIor (ORCPT + 99 others); Wed, 2 Aug 2023 04:44:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234046AbjHBIoe (ORCPT ); Wed, 2 Aug 2023 04:44:34 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6BDF2733 for ; Wed, 2 Aug 2023 01:44:20 -0700 (PDT) Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by madras.collabora.co.uk (Postfix) with ESMTPSA id 71AFC6601F5E; Wed, 2 Aug 2023 09:44:18 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1690965858; bh=nwhyDlk6TAwpAhBI3YFnIgFq7eJSx5UC/NeXeHfryAk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GssfvuMohyVAsC3K3gUBIXV/rDYVKejdiVwfIKe4BYGKoMOjQc4IuSHolUc4EZJ6X z7xyFKJxsH44UrdQzxLnkpo8zynVZhOzxLGH/rxhM+I1t57+ogHK+sZV4ZxBYygp3a 7wfp8mkoNfpQWMJ0NV1YagtKAOkrdqQBoqxddcz2ai+gN5HDeSCbSqEfY3pl9jEpM1 YSpsAfSU8lA+2a73zpQ2VAlwZeiohftwYsFY1miCyeIrDOWa3m9H5gnR04xfOLwjky NPU/pEIOmGbxul2ja7BsAmpLV0eFWy9hDyij5qrsv8oM//txir2CIAY55Eapj+7KIz 1oSlEZndz5mPQ== Date: Wed, 2 Aug 2023 10:44:15 +0200 From: Boris Brezillon To: Nick Desaulniers Cc: Christian =?UTF-8?B?S8O2bmln?= , maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, trix@redhat.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, naresh.kamboju@linaro.org, dakr@redhat.com Subject: Re: [PATCH 1/2] drm/exec: use unique instead of local label Message-ID: <20230802104415.7fe64b67@collabora.com> In-Reply-To: References: <20230731123625.3766-1-christian.koenig@amd.com> Organization: Collabora X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 1 Aug 2023 13:35:13 -0700 Nick Desaulniers wrote: > On Mon, Jul 31, 2023 at 5:36=E2=80=AFAM Christian K=C3=B6nig > wrote: > > > > GCC forbids to jump to labels in loop conditions and a new clang > > check stumbled over this. > > > > So instead using a local label inside the loop condition use an > > unique label outside of it. > > > > Fixes: commit 09593216bff1 ("drm: execution context for GEM buffers v7") > > Link: https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html > > Link: https://github.com/ClangBuiltLinux/linux/issues/1890 > > Link: https://github.com/llvm/llvm-project/commit/20219106060208f0c2f5d= 096eb3aed7b712f5067 > > Reported-by: Nathan Chancellor > > Reported-by: Naresh Kamboju > > CC: Boris Brezillon > > Signed-off-by: Christian K=C3=B6nig =20 >=20 > Works for me; thanks for the patch! > Reviewed-by: Nick Desaulniers >=20 > I suspect it's possible to change the indirect goto into a direct goto > with some further refactoring (macros can take block statements; if > drm_exec_until_all_locked accepted a block statement arg then you > could introduce a new scope, and a new local label to that scope, then > just use direct goto), Maybe I'm wrong, but this sounds like the version I proposed here [1]. > but this will probably apply cleaner. (oh, is > 09593216bff1 only in next at the moment? The AuthorDate threw me.) >=20 > There are some curious cases where __attribute__((cleanup())) doesn't > mesh well with indirect gotos. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D37722 >=20 > May not ever be a problem here... [1]https://patchwork.freedesktop.org/patch/543077/