From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B338ECAAA1 for ; Fri, 9 Sep 2022 13:35:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231189AbiIINfZ (ORCPT ); Fri, 9 Sep 2022 09:35:25 -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-Google-Smtp-Source: AA6agR7YMsTtgJFIi7UbUzLeHKPkUeVDEUvCuHO7Yfi7TfUL6dmtKcBrILqT8YrI6z6mvf14yS66NhsLhhhwSxCEli0= 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" 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 37080ECAAD3 for ; Fri, 9 Sep 2022 13:36:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5Hcbi8EVIU0XRZJ6X7LdbFq1e4oDA97vTAIDqsESJb0=; b=Djahc6tW5AIPQH TfctLanDWmx8pDvEvHBYkHIRKQ4c9F4Sf6Zqoub9ns7x9erGBjvBJKLyJ/hC50SAbaj8dv5aRnp/P mWFVEmfW1x8xSFpptkc3KCgjJi5xCSqOGAF+MlcBncVQ2Xr+4LPcoUMqWh0cCdnGbKbCq2L84ylYR wGe3u2k08SizoNt0AW4Y+nIFzSKrrNOwMn6Z9orPMQAoAdPP11rscW5UfBKiyxAbh9usSqhcqTclw HPYs40W7xQHlwsCXCr5Juaar1w1qhjSpNbb2D5rlFkXlpWyZacvy44Z5t1bs+Rb5nmV5f0OeOHI3p KfhLsU86V+SNVkZnhKjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWeAG-00GLhl-Tl; Fri, 09 Sep 2022 13:35:25 +0000 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWeAD-00GLfg-Pm for linux-arm-kernel@lists.infradead.org; Fri, 09 Sep 2022 13:35:23 +0000 Received: by mail-qv1-xf33.google.com with SMTP id g4so1223176qvo.3 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=MXXycfSA0UysSwoHkJmYQXujwDic5rbr+CBHFI2x5sKf+cEVTVGeySVHPu3k/y1RdN 0978cVCp53aUkeFyyf541iJH04uP1o3FnfL71nrmoUguoMt2Kpjrw8zG1TPuYKnTP6+2 y3fzplPBqsGfXEEYLqRWTKgET8HGT8aX10sqjDkn2dTrBh4pkZ929FdLywqx1uDuY5iY ekHkbGW+fd96ebGcJra+frMewhyQxAEx61dBNA6vaHWRS/ekC5uFN3GYUmoG99p+GdXM 6R8W78qjUcAeOb3K7jwxJuDODnnRP4mZyImY76abAdi0UobJbYbBV0MZpzNdkXSacdAd 8FiA== X-Gm-Message-State: ACgBeo0sOBF7IhdJZT2YaTFlle0rnfvf0m89A+4+31U8yTUcwGzON5j5 RDwDLANEoYAoDfq0AXxAeNEK+CaVqvJ1VHNBz1M= X-Google-Smtp-Source: AA6agR7YMsTtgJFIi7UbUzLeHKPkUeVDEUvCuHO7Yfi7TfUL6dmtKcBrILqT8YrI6z6mvf14yS66NhsLhhhwSxCEli0= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220909_063521_873933_7FBBE62B X-CRM114-Status: GOOD ( 23.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel