Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1219452ybl; Fri, 6 Dec 2019 13:22:34 -0800 (PST) X-Google-Smtp-Source: APXvYqww2YUskdVPaPN0a/VYSsJ/A/GPU6kYmHu6SUWyotvxS6wAecrGYBrJcfUhLqN4SL1M3huk X-Received: by 2002:a05:6808:4c7:: with SMTP id a7mr11130093oie.83.1575667354321; Fri, 06 Dec 2019 13:22:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575667354; cv=none; d=google.com; s=arc-20160816; b=oTxorRfVsU4JUzSqZVw52dur5dbfQwFpXF6AQX8btfn7k6J5HVOnWb1d7FfsPdixFf DlT9KFNBowu5Fs/z9M9rUyEwxBiRaC+nmJGpERXblcqKdseo2aaejcQdB5mkSRViQMlz gVSj1epHXCJkekLbQzDXT3+kPjYXO+3u+T/iCh6EhNBchC2k6QOfbstEF7Qqbv88XpYZ I2BjCveev6dNSMpX6WAnZxKrYzTshjOa8AR82mOmmfK9AEA/8VW5c234gFpiZjjpnhDx o8pJUY/0srqni82R617z56zqVoJCEY7/6bMtQLqUy5bBjXBMtzcwGc07/lqm+g16kRkr fetg== 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=8mnXgPaScBnr46TzaGLXmqKZ0PVzrE5M2Q6iH8H72FI=; b=vNLcQVHDpgf2xF8qrdmbi1APhkJItheC4XPW0djTMYwJ56MZQ9L2rkySXOewaAd5hN HR0VN+AQ6Mojy4t5ph/nMxPUgBpYAHDuv0Dml40XCklq4wI8Lc0pD97AfhwH1kCjJQQL Zm0CS5KJSXkimaoAe/lzJBrRWJuuF6qaqc4mzOWpPGKRF9uEIWpgwYSCince5XyweXwC qVQQsgQKSPwDiC/a1x5VX7nWjLtW5GyUGqDFY5L+o6rEhuhnVwthpWdvlOsWlWWsIc1d GJJy15+93WgL+aWGk3ZptEaxdVQ6MMGO2W1RNahDf94nyHkNCmQC6UQN18gc1TZDhhpG LzQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=0eyOvDV4; 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 r6si8034571otn.216.2019.12.06.13.22.21; Fri, 06 Dec 2019 13:22:34 -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=0eyOvDV4; 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 S1726479AbfLFVUz (ORCPT + 99 others); Fri, 6 Dec 2019 16:20:55 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:42482 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726352AbfLFVUy (ORCPT ); Fri, 6 Dec 2019 16:20:54 -0500 Received: by mail-io1-f66.google.com with SMTP id f82so8762308ioa.9 for ; Fri, 06 Dec 2019 13:20:54 -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=8mnXgPaScBnr46TzaGLXmqKZ0PVzrE5M2Q6iH8H72FI=; b=0eyOvDV4bCLLomF/wyhQ652/636EWvdSnKPbbpWNWDB+rCsgfAo8nb37krB51Zx3ky 6gJVw6phTfePlGP+NWoxiiGo7cPFl8S0ZWdKwUcWiCG0a0SK3FB3OQhsnhC2yeSBEEUw /6YMhNZ8Nc4XKgJovonlIFCiiJnhEF0LdE+UZnkWZ81dHjgW2BC12NUMvtxGeESiTqWf cdG9R85Y+v5vSgU8IgywKWCQPTjV5WQIxZgRETTmuvET/8RlfvuX7oCgk2qu0+Fut8dA hWzIJkwF9I38Uu5JwOZ2vRaw+iLpB3YxLMwWrkAS1h7HYzKvVOoosVFjwysifFzyhmAZ xHPQ== 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=8mnXgPaScBnr46TzaGLXmqKZ0PVzrE5M2Q6iH8H72FI=; b=GNBAYd99/IOIay/5F0zCsNwchusY4soM2Eg066BGypTXO4HWKfkAT+kl/lB+gKXW60 xsi1Er1Kf5CsrKVgHg1l4EhIxjewOAUbJmH8QdnpKQLh8kO77bAHA2ssrYyyzklJpOHG KmI1rL6noffKV7QCLoEiMkPOSsUPTN5Q5k2uP2b22lltu9FxSGFUsY+S5Fd50bxmaFB4 IEqBN/nL/9H06QWpr8FVBbky3cjdASAI9JrczzF+tCn8o7JfeYyQvej9CxsXtz3Bsppb Kc7lMCJ/ETPeKMl8bjAFWEe/Cgyr9647jabHFifjDvDte1JeIJ+1a4J2TvqfTpu61TtY Qe0Q== X-Gm-Message-State: APjAAAVV7pzNiM+MQiDqGtbTj2nK4oxsOeHUjbz9DehLnpJj7gHWdb5U wscJgkBgWIKWlCJe/l3ujr26xPi1WnR81uyg/YsqfQ== X-Received: by 2002:a5e:9314:: with SMTP id k20mr7393244iom.6.1575667253892; Fri, 06 Dec 2019 13:20:53 -0800 (PST) MIME-Version: 1.0 References: <20191204155941.17814-1-brgl@bgdev.pl> In-Reply-To: From: Bartosz Golaszewski Date: Fri, 6 Dec 2019 22:20:42 +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 czw., 5 gru 2019 o 18:02 Andy Shevchenko napisa= =C5=82(a): > > On Thu, Dec 5, 2019 at 3:47 PM Bartosz Golaszewski wrote: > > czw., 5 gru 2019 o 11:27 Andy Shevchenko na= pisa=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 provid= ed. > 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. 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? Any reason not to use __packed for this structure and not deal with this whole compat mess? 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. Bart > That's setup in which I observed the issue. > > -- > With Best Regards, > Andy Shevchenko