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 C939EECAAA1 for ; Fri, 9 Sep 2022 15:06:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231638AbiIIPGF (ORCPT ); Fri, 9 Sep 2022 11:06:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231533AbiIIPGD (ORCPT ); Fri, 9 Sep 2022 11:06:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68E39A4B32 for ; Fri, 9 Sep 2022 08:06:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B4DB5B82551 for ; Fri, 9 Sep 2022 15:06:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76679C433D6; Fri, 9 Sep 2022 15:05:57 +0000 (UTC) Date: Fri, 9 Sep 2022 16:05:53 +0100 From: Catalin Marinas To: George Pee Cc: Robin Murphy , 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 Subject: Re: [PATCH] Report support for optional ARMv8.2 half-precision floating point extension Message-ID: References: <20220901141307.2361752-1-georgepee@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 09, 2022 at 09:57:39AM -0500, George Pee wrote: > On Fri, Sep 9, 2022 at 9:07 AM Catalin Marinas wrote: > > On Fri, Sep 09, 2022 at 08:34:26AM -0500, George Pee wrote: > > > Adding the hwcap was part of the diagnosis process-- I added it just > > > to make sure that the cpu in question supported the optional > > > extension. > > > It seems like it could be useful to be able to check for support in > > > /proc/cpuinfo. > > > > Ah, I wasn't aware that the feature doesn't work on arm32. I don't think > > it makes sense to expose a hwcap bit to user in this case. > > The details are here. I originally thought it was a compiler bug > because it first showed up after a toolchain update. > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106763 > > Since FP16 is an optional extension, wouldn't it be beneficial to a > user who compiled some userspace float16 code using gcc > -mcpu=cortex-a55 which ran on a cortex-a55 with FP16 extensions but > SIGILL'd on a cortex-a55 w/o FP16? (please don't top-post) My point is that if the kernel doesn't have full support for FP16, it shouldn't advertise it to user even if the hardware supports it. If you fix the kernel to properly handle FP16 on supporting hardware, then the HWCAP part is fine by me. -- Catalin