Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1911271ybl; Thu, 19 Dec 2019 05:08:24 -0800 (PST) X-Google-Smtp-Source: APXvYqwvtv2q8f8voLH28xv/2dYfyyLTcdCCJ3I0q3wfWXX66gKgGWUf2GvwWkPOG3kwmnxQZ94K X-Received: by 2002:aca:61c4:: with SMTP id v187mr2145917oib.8.1576760904336; Thu, 19 Dec 2019 05:08:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576760904; cv=none; d=google.com; s=arc-20160816; b=K7w4LjpRCio6dELnT6ssw78wFiiuOE+OLnDLg3/0dPGfVtezwEdml0AChiiv7uLrOu pp4mkFg5zlK/1HOOFepUk/C4h+u1vMjnmXmg5E0CHf5xdRSyQd6QwrojEcuhbXRD2DD1 T65BIgflXYDQaSvX/prK0wzIT4XVRkmelwYkeiV6fqX740JFvY+xNUfOb2/eVpJIvsV8 LmvXpN+ZTRfhIulsMQX8wd8+HOge8+q1xCw02p8ZpcOl1Z+fE2jhk3Z5C+eTD6mtcF/h iipr4JVq0CMNhezBdRW6cJZ5GhhrSM0hO/7/OW+qlVglEryn8hkilq/R3BLqJpKyF2sA mWOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Q9IeE6+mers9j/OTuTOGvwYflrrqr9t/fsIYndVowUw=; b=pRcp7sIHqGuHqoCpuIM9s4w8D6H/g/eqejw1hbPhiILcSqHhtjf9ReqVOzWnj3KN6l KtQc3wYo0T3QBfVsyEjWRpIaL3Jg4uczNdxXscPf5MU+zaKryVsKeCTmFhvzXiw/0e08 iieU8BsPeMWgLOLIX4ZJ8/tA8V3FmvcMeVs5tw5ngp+Hp/L+f9OFK3m+mzx1iVwj4wr0 NU86oBqrOSwGNHP4HTqMHYRyLdmKfRRciPHSVHXBpKRzpM/jxF6QJ223P4WUZqjH1Wcl fAYnzU/XGSGFoRYIlA43KRYIB58hLfMqnUuDImJ+FGMuWFfSgTrxYzxH+1FVX7Di30hy 3Mgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b="L3/0EauO"; 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 n25si1945095oij.175.2019.12.19.05.08.04; Thu, 19 Dec 2019 05:08:24 -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; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b="L3/0EauO"; 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 S1726858AbfLSNFb (ORCPT + 99 others); Thu, 19 Dec 2019 08:05:31 -0500 Received: from mail-io1-f67.google.com ([209.85.166.67]:46848 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726704AbfLSNFb (ORCPT ); Thu, 19 Dec 2019 08:05:31 -0500 Received: by mail-io1-f67.google.com with SMTP id t26so5630235ioi.13 for ; Thu, 19 Dec 2019 05:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Q9IeE6+mers9j/OTuTOGvwYflrrqr9t/fsIYndVowUw=; b=L3/0EauOaRXnR88vYq71/LZuB5X8fi8V4T9P7Y8BksHjUR1VmgUIyzH8N9otJVP39S C5DKgTkmjx6iGzEMHfbR28APeKZRZdwISL6Q3QH80MHdTcGvOkaNERNMASgVWec4AndB SrvMy+vxnIfJ+ByFZvfzYjNgcKIRR2PIk3IqwlOyDjXiZsHuqWHTZ4+g+eBdIEnEa/lt YmbduU7AfrJoOjtx6HrfV5PemPZtGTKDNOdWrrnXo5jj4Jm1AIaWWXGDnhRGAnMCQo2h voqeISJ0leERTeUR8Cvz+2Yo+kG/3ETbDq5dI3/vjcYZtGzG2sDr9/OY04+2JlEEyFR8 pdHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Q9IeE6+mers9j/OTuTOGvwYflrrqr9t/fsIYndVowUw=; b=bGV59Mqr5g+wTlo0NIxTqrFv7mFGT/hOIs0zIP5EQ8dqnDL/YkbE3s4Wd6q4KmB5YZ Id8IPJ5wyyCHYKvG9+EPHVMgTBFk0diTvfv/gWxlbarPCV36NePMhHCYRYzoG6lYL6UN bHhNiviJD7NriRgmAPHXkY3qNQlq7N+4uW57QSqrO0fGNMvQEkxY2fk6Rt3hiefSULBL KIQzN3DZpmByQNDdcYV2VG+vIp+BRbRFgorAsIunOs5fIoITnHO2gKQR6GNNUSEnlle3 D0c/fcwwobhO766s5QO9INlAo3CgBQrLJ9A2x7bSDQtUh53ZSQWVXof+Z1hiYseFnfBG +yrQ== X-Gm-Message-State: APjAAAWMdOyukHakIuLG59lkfsoSrFz3cWgla04qVgV1tPP7/GW2cJGH OWdFCThvPf7pMXWjIi5BJjeeKwtUaq6gjt26wMdsAw== X-Received: by 2002:a6b:fc0c:: with SMTP id r12mr5436644ioh.189.1576760730506; Thu, 19 Dec 2019 05:05:30 -0800 (PST) MIME-Version: 1.0 References: <20191204155941.17814-1-brgl@bgdev.pl> In-Reply-To: From: Bartosz Golaszewski Date: Thu, 19 Dec 2019 14:05:19 +0100 Message-ID: Subject: Re: [PATCH v2 10/11] gpiolib: add new ioctl() for monitoring changes in line info To: Andy Shevchenko Cc: Bartosz Golaszewski , Kent Gibson , Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 10 gru 2019 o 18:00 Andy Shevchenko napisa= =C5=82(a): > > > On a different note: why would endianness be an issue here? 32-bit > > variables with 64-bit alignment should still be in the same place in > > memory, right? > > With explicit padding, yes. > > > Any reason not to use __packed for this structure and not deal with > > this whole compat mess? > > Have been suggested that explicit padding is better approach. > (See my answer to Kent) > > > I also noticed that my change will only allow user-space to read one > > event at a time which seems to be a regression with regard to the > > current implementation. I probably need to address this too. > > Yes, but we have to have ABI v2 in place. Hi Andy, I was playing with some ideas for the new ABI and noticed that on 64-bit architecture the size of struct gpiochip_info is reported to be 68 bytes, not 72 as I would expect. Is implicit alignment padding not applied to a struct if there's a non-64bit-aligned 32-bit field at the end of it? Is there something I'm missing here? Bart