Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp111784rdb; Thu, 21 Dec 2023 04:30:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSlwbROSDV3V56nzObp2vWuJdbi/wNZYDuZfA8XP5f6xjv7lLHPDH1hrsEI7DztKMXC9zE X-Received: by 2002:a17:90b:506:b0:28b:b995:c886 with SMTP id r6-20020a17090b050600b0028bb995c886mr3196563pjz.82.1703161827046; Thu, 21 Dec 2023 04:30:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703161827; cv=none; d=google.com; s=arc-20160816; b=gMVhov/eaWVHPzxz7hRZktdEIxTBrh1lYte/bzA40lgs5r/oOEjQHlwt2o11H4L4Kz 9FjQh1h30ma5+X0gQhtakaUTK/S/HrIbXWPZ4ueC21R209ZV4wnq/GACHEb+KtRO0Nal M8Yv+7s4YhrfMCNCtPHnXxg6jkQ77vIKRVfMn4E3Q4rg155Z6Bm3XgElmo8op4d49Wg9 GI8igHTMkFAtc7lmDXYMjRiXSvGfK5hmj9ch8CK2xbbOBKRpZjL2CvN0ElkaXKP5Gce8 HQBQmVBApRlDNgcqM+qHgtV5W+maiaGKaaCa3ZLUVxy9nS9Y8tGQ1WD8oB37w6IafChh NF/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=mwOsNjPhM15iVADcV6tlveRSC2qQe3l0324UDObUrhs=; fh=u31YFGCuU994I7FCTODmkMsL1X/U4Nj1t1cLXC/dTgk=; b=YS1TuNYpxVP4yv8OamMElULWz+JDoMB50IjF8MCPkxorC8SAIFz5NIBe9MMjOk7KqX SmdIrovy3/T0ANstEqCbB6bgb04Q3S9Jo4IbUsg3ED9q+VKLiRnHo3emGFu6ioN/PR4v wudFYXcX/dtXU/kZ4eMrzTVfc8/gvsunwWjWUOWkXzYxoPiOI5tPKlyEu3mz/9TVJ8r5 CQ+eDY1qvFskWteqC85Qd0Ia+SnU6WqM33j6ujZk7DwuWfluUKi0/8Tu+W4bWhf2hK7e oYSobPG6CSFtXfVyw4U/GidaIy67rJRx8hEYy9XwuAyM9+2MS+j6kiStuWvPBHIL0anc 9juA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=3JFmqbWR; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=vNfvZnCz; spf=pass (google.com: domain of linux-kernel+bounces-8334-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8334-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id lp7-20020a17090b4a8700b0028bc2b87bcesi4249831pjb.44.2023.12.21.04.30.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 04:30:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8334-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=3JFmqbWR; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=vNfvZnCz; spf=pass (google.com: domain of linux-kernel+bounces-8334-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8334-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9942828899E for ; Thu, 21 Dec 2023 12:29:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1673076083; Thu, 21 Dec 2023 12:28:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="3JFmqbWR"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="vNfvZnCz" X-Original-To: linux-kernel@vger.kernel.org Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00D2773187; Thu, 21 Dec 2023 12:28:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 080055C020D; Thu, 21 Dec 2023 07:28:26 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Thu, 21 Dec 2023 07:28:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1703161706; x=1703248106; bh=mwOsNjPhM1 5iVADcV6tlveRSC2qQe3l0324UDObUrhs=; b=3JFmqbWRUv1ymqXmOlMhsk187N 4JQkihkPG9V20fBnr1utevdOfCprRe13bjUc4gASkj2hCzy60gWiulMsSiGps7L3 vZwBN6+2nTQPElR8qXwg3XOVe2sql3ped6PuAVfXfG+9rXvZF07biwMlf+Z0EAEA jdr7TD9XRHvFm2uSe57hu+Op23EPGZc58/Sa4YiI0a0LbH59WUKtn3jd9wYm1uxK 94xWDG8WINFPZVXZ18m5+C7uyDNlKKC0s3qsGg5M5mBeHLsjHZDDTcA+9+l8v9ZX l/CkrsRzhLc3LB9IA9b+TNgrfSEl04jxiMrnyz/DoxzYzhTAXrSzaVN3m04w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1703161706; x=1703248106; bh=mwOsNjPhM15iVADcV6tlveRSC2qQ e3l0324UDObUrhs=; b=vNfvZnCzhdXrZNx644Dpz/fT55B481Nj0XPheT/DwfH5 flD2EJGYDXE/blDmkHdvmUDsRVmichAgfBYbiNck0WPGJmjpbqHgG3QvY/mAOQ7H 4xI+Jmt77OyDnbri/JHFGohxNc2aAqXqwIRNhDb0Ef90GoUbQoFSb+TARVrRHkyN gpKZjsl0CN/o1obVLW6+FCDt1d5a69CNrfelwa+ElbbqiIz/PpCV3y7WNbk9jwcJ A4Wo2W8ofMkRcjZIaiLTW1is4/mz3w91QgObnfiN0cakUlUc1B3pDlENbk4eBb4V s52Vllnf9ncqCkfO47lr8uIG9iISMTHmfZsPxtAAYQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdduhedgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 91AC1B6008D; Thu, 21 Dec 2023 07:28:25 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1364-ga51d5fd3b7-fm-20231219.001-ga51d5fd3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <1a528414-f193-4ac0-a911-af426bb48d64@app.fastmail.com> In-Reply-To: <491250ba57be2ab983048ffcf5ffd2aec2bedb9e.camel@mwa.re> References: <9e97eb50-f9a6-4655-9422-fa1106fff97a@app.fastmail.com> <491250ba57be2ab983048ffcf5ffd2aec2bedb9e.camel@mwa.re> Date: Thu, 21 Dec 2023 12:28:08 +0000 From: "Arnd Bergmann" To: "Antonios Salios" , "Dmitry Torokhov" , "Deepa Dinamani" Cc: rydberg@bitmath.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Jan Henrik Weinstock" , =?UTF-8?Q?Lukas_J=C3=BCnger?= Subject: Re: element sizes in input_event struct on riscv32 Content-Type: text/plain On Thu, Dec 21, 2023, at 08:56, Antonios Salios wrote: > On Tue, 2023-12-19 at 13:53 +0000, Arnd Bergmann wrote: >> On Tue, Dec 19, 2023, at 02:50, Dmitry Torokhov wrote: > > The header is included from the sysroot of the toolchain, using version > 6.5.6. > I'm using glibc 2.37 with a toolchain built from Buildroot. > > The problem seems to be, that __USE_TIME_BITS64 is not defined even > though riscv32 uses 64-bit time. That sounds like a libc bug. Which C library are you using? > __BITS_PER_LONG is set to 32 & __KERNEL__ is (of course) undefined in > userspace. > The userspace therefore uses 64-bit values as opposed to the kernel, > which uses 32-bit values. > > __USE_TIME_BITS64 is only set when __TIMESIZE is set to 32. [1] > Under riscv32, the default value of 64 is used. [2] I don't know what __TIMESIZE is, this is not part of the kernel ABI as far as I can tell. __USE_TIME_BITS64 should be set by any 32-bit architecture if the C library defines a 64-bit time_t, otherwise the kernel headers have no way of picking the correct definitions based on preprocessor logic. Arnd