Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2008164imu; Tue, 6 Nov 2018 07:43:14 -0800 (PST) X-Google-Smtp-Source: AJdET5fjzOCGBeg8lxfXEDOgciFjlbvGe9O4p40Ugity3cCB3fJvSQC8u8T3HGBRsYhvMQTRWxfR X-Received: by 2002:a17:902:b70c:: with SMTP id d12-v6mr6208200pls.288.1541518994545; Tue, 06 Nov 2018 07:43:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541518994; cv=none; d=google.com; s=arc-20160816; b=HSxhOwj+fWHb/0clY8oEElZvru+2IzSz5vLfKW+U1STCxxLOGol1RbQI1UVRwqTX3Q U7aoFWQQoWSkNxtmomUS2WCnc2n0zw+NxYN4d8ef/zMimji/fWxLzD8LbImSKao9/35b 4Fybb/gVP8p30DB6BFZO6EisM49SGQThcRWEwcuA4azdOX4VKCZZFSiSKgg/cG6JwOe7 GMq0gOdQ3mHuWrmlKz70LFFx4CKkfmkifXnmNJoi8+1yTwmxZ0b/Arzj7GcdbQuVHUuB Dljq2RIM13zio9BgB4E7Elc/HAZjgYJA+QrpY53o+XrqYAeeL3aRz0ZmHISJ0zfZ8PpS trTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=ImyjAqM+H3x2+nDwFxPXJswSVuaLEIexu6hf42m2CG8=; b=ixWkFJrc4NN2/EJPk3AxsJm0kqC1JrEb3f3AQBs9IxRrfv3RpJhgwbQhe7+FPFhqiT db/qDxS9mOENkc+8D23TsANYynEMuOjzzqEUhN2uKG+VkWn2ccskJEXUfahqUtlpBKle brp8eIxS+EhiEqOrFRQ9jLnIFHpOW6NHTGjeIiCr3G6pAkGB7qoxFZ5OIY0bdQfxXrIY 0yCQZewuRG3Cu+o/UxVaJigaFDkBbesRMJ1doWnYgAqqN4PQ2dELHt7BZ2AMJv4sC31j hf2jUk4e4TjgJxUsQy07o+DdDK8jhsC5gwbSnhQNZJ/dWfmhHRvOWR6Qub/0L8/PB0cs 6e6g== 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 d3-v6si33678587plj.372.2018.11.06.07.42.47; Tue, 06 Nov 2018 07:43:14 -0800 (PST) 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 S2389095AbeKGBHK (ORCPT + 99 others); Tue, 6 Nov 2018 20:07:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:56996 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389028AbeKGBHK (ORCPT ); Tue, 6 Nov 2018 20:07:10 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id EDAC1B6D9; Tue, 6 Nov 2018 15:41:21 +0000 (UTC) Message-ID: Subject: Re: [PATCH RFC 09/18] staging: vchiq_core: do not initialize semaphores twice From: Nicolas Saenz Julienne To: Stefan Wahren Cc: linux-rpi-kernel@lists.infradead.org, eric@anholt.net, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, dave.stevenson@raspberrypi.org Date: Tue, 06 Nov 2018 16:41:19 +0100 In-Reply-To: <1781917429.4071.1540759539282@email.ionos.de> References: <20181026134813.7775-1-nsaenzjulienne@suse.de> <20181026134813.7775-10-nsaenzjulienne@suse.de> <1781917429.4071.1540759539282@email.ionos.de> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-g6M2lnxKQ+LKhTN8crRJ" User-Agent: Evolution 3.30.1 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-g6M2lnxKQ+LKhTN8crRJ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Stefan, thanks for spending the time reviewing the code. I took note of the rest of comments. On Sun, 2018-10-28 at 21:45 +0100, Stefan Wahren wrote: > Hi Nicolas, >=20 > > Nicolas Saenz Julienne hat am 26. Oktober > > 2018 um 15:48 geschrieben: > >=20 > >=20 > > vchiq_init_state() initialises a series of semaphores to then call > > remote_event_create() on the same semaphores, which initializes > > them > > again. >=20 > i would prefer to have all init stuff at one place in > vchiq_init_state() and drop this ugliness from remote_event_create() > instead. Is this possible? As I'm sure you're aware of, REMOTE_EVENT_T is shared between the CPU and VC4, which can't be expanded. And since storing a pointer is out of question because of arm64, I can only think of storing an index to an array of completions in the shared structure instead of the pointer magic implemented right now. It would be a little more explicit. Then we could completely decouple both initializations. I'm not sure if it's similar to what you had in mind.=20 On a semi-related topic, I'm curious to know why these shared structures aren't set with the "__packed" preprocessor macro. Any ideas? As fas as I've been told, in general, the compiler may reorder or add unexpected padding to any structure. Which would be very bad in this case. Regards, Nicolas --=-g6M2lnxKQ+LKhTN8crRJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAlvhth8ACgkQlfZmHno8 x/7rGQgArw68dq6qnh1Jmox2g07wWyEoyeTMI6fqkQz+XT+48Bmuhlf7iROBJTWn 2s6tLI2TNZNkZ+7Lk9MH+xM75wBLmkTtuIrX+dQ8Pz0UQB8LIThnMyHQKqe840Fb VoKBnV3KebSqNpp2oLpooPrV2D8iANvn2M3I2/fgGO/ydYdCqDR41+CJPjGGIucl gSFq4uTYI6EB/SOEpVCTYVSwGX3nYErIZs3zhF4NqXdkIwyZR7bwSvY2hS8iOar+ MZJSHa6tu9jOpsaUZ87/y8Y++EwwVAxTGnbbnN0wSZDmJiKu3qHb4gB38HLFBxov okygIpKp9AMLz7Dl4u9AQrBUaKRQYg== =MtXk -----END PGP SIGNATURE----- --=-g6M2lnxKQ+LKhTN8crRJ--