Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4194124pxb; Wed, 13 Oct 2021 23:49:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/o76FyfEZj/huOHVEnGrhxc8uOBNmkEZU7FcWdXvro4oSslDyQYtp1OnPNypLqC19nmsZ X-Received: by 2002:a17:902:e313:b0:13f:1866:aa86 with SMTP id q19-20020a170902e31300b0013f1866aa86mr3352162plc.55.1634194177329; Wed, 13 Oct 2021 23:49:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634194177; cv=none; d=google.com; s=arc-20160816; b=XDZYYbdIc0T56oQN/Z+l9rhGgu+99YQOgD9hRbayVbmwlfDt0f/WgimhItrCZUqQhb F78bxEbAOtXIpYoFG/rGipkQCKK0Ogyd3u2HTBGHaBX2xaxHV04jan8u3lgfVesPg23E UBN/frU6xQ6EDyRn60xSd8G8KPChBV1plowy4OZ6lLrAy9Hy9mWfJMeEgLBtwtrrr1Pe E/NjVpCaBGZvmTKzQ0caZQt9Sk0Z5z+PbFW4gqaNIeUvPd/Inc0CynP+vx6EoPLtdhAR 2oqk6uQKelgcJkeGefuOW9ouqNXck5pZvlmoo0UvUTrBS2EMcvL02XNdY6CIKTN80Pyx jQBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=xEWlSNLwxBTdk36rMuEijcTMDxJkBlbpQ1Z26KCVqLk=; b=IsIBPVsVR+MTluv7h3Wf2X1yjWwbYLGQQAuo170q2djxUN5nGCCWbeycGrQFZ6GBmb 23GQSrgJDKRJfK7QvdVHlpTqWEwCk3oWr9RMZ61KRow7A3smEzePzBjPCbz9/o/JFYqd PTT+LUDLYjIHAlnx0GyegpoMMA0cQdTfa6WqeKlAgz2891PYPONOm9C+z2qHG5HFY91m wtzS5yViLrkFUNQa4eS03G1nts+bcsmg+4mepZyIqEnuYtw/VVlBdGY2IHC3nOEz/lba qfn0qhs8La7FUWbzegkVJXAvcaJnL2W/iPuDrF2KtxZ1SLtf0FsoG/Ojq8fH2ShChODP 7WFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r19si2947018pgj.102.2021.10.13.23.49.24; Wed, 13 Oct 2021 23:49:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229892AbhJNGsy (ORCPT + 99 others); Thu, 14 Oct 2021 02:48:54 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:51659 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229617AbhJNGsu (ORCPT ); Thu, 14 Oct 2021 02:48:50 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]) by mrelayeu.kundenserver.de (mreue107 [213.165.67.113]) with ESMTPSA (Nemesis) id 1M1ZQT-1mcIDw2zXf-0037bo; Thu, 14 Oct 2021 08:46:43 +0200 Received: by mail-wr1-f43.google.com with SMTP id r10so15952991wra.12; Wed, 13 Oct 2021 23:46:43 -0700 (PDT) X-Gm-Message-State: AOAM533+14jmyh7HBi/1RPkRKqMNYM11sEK+ZUtbCNBDZc0Zh+iVOaG5 Zp3d9HtBnuxgpivw+/N46UGm5HaEysZHAlemEQQ= X-Received: by 2002:adf:a3da:: with SMTP id m26mr4432597wrb.336.1634194003365; Wed, 13 Oct 2021 23:46:43 -0700 (PDT) MIME-Version: 1.0 References: <20211014055527.1238645-1-alistair.francis@opensource.wdc.com> In-Reply-To: <20211014055527.1238645-1-alistair.francis@opensource.wdc.com> From: Arnd Bergmann Date: Thu, 14 Oct 2021 08:46:27 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] perf bench futex: Use a 64-bit time_t To: Alistair Francis Cc: linux-riscv , linux-perf-users@vger.kernel.org, Linux Kernel Mailing List , Alistair Francis , Namhyung Kim , Jiri Olsa , Alexander Shishkin , Mark Rutland , Arnaldo Carvalho de Melo , Davidlohr Bueso , Darren Hart , Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Atish Patra , Arnd Bergmann , Alistair Francis Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:jY/vf4de9a+HDsnX+v1mH/H1FvPuiaj5+UPiAa14/6b9BRyoyyY mOLMPGG24OAh/CbWlgKyYy47lAchVF1Y5Qyl2fyg09NZ9Uxm4ohg8hCd70hXoHiq4VLFyiX wTPleLHe7g5lCFDZ1/lEMBipdb3n2PSrZp5IuxLYWN+klrPq1NR0S8oFbQ3pxv0K9yErlGJ QCS5o3i9yC+xTygMWe1HQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:nf/KJ9hfdCI=:tpMI/dZxWDox9zwReKyNyb cSOwr+DS22pyoFhCh7Ys8g+sdsTNgiRLw7FjDMggU6N0P3a68gNLbZd3Y39X7SFx0jOH3XKTa 4MyNEb6rF24thsAXE5G6Fbhu+R1ubASXHlo+GVq9Eyx9yIJThlRcZazEXStNOIt3QFZ58SbVI w3XKBMPqLBc2Ec9KUOPogtu9iBKfjyosFaGPUPntE2SmoAyv4QdmdvypJ7RQYytvFc3KMDs0A zNieYsozHRNTXZ4XM2m3tgGsaYNdlZJ69XhWB6qdhct4JjI0ADJFEs1MhshB5eKEeMOPyWisc uKdNZ6ByJfWXGv9HCcKpeTQ01fqTWoHsy4I9rbfma44grdHrhRTXRQ5HMgJsHRI2eaF84lU8t PQu63FUmvvJwPTEt2c1GOaTECwarI+PKVHntbNtEw+w1CntePiJwxCOx7jzrcDt4qsM2BJ5oc opgVDXaukDYy+QRZBqBX85UE2wu5plXUrRrzrjfPcsWMv58AsSSAmlnI2Fgqz2Ecu/DnsLQEo nhsgZShTPdtDdRt+MIvKMde4vN5xvmqNeJwRl5+jtwpBexuEb1zF7aD8ZPJOEnjInyb8GC27m nrgAekkvD1FW9+tkx0ieT9KIETqyauwgFfBwaMFgcfnEY3Q/GNGQAad/I2dRbQbeWePzs4lGs sfOoINwiz0BMZTwTThYEwVP9KmoBL0K7dbB6RT0P6Qld45jJ8Yl63XF/QwyORVLau82ODfNFy 3COpSH3hheqCrEp0KEg+2aw2vWN0R8aT+bAAfpc+QeIHi6cplwM23HcWeko/quvAE9nPhcyQb sVMxvtBmJQX5BLM/ebNUT2YfIB3nrXZg2j21ylLNAkZQdlclQn0lHhckv2xr8uAk8xPhMg/ey /Spt5MUfe5bw00uWf9ZA== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 14, 2021 at 7:55 AM Alistair Francis wrote: > +/** > + * We only support 64-bit time_t for the timeout. > + * On 64-bit architectures we can use __NR_futex > + * On 32-bit architectures we use __NR_futex_time64. This only works on kernel > + * versions 5.1+. > + */ > +#if __BITS_PER_LONG == 64 || defined(__i386__) > +# define futex(uaddr, op, val, timeout, uaddr2, val3, opflags) \ > + syscall(__NR_futex, uaddr, op | opflags, val, timeout, uaddr2, val3) > +#else > +# define futex(uaddr, op, val, timeout, uaddr2, val3, opflags) \ > + syscall(__NR_futex_time64, uaddr, op | opflags, val, timeout, uaddr2, val3) > +#endif That __i386__ check looks wrong, was this meant to check for x32 instead? In that case, I wouldn't bother, as x32 can also just use the futex_time64 call like the normal 32-bit architectures. Arnd