Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp158623rdb; Thu, 21 Dec 2023 05:51:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGIGNiUQJYZpm4kn959BZ7SSo9gMHH/4uVufltTmIa02i2SbBNruvhPdY2yKS3MCGAGOSG2 X-Received: by 2002:a05:620a:4556:b0:77f:ba05:b2f8 with SMTP id u22-20020a05620a455600b0077fba05b2f8mr13659946qkp.108.1703166667629; Thu, 21 Dec 2023 05:51:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703166667; cv=none; d=google.com; s=arc-20160816; b=jkDkP04dGFlNFsoMDtxIlgy54ViFNM0jeMlVI+EnkQ/Yrym2e5v7TK0VfYeeK+Oj3C WRwrz3VcIJtleuwawg8IOCp24UPbuj4IqGmp3KJZNy9VvMaGnAA0lomVJBI35lGk8DAs 2So/BLbiDykywwM4hsZmvy1EErwuciRFPQzBpQ/CYjI2Xs6hyR/qYhzPfnq7z1aee4yZ oGGis2i8lwpEd/khMut694RySIvN9/D1dqSdkHLxGPfxlAz5QnI/ZX6Wh4krKhDm/553 CJ+e91G6WliOLvvoszPHES5Liz/SN/9iDGU597wonTeottjk0FNTo476obqaisuKx9p5 C9mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=8erZIDLTxmf1m2HH8xQugTTdLGmjGK9/jdlvEoF7f58=; fh=vlKOPgku99ecVC7LpffYOjNwRdZ2ckrDV+h8UPNI+3M=; b=otmbzxbh1YdQED3OmbxhunR2fRcOIhCQTc2sBkqyBFRCoPXsWAp4NXT9uZ0yJ5vp1a xixDlLfQRP4pt/GJTBvp13mnE3CDJ8nCKJyQzjouwCOLbZL0an2a4i6OpQ94vkHRggs1 8RY23Z7yeIgSk+01iYj88X/YfkWM4u9/1VClkxYwcE9L/4fAEqIkZ4Y7lYu0+a7MEisU fIPO8DNNT1xXuLtAR7iPnWTs3h6ySFtl/FhCkcSBW3MxdHiDF+R4PRvlys3KDmqmVm0h V/U4eyUzxELzXLJyVgqOE4dXxP71vMii4TAV5wFo3M0XeJhDBbPMqNVhxXVHLMbz5l3p bgpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mwa.re header.s=google header.b=gn6BIKio; spf=pass (google.com: domain of linux-kernel+bounces-8499-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mwa.re Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id i11-20020a05620a248b00b0077f00c0e348si2227426qkn.641.2023.12.21.05.51.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 05:51:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8499-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@mwa.re header.s=google header.b=gn6BIKio; spf=pass (google.com: domain of linux-kernel+bounces-8499-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mwa.re 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 605381C23FD6 for ; Thu, 21 Dec 2023 13:51:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A89E7A221; Thu, 21 Dec 2023 13:38:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mwa.re header.i=@mwa.re header.b="gn6BIKio" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF4EB76DA9 for ; Thu, 21 Dec 2023 13:38:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mwa.re Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mwa.re Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-40c2308faedso9158315e9.1 for ; Thu, 21 Dec 2023 05:38:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mwa.re; s=google; t=1703165929; x=1703770729; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=8erZIDLTxmf1m2HH8xQugTTdLGmjGK9/jdlvEoF7f58=; b=gn6BIKioQLApCbL+49R8eFqNWY6KQvsbPg03E2H6wCl6Y2XKfPmtRXEq4SePIOOVH+ iYKfyznuTbO31YB427SieFKhyfmVmjRitZCcRUzOPx7VWLtnhdNIxqZqh1izCG+D4ww8 C4o9WmM1NiEDHbuUh+0PRT4b+VB7ZBYd7d0GwyYFN7Tin4EYGHDOTi8uN3X9mxOSYNJS CWQnXv4xUSz8IgZ/HQCnndqw7T6q6WAH04CFXWAvCOwSmrEB/C1d+XhtCyy1oXSiE5wL 82zgGkAf5oJVsXlhGiI6jjQpfl5DdRDAN5P1lycHVyyr4kFRNQ2HDn0y+7NXNRhRCMCo z2KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703165929; x=1703770729; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=8erZIDLTxmf1m2HH8xQugTTdLGmjGK9/jdlvEoF7f58=; b=QZqedntvhwTC2p5/LjQDGwxmbHTgAbWrzOxZfkftTwrDkLUlk14K/VFK7uUcmWBgO/ VjM5Lua9aKHayq0jCHfmh71gaQrwZ5+3fCeJKsD0EbNpj6kCCTd/3NHIcdAnkGV+fQKq 7qYoWAYz7ju5o3oui4zOKDi0VEB5P9YILlStNVHwYac6uhVuOguHeS33xEN0+twgs/j0 E3qu5TXLX/3B8za8jGwMMUPGkNh79mmTU7/IgXVenEeL8WIPpHmEg0X8Dsisk4XhP6iH SDL+lIqnZMLROc2t9BAvnMADiY+ETNYRRDixT1uaopLlBKCy255sVN6ZCVxAPBsDkHgW G/Og== X-Gm-Message-State: AOJu0YzqpsGVS1vvt+jEHIUqSl3Z+qGDjmNzPLlkb+iX9QVoGWZ9iox0 hzZaEJ8oZdaLXkxDXyYqkEoomQ== X-Received: by 2002:a05:600c:46ce:b0:40c:3464:f816 with SMTP id q14-20020a05600c46ce00b0040c3464f816mr802894wmo.51.1703165928870; Thu, 21 Dec 2023 05:38:48 -0800 (PST) Received: from 2001-4dd0-53c2-1-46ed-318a-d674-8fda.ipv6dyn.netcologne.de (2001-4dd0-53c2-1-46ed-318a-d674-8fda.ipv6dyn.netcologne.de. [2001:4dd0:53c2:1:46ed:318a:d674:8fda]) by smtp.gmail.com with ESMTPSA id g14-20020a05600c310e00b0040d1774b4e4sm3323167wmo.42.2023.12.21.05.38.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 05:38:48 -0800 (PST) Message-ID: Subject: Re: element sizes in input_event struct on riscv32 From: Antonios Salios To: Arnd Bergmann , Dmitry Torokhov , Deepa Dinamani Cc: rydberg@bitmath.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Henrik Weinstock , Lukas =?ISO-8859-1?Q?J=FCnger?= Date: Thu, 21 Dec 2023 14:38:47 +0100 In-Reply-To: <1a528414-f193-4ac0-a911-af426bb48d64@app.fastmail.com> References: <9e97eb50-f9a6-4655-9422-fa1106fff97a@app.fastmail.com> <491250ba57be2ab983048ffcf5ffd2aec2bedb9e.camel@mwa.re> <1a528414-f193-4ac0-a911-af426bb48d64@app.fastmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2023-12-21 at 12:28 +0000, Arnd Bergmann wrote: > 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: > >=20 > > The problem seems to be, that __USE_TIME_BITS64 is not defined even > > though riscv32 uses 64-bit time. >=20 > That sounds like a libc bug. Which C library are you using? Glibc 2.37. > > __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. > >=20 > > __USE_TIME_BITS64 is only set when __TIMESIZE is set to 32. [1] > > Under riscv32, the default value of 64 is used. [2] >=20 > 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. Okay, I agree that this might be a libc problem then. I'll ask the glibc maintainers. Thanks for your kind help and happy holidays! --=20 Antonios Salios Software Engineer MachineWare GmbH | www.machineware.de H=C3=BChnermarkt 19, 52062 Aachen, Germany Amtsgericht Aachen HRB25734 Gesch=C3=A4ftsf=C3=BChrung Lukas J=C3=BCnger Dr.-Ing. Jan Henrik Weinstock