linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antonios Salios <antonios@mwa.re>
To: dmitry.torokhov@gmail.com
Cc: rydberg@bitmath.org, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Jan Henrik Weinstock" <jan@mwa.re>,
	"Lukas Jünger" <lukas@mwa.re>
Subject: element sizes in input_event struct on riscv32
Date: Thu, 14 Dec 2023 11:11:18 +0100	[thread overview]
Message-ID: <c812ea74dd02d1baf85dc6fb32701e103984d25d.camel@mwa.re> (raw)

Hi all.

I'm having trouble getting evdev to run in a simulated Buildroot
environment on riscv32. Evtest (and the x11 driver) seems to be
receiving garbage data from input devices.

Analyzing the input_event struct shows that the kernel uses 32-bit (aka
__kernel_ulong_t) values for __sec & __usec.
Evtest on the other hand interprets these variables as 64-bit time_t
values in a timeval struct, resulting in a mismatch between the kernel
and userspace.

What would be the correct size for these values on a 32-bit
architecture that uses 64-bit time_t values?


Kind regards

-- 
Antonios Salios
Student Employee

MachineWare GmbH | www.machineware.de
Hühnermarkt 19, 52062 Aachen, Germany
Amtsgericht Aachen HRB25734

Geschäftsführung
Lukas Jünger
Dr.-Ing. Jan Henrik Weinstock

             reply	other threads:[~2023-12-14 10:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 10:11 Antonios Salios [this message]
2023-12-19  2:50 ` element sizes in input_event struct on riscv32 Dmitry Torokhov
2023-12-19 13:53   ` Arnd Bergmann
2023-12-21  8:56     ` Antonios Salios
2023-12-21 12:28       ` Arnd Bergmann
2023-12-21 13:38         ` Antonios Salios
2024-01-15 15:46           ` Antonios Salios
2024-01-15 16:11             ` Arnd Bergmann

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=c812ea74dd02d1baf85dc6fb32701e103984d25d.camel@mwa.re \
    --to=antonios@mwa.re \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jan@mwa.re \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@mwa.re \
    --cc=rydberg@bitmath.org \
    /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).