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 39340ECAAD3 for ; Fri, 9 Sep 2022 12:48:10 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TMtF4PnsmINirhAuVMwhZFRDc4rvh8N90QbvEKZ6cQI=; b=nYn99qqOMdk0+w P8vv15SUuhWt3vwHwshQFg5tGIGn17Th8Rzla0DACe4EUhIk2olw9CuqxfJDCozJc2xDsPCrqZPPN DTsnBRloPDAsy/JIhFb3ZUDHTYBVQ8sKX8Cj5FyRxoK2l44zv3nfACON85R8dY5kuGb9vC+jbKWik olFCzb+6HKZUUugWpf0u8fGXBKHxQ207l653oZfcDlfCUDNlcXlxiuAf4HUuUS4AiHDDwgekYqvq6 ooZE9TrnjOZsPV48DJmmH65wRNzekJK0Oey0VnGQlTRTGETo6qGPATErJbJ4eXMpxcgHpgL7WvoYC x1F6XMQwjx8VPiYBUb8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWdPX-00G7VF-Ew; Fri, 09 Sep 2022 12:47:07 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWdPS-00G7Ng-Sv for linux-arm-kernel@lists.infradead.org; Fri, 09 Sep 2022 12:47:05 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 02B0A165C; Fri, 9 Sep 2022 05:46:56 -0700 (PDT) Received: from [10.57.15.197] (unknown [10.57.15.197]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2F0433F9AB; Fri, 9 Sep 2022 05:46:48 -0700 (PDT) Message-ID: Date: Fri, 9 Sep 2022 13:46:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] Report support for optional ARMv8.2 half-precision floating point extension Content-Language: en-GB To: george pee Cc: Russell King , "Russell King (Oracle)" , Catalin Marinas , "Kirill A. Shutemov" , Austin Kim , Ard Biesheuvel , Mike Rapoport , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220901141307.2361752-1-georgepee@gmail.com> From: Robin Murphy In-Reply-To: <20220901141307.2361752-1-georgepee@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220909_054703_029627_18AA6626 X-CRM114-Status: GOOD ( 17.53 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-09-01 15:13, george pee wrote: > Report as fphp to be consistent with arm64 Wasn't the original problem that the VFP support code doesn't understand the new FP16 instruction encodings, so in practice they don't actually work reliably? Exposing a hwcap to say they're functional doesn't inherently make them functional - if there is already another patch somewhere for that, it should be made clear that this depends on it. Robin. > Signed-off-by: george pee > --- > arch/arm/include/uapi/asm/hwcap.h | 1 + > arch/arm/kernel/setup.c | 1 + > arch/arm/vfp/vfpmodule.c | 2 ++ > 3 files changed, 4 insertions(+) > > 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) > > /* > * HWCAP2 flags - for elf_hwcap2 (in kernel) and AT_HWCAP2 > diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c > index 1e8a50a97edf..6694ced0552a 100644 > --- a/arch/arm/kernel/setup.c > +++ b/arch/arm/kernel/setup.c > @@ -1249,6 +1249,7 @@ static const char *hwcap_str[] = { > "vfpd32", > "lpae", > "evtstrm", > + "fphp", > NULL > }; > > diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c > index 2cb355c1b5b7..cef8c64ce8bd 100644 > --- a/arch/arm/vfp/vfpmodule.c > +++ b/arch/arm/vfp/vfpmodule.c > @@ -831,6 +831,8 @@ static int __init vfp_init(void) > > if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000) > elf_hwcap |= HWCAP_VFPv4; > + if ((fmrx(MVFR1) & 0x0f000000) == 0x03000000) > + elf_hwcap |= HWCAP_FPHP; > } > /* Extract the architecture version on pre-cpuid scheme */ > } else { _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel