Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2095142rwn; Fri, 9 Sep 2022 08:27:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR5d1x76uPL4RbaS/G/PpVQWN2fwrBR5OTbWVZDuiWQLSskyeRyGnQ8O7IeNdVCVeebJjX8c X-Received: by 2002:a05:6402:400e:b0:44f:1b9d:9556 with SMTP id d14-20020a056402400e00b0044f1b9d9556mr10839550eda.208.1662737228031; Fri, 09 Sep 2022 08:27:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662737228; cv=none; d=google.com; s=arc-20160816; b=vM7YwCiEHxnRhHf98hkGODz/chZkn5B2dfjdyzB0hH4+HWtedCIxZpcqwJVjG/A2cH 1eqngTRBDiGt4KNj40n+P7qOdoUGC0vcNFSsprtbZmzyCyPzIgVqbIrLlnsz6C1tUFqP eEkcbpsrnF3YQG+J9MCAGI+ISY9gZ/Jh0fdvIoD3zQSem5qTMTf814S24WQn3ljBjc1V HlqM1PnseGVPlRHfT4QioEenEYqyYr/04BjDxdy/Eln7//bfNR45+zqhVumA5oZxOrZM Y/ZZ664vuj/9YHmP1/YBasOfn8S+ikTntkl1D7lLbfZ0rYpgfKWFkzSC1DG3XWLlrea8 vVZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=2KOVOcfYuj2dYEI97Qhr3jFz6dLI4+K22C1nakZO89o=; b=g+i4aOaRnEB4712KgocFxcw/DpPwDswOf1s7IsznJQY0wUirDmvtAp/hjlgOg1FoXp EjIHsykKNlLxE27Vj0kp7mGUcXEqynbmRrGZHbswJWMdh/goMmCRcya0d2Lz43zMeWnE KtM97JqeTiYOT+TFU6cj6UUgyZyyRhNPEFa/mZ374SWKr3KKtHi9kAMZRRBaR6ZlIBBB kBcnk9fpxIXWRjk14uJ4SOyEcaSuEqymj3Ww7++hFbLs735yBRs5aT75H8T2YIQKgooZ tN4UdBkg1j/dLP1mcitEn5x65Ju3NKTb5hUWGXsZeBXtfzJAxtLuD+oU+UaXjI4gm8Yf NqvA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a18-20020a17090682d200b007386f4ab2a2si553534ejy.638.2022.09.09.08.26.42; Fri, 09 Sep 2022 08:27:08 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231537AbiIIPGE (ORCPT + 99 others); Fri, 9 Sep 2022 11:06:04 -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: X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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 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