Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1957937rwn; Fri, 9 Sep 2022 06:41:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR68eFMgV0KcIJrxaRG+FqYXyHt2Txf/gCatevLiGU4E8pLVW2Q1k7X50MTRRYYEiQzDbAka X-Received: by 2002:a17:90b:4a88:b0:202:7444:3b76 with SMTP id lp8-20020a17090b4a8800b0020274443b76mr7067469pjb.149.1662730862374; Fri, 09 Sep 2022 06:41:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662730862; cv=none; d=google.com; s=arc-20160816; b=DhkzQHrKE1G+8L0SULF1+quOn60GQLOuDWexGGzrJy61dGRHzCWlCyMfPca/fJCbSY zuflBq84noT586qW7Njo3dv0hSeBex+jEQfFIeB5QD3foanKhU+jK/tj41bhlBxooOPN SVT+kbXEtYZiwraYw+JMAPZ/TJcNp9vYcgyujht9lJSeUapuaPFEkqqGSRpgyQADUqH+ F04gFSiGk6dYbZzkWvCHRy/Eec6t5FCk643IO7fcHDA7aOViv462uMxFyCJM7qpLWWvx XI1t69crZ5EjSC1hOPHvK7xU1nkZ7Fwg+02iVIFFF9jw6TpBJFgSPTzzr+rqVEcKemGu xEJQ== 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:dkim-signature; bh=JowtK10yvVmyUpTESi/zVeCC2TkAptyeECG562T7tNo=; b=QXuufZBtp1y33lz5XJ0jE/SVNSaPFqxLp3PwZbk1FtaK28rkJtwlQlxJUUnrY4zE7h VkskF5EeqiKBp6U/Li+9v6R40lGK5AmV4AgMA+YsHUmOD3s2HRDezF7h2qkVdymiHFN7 L5Lh562PDjTewt5uEyHRz7unZ+zymPu2dwNeW+YelNqwb/Bhl/gnimUDJWGxCn6yLNyH TUlgoFy41/w+rSA/cuMqvoRSrYGAuW6JomuuRhHFGEeiH/edfbvKqFFcYyit9miPP/63 XGlQd4gtC74XHBULpmZz/yaEOW6Zw2YXmjXfKcveRMX1dlEuQ9vmZZu07gKdIHob+xvf ja7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kkoh2qFv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020a17090a68c100b00200320efa1asi552650pjj.33.2022.09.09.06.40.50; Fri, 09 Sep 2022 06:41:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kkoh2qFv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231131AbiIINfX (ORCPT + 99 others); Fri, 9 Sep 2022 09:35:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230460AbiIINfV (ORCPT ); Fri, 9 Sep 2022 09:35:21 -0400 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47F45B72BC for ; Fri, 9 Sep 2022 06:35:19 -0700 (PDT) Received: by mail-qv1-xf33.google.com with SMTP id y9so1221986qvo.4 for ; Fri, 09 Sep 2022 06:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=JowtK10yvVmyUpTESi/zVeCC2TkAptyeECG562T7tNo=; b=kkoh2qFvdpskjcO3O9CspqSrm+Wuc1/hOeiZjsnq3rNju1rfqdoOhvtJUOvkzIqr98 wTnfqyDwIntAXt6osUowan3L9rhZZyuME5qPACRgQCjoFRYtI3jzbtnSzIeov/g87UTD /eh4u/OBZfKgMEqttI/k13/ERI0pNjfYIZlmWlaK3yc6gEMQDGBbd58yz50W95FL3M8a 9JGJGqJKb4A7daZpC1B3dsXNQnA0hgg4UP2r1VsVLY1wzXYGLIINA6MnKIxHJp2b7lbr lLvZJNqVLt5MVXehr0DuSi/n41P0s0Tka8LacU4yKBmbrf6LsGreHTOaQagB+o3gXtxU q2xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=JowtK10yvVmyUpTESi/zVeCC2TkAptyeECG562T7tNo=; b=GQl+tYo0SRpd0NrjGcYSWYB/gcgMcGk4vehrnUwHuvQ1g49TwXy+ALyWBj4ZO7XTxu AhBcKQj8r1GTIQ7M/5DAxPSW2oCRbliK/6Yc7Hypl76ZztN0sS6IfRQK5xJ9tp9zU4DK Ahbzkdlbd7Oei5ypvmF33aEh2xgzz0imJ5RlcLjUOkL2PdXU2x/oD+pElnRo4NbXJWt3 I0Yosr5lf/Jd3dz4X+Xj/jfA0uxY8m+SSkzFXLIMooHXs2IIUm1hz/ihsRpOcTLqSZc1 BE8rEV4huiXF/Sv7qFg1xLBY1ycIZR3R6/6mpfMws1/VazGf38gj1e6JM5N/yjf3v3EO gg6Q== X-Gm-Message-State: ACgBeo3OUKhECqmRGGA5ARyy88uaB4umpD9h2G1cl5CW9RRupFU7322n afX5zbL6agEbBcX1bQsSMy3LKQxSPsSxi7bOBZo= X-Received: by 2002:ad4:5bc1:0:b0:496:fd12:3ece with SMTP id t1-20020ad45bc1000000b00496fd123ecemr12060263qvt.27.1662730518310; Fri, 09 Sep 2022 06:35:18 -0700 (PDT) MIME-Version: 1.0 References: <20220901141307.2361752-1-georgepee@gmail.com> In-Reply-To: From: George Pee Date: Fri, 9 Sep 2022 08:35:07 -0500 Message-ID: Subject: Re: [PATCH] Report support for optional ARMv8.2 half-precision floating point extension To: Catalin Marinas Cc: Russell King , "Russell King (Oracle)" , "Kirill A. Shutemov" , Austin Kim , Ard Biesheuvel , Mike Rapoport , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The use case is really being able to tell, from userspace on a 32-bit kernel, if FPHP is supported. It's really just reporting for convenience. It wasn't clear to me why HWCAP2 was used in some cases and not others. I can add FPHP to HWCAP2 if that's the right thing to do here. On Fri, Sep 9, 2022 at 6:39 AM Catalin Marinas wrote: > > On Thu, Sep 01, 2022 at 09:13:05AM -0500, george pee wrote: > > Report as fphp to be consistent with arm64 > > Do you have a use-case as well? It may help deciding what to do with > this. > > > diff --git a/arch/arm/include/uapi/asm/hwcap.h b/arch/arm/include/uapi/asm/hwcap.h > > index 990199d8b7c6..f975845ce5d3 100644 > > --- a/arch/arm/include/uapi/asm/hwcap.h > > +++ b/arch/arm/include/uapi/asm/hwcap.h > > @@ -28,6 +28,7 @@ > > #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) > > #define HWCAP_LPAE (1 << 20) > > #define HWCAP_EVTSTRM (1 << 21) > > +#define HWCAP_FPHP (1 << 22) > > I think with ARMv8 features on the arm32 kernel we tend to add them to > HWCAP2_*. With such change: > > Reviewed-by: Catalin Marinas > > I'll leave the decision to Russell on whether he wants this merged. An > argument may be that people still want to run 32-bit user-space and even > if they use am arm64 kernel, we can't add a COMPAT_HWCAP2_FPHP until we > have the arm32 counterpart. An alternative may be to only add the uapi > definition under arch/arm but without any functionality (so never > exposed to user). The arm64 kernel could expose it to compat tasks. > > So, if Russell is ok with any of the options above, please also add the > compat arm64 support ;). > > -- > Catalin