Re: [PATCH v2 10/11] gpiolib: add new ioctl() for monitoring changes in line info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



wt., 10 gru 2019 o 18:00 Andy Shevchenko <andy.shevchenko@xxxxxxxxx> napisał(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




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux