Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5631553ybl; Tue, 10 Dec 2019 09:02:23 -0800 (PST) X-Google-Smtp-Source: APXvYqw0EGg0lpH/s8BnV2kHps1n7P9mOGvQ6lTa6pELnGcwAZxaMoKEBU0plz6fxmJDC1F2TDqH X-Received: by 2002:aca:6144:: with SMTP id v65mr4567813oib.150.1575997343656; Tue, 10 Dec 2019 09:02:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575997343; cv=none; d=google.com; s=arc-20160816; b=O9TakgnUngJV/hFI8S3eV/64J+rmC6g75MOcCvIQIAmBZSA0/a6WhpA2i962P8gGOl 97076UcF+0yyi2mhsp0jbWWQHrmmMoVvB5sUCNArCuy5J1dORnvjozWIBrJmRjjozeXd mkvEzWpNcl3Yg7Q9BDkvBeaWmKV0RaQwj/YzeJ+t1whLqKT9qRsJuOohiKEeSCf5D5yK Fq35J2FhfMeDrsw2RE9octJ7NAV42ilAwhnFJhaKfjCgaYeve5k8QjuuZtXfKbuYoKis i9JpDyXppYOcqfoMO0kEx4ZLFdv62QIS36GCUGXLjUQMRqYvgFswqkif04DwfpC6i1rl WuMg== 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=ZFKlWQYzATIj8BUwTv8rG3mbBwuIfmhDJIot2BqPZBw=; b=slAQm4oCaFrlEmoR3cXHRQ2PgmW+snbWbwDey3Ae6jza+megZb3Zg5cA00+h0MI0ra Ne7d5vNe0S7dd82OJjZEr9A3Q+RwtDtGQE+ky/44agglMXUEfpyntznXEAaLg/tgbFtR UJkAt9V0amck9lVNRyGnEG03slLMmSU8wR0uwVeWZLWHnxH1OeXZ62HdPeqrJ5Ub6o+0 RMhyUINu5EnLUBCNHOUCuHo624ec1LsSqiJbwqdeIt9DBUtzheHuNy9IfRk9wby5+Jvf 5MEBOBbMWcLBDNYY1Tvt9RDm0bsCAnFKV2Px9zh8w5oyU19OYn/lz/fev8d0pZHPjiQ2 ZZvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tzeiMfMM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m8si2122801oim.180.2019.12.10.09.02.02; Tue, 10 Dec 2019 09:02:23 -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=@gmail.com header.s=20161025 header.b=tzeiMfMM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727744AbfLJRAS (ORCPT + 99 others); Tue, 10 Dec 2019 12:00:18 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:44365 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727553AbfLJRAS (ORCPT ); Tue, 10 Dec 2019 12:00:18 -0500 Received: by mail-pf1-f196.google.com with SMTP id d199so126321pfd.11; Tue, 10 Dec 2019 09:00:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ZFKlWQYzATIj8BUwTv8rG3mbBwuIfmhDJIot2BqPZBw=; b=tzeiMfMMzLH4G4Ap/oa2Ea27HLwraGIdNxL6U+vejLGkcyin0eaWiweRVL1/Oytyfw Ztzj+1RRSaUkBKWlkBoQ7J9qidN5NtBEckDjvUQK2RIOJQ+zHJ+XrSK9QYAgkNz7+k0k fVNIuPhzJXEnB8PKWy3MzQsonzEaQexJs77zKm0fdB3co85hK8z7xh+rSeztHugP5qoC LnK9McCQl1xr4VZfo/LJjpTqCikujJ5Y/xHXUERGjzMGkRt9fpmkLKN8UbGjFXcV9gRM KKMWhnm6wWg2QApf1B5dU0gb5XlgAOXPzmmFTTXHtLhzDKvmWIdPBpjThSPSDiADqzct tfog== 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=ZFKlWQYzATIj8BUwTv8rG3mbBwuIfmhDJIot2BqPZBw=; b=XOHTgTAXM9LzKNuta9cteVifgx+hyrPbj36ylVyGH+gv1BnFtw+0rJmMOujMADO+Ju hgoW8jecCIIXRy9eNraXo7yN9kv5gsy9XO3cKZ5wEmqOmX9Opf74wMlUn4UG0LGQD3w+ wcL9bAee6BSOlFQ7L8NY2glQCRd8Zf7XYCWsti34Y0JxjM9WtYC+K21Ivt0YcZeQWCWK 8JkrCUG3PTrcZI9nJZsGxI56XaQzEySXj6/owMucqLq3S/ImK6XQULl/hUMF0yOequq1 VZHpIcFPAbM+iBMKghZ9FIWzyVFiJcGT95ldzsxWvJN136wtPh5ab5WmPDTPl6GYO6De gaKg== X-Gm-Message-State: APjAAAUS7kbOTHfj94CE6E0ShtZDmcvkfZ97cuNTCYpobmXwWWSY5ZFb 4mgKa7E/Kl/x48uT3n1zgQ+AHGPQ7NEFJ2sSfo0= X-Received: by 2002:a62:7590:: with SMTP id q138mr35346746pfc.241.1575997217452; Tue, 10 Dec 2019 09:00:17 -0800 (PST) MIME-Version: 1.0 References: <20191204155941.17814-1-brgl@bgdev.pl> In-Reply-To: From: Andy Shevchenko Date: Tue, 10 Dec 2019 19:00:07 +0200 Message-ID: Subject: Re: [PATCH v2 10/11] gpiolib: add new ioctl() for monitoring changes in line info To: Bartosz Golaszewski 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 On Fri, Dec 6, 2019 at 11:20 PM Bartosz Golaszewski wrote: > czw., 5 gru 2019 o 18:02 Andy Shevchenko napi= sa=C5=82(a): > > On Thu, Dec 5, 2019 at 3:47 PM Bartosz Golaszewski wrot= e: > > > czw., 5 gru 2019 o 11:27 Andy Shevchenko = napisa=C5=82(a): > > > > On Thu, Dec 5, 2019 at 11:42 AM Bartosz Golaszewski > > > > wrote: > > > > > =C5=9Br., 4 gru 2019 o 23:34 Andy Shevchenko napisa=C5=82(a): > > > > > > On Wed, Dec 4, 2019 at 6:03 PM Bartosz Golaszewski wrote: > > > > > > So, the test cases, I can imagine of, should include (k - kernel, u= - user): > > > > - 64k-64u: LE and BE > > > > - 64k-32u: LE and BE > > > > - 32k-32u: LE and BE > > > > > > I usually use qemu VMs built with yocto for testing but I don't see > > > any way of creating a 32-bit user-space with 64-bit kernel. Any ideas > > > on how to prepare a testing environment? > > > > In my case it's very easy. I do > > - compile kernel as 64-bit separately; > > - compile initramfs of Buildroot distro with external kernel build prov= ided. > > > > Any specific config options are needed on x86-64 kernel to use 32-bit > user-space? I'm not well versed in x86 architectures, that's why I'm > asking. I built a 32-bit userspace qemu image with yocto and then > manually built a 64-bit kernel. I tried running it but I'm getting a > kernel panic when the rootfs is being mounted. Just published set of scripts [1] we are using internally for our developme= nt. Find README.coreteam in the source root and read how to use that. > 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. [1]: https://github.com/andy-shev/buildroot/tree/intel --=20 With Best Regards, Andy Shevchenko