linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Kent Gibson <warthog618@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 10/11] gpiolib: add new ioctl() for monitoring changes in line info
Date: Fri, 6 Dec 2019 22:20:42 +0100	[thread overview]
Message-ID: <CAMRc=MfxteQDmeZn_Et0uFs2cPvLGpJ5BTeBOn37o=2Oo_eU=Q@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VfzP8-0wKmPTTKYe+fc6=r_4sVcJPyOsM8YTuH=i4rxmA@mail.gmail.com>

czw., 5 gru 2019 o 18:02 Andy Shevchenko <andy.shevchenko@gmail.com> napisał(a):
>
> On Thu, Dec 5, 2019 at 3:47 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > czw., 5 gru 2019 o 11:27 Andy Shevchenko <andy.shevchenko@gmail.com> napisał(a):
> > > On Thu, Dec 5, 2019 at 11:42 AM Bartosz Golaszewski
> > > <bgolaszewski@baylibre.com> wrote:
> > > > śr., 4 gru 2019 o 23:34 Andy Shevchenko <andy.shevchenko@gmail.com> napisał(a):
> > > > > On Wed, Dec 4, 2019 at 6:03 PM Bartosz Golaszewski <brgl@bgdev.pl> 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 provided.
>

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

  reply	other threads:[~2019-12-06 21:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 15:59 [PATCH v2 10/11] gpiolib: add new ioctl() for monitoring changes in line info Bartosz Golaszewski
2019-12-04 15:59 ` [PATCH v2 11/11] tools: gpio: implement gpio-watch Bartosz Golaszewski
2019-12-04 22:42   ` Andy Shevchenko
2019-12-05  9:45     ` Bartosz Golaszewski
2019-12-05  9:44   ` Kent Gibson
2019-12-05  9:48     ` Bartosz Golaszewski
2019-12-04 22:34 ` [PATCH v2 10/11] gpiolib: add new ioctl() for monitoring changes in line info Andy Shevchenko
2019-12-05  9:42   ` Bartosz Golaszewski
2019-12-05 10:27     ` Andy Shevchenko
2019-12-05 13:47       ` Bartosz Golaszewski
2019-12-05 17:02         ` Andy Shevchenko
2019-12-06 21:20           ` Bartosz Golaszewski [this message]
2019-12-10 17:00             ` Andy Shevchenko
2019-12-19 13:05               ` Bartosz Golaszewski
2019-12-19 13:12                 ` Kent Gibson
2019-12-19 13:17                   ` Bartosz Golaszewski
2019-12-05 10:47 ` Kent Gibson
2019-12-05 10:50   ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMRc=MfxteQDmeZn_Et0uFs2cPvLGpJ5BTeBOn37o=2Oo_eU=Q@mail.gmail.com' \
    --to=brgl@bgdev.pl \
    --cc=andy.shevchenko@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=warthog618@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).