Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp225238lqe; Tue, 9 Apr 2024 23:07:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVLmz1ijOG15Wg8WBzgQFDjVSnI1F7gyxXOjpWcpPkGtq4qdKnS7I4xZWsK97caEZXVjscIyxhQGAlSSdVjPNUcn9hOPFeVuLYFZD62rw== X-Google-Smtp-Source: AGHT+IGERmjIPRHrvZKIOyD0wx6r7YqDD6lWYJ3+Wr2LzHM/1FhXxZg1hVGEN3Fz+MbsuAcXGtUZ X-Received: by 2002:a50:aa9c:0:b0:566:f5d6:4b4 with SMTP id q28-20020a50aa9c000000b00566f5d604b4mr998931edc.12.1712729267307; Tue, 09 Apr 2024 23:07:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712729267; cv=pass; d=google.com; s=arc-20160816; b=ZI1QkHHhdtqp3jr5FVH09ZpSGdRr+A8y/ikZL476Q9QYT+0KbjaJbZjHDeirgBrc+F JhqPJ9Fej1ph+PNoETKtBl9TaMvudNDjf38lNGqrkVtJJP+q/Jm+FjiaE+cs1suJcqp1 tiS41tGEOfGOo2DY71FYofD2sm2X+SSjAH9AQ6q8zY1XJVQ7PX2Ab5csXfyT41idvK78 mJjmsrFqc9kaUjnf+JSCuTUs7j6fEzXRH9u0yjoxqQ5nU67ZCmpPvNTwKjixUbo8mu2p hKkgVEKqR6tpCuc7jEQ8DJe+MtkK57bXrLYcG0RcrfexDJPD/uacWSo2rxW9RWT4pCdt UPRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=7HD66Jim+nwZQq959lBOed5rQReGmSf2I/APUr201Xc=; fh=/KFyttzMZI0+xdsQ3UmMDTwcK1OI3pwEw0WrySkS5Kk=; b=D67D7wcZEdMq7Eqne3vvKRiCMc+8VKkkSdrGEsTbVvMQ2fIHJ84h/IJpSQ+GuC1Dxg SJSZzXAIQOgX8EivIPW42+SzpLjB+pMFEyKWWEedzBkBI0y0wfeKT2ov2+IdIt2HBNTR qMdn65MM4scLJSG92nKJ7jg9ZvBztmEMK1tOz0cbzXkpOxq14kocfnHzbEGQ8Yyuh9KD 3teHcCIangirKhs3d7H43gsPg2weq2vZbLwM+9jsFv95KwzMh8jke+xWS06C2pl1t4qT S/R/PwnHm0n7Uqq5QehlCr+5gH0m3Ie5WmGZZoVlNiLbAPqO2E4u+trZRj5tJ6uSXFkv kFkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-137959-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137959-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h19-20020a50cdd3000000b0056df3437cdasi5432913edj.297.2024.04.09.23.07.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 23:07:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137959-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-137959-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137959-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E64CA1F22949 for ; Wed, 10 Apr 2024 06:07:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F94420304; Wed, 10 Apr 2024 06:07:41 +0000 (UTC) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE08C20DDB for ; Wed, 10 Apr 2024 06:07:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712729260; cv=none; b=axxiqtl3osTGDBJqM00ebRNNgI9g2uPDurJBd7TqyzY3NGW7s95VbzUj9FUb+ACJ6Np6clDGtbpSpmqvzgAFvriOHuVHYIOx5UNQ1SrqWcKVWQymhgsCL/Er61hVpdBo6a5YenWIlCYJk/N9RXOxIQBpM9gxUTmVBtMR6mk7P4s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712729260; c=relaxed/simple; bh=WX1tDgIme+L3XE+HZdKDtwNhwJATQz0mcJAPfpArHVk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=EYz0Qblyc08u3h+7icbClS/PnJ72F+qgxfqQHroygtxv6w9aPXK7fkDgnMPvb3Cs5bcPw6TNeq1QiuK/r538WnB21LMzFYUbHr+K63hV0WIVuGQOS99I8azhSboPVKlPgwlMPfbXjv82B7zeL+EN8vztZfph5Hn2tv+r8linuyM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id BDECDC0007; Wed, 10 Apr 2024 06:07:33 +0000 (UTC) Message-ID: Date: Wed, 10 Apr 2024 08:07:32 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH riscv/fixes] riscv: hwprobe: fix invalid sign extension for RISCV_HWPROBE_EXT_ZVFHMIN Content-Language: en-US To: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou References: <20240409143839.558784-1-cleger@rivosinc.com> From: Alexandre Ghiti In-Reply-To: <20240409143839.558784-1-cleger@rivosinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: alex@ghiti.fr Hi Clément, On 09/04/2024 16:38, Clément Léger wrote: > The current definition yields a negative 32bits signed value which > result in a mask with is obviously incorrect. Replace it by using a > 1ULL bit shift value to obtain a single set bit mask. > > Fixes: 5dadda5e6a59 ("riscv: hwprobe: export Zvfh[min] ISA extensions") > Signed-off-by: Clément Léger > --- > arch/riscv/include/uapi/asm/hwprobe.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h > index 9f2a8e3ff204..2902f68dc913 100644 > --- a/arch/riscv/include/uapi/asm/hwprobe.h > +++ b/arch/riscv/include/uapi/asm/hwprobe.h > @@ -54,7 +54,7 @@ struct riscv_hwprobe { > #define RISCV_HWPROBE_EXT_ZFHMIN (1 << 28) > #define RISCV_HWPROBE_EXT_ZIHINTNTL (1 << 29) > #define RISCV_HWPROBE_EXT_ZVFH (1 << 30) > -#define RISCV_HWPROBE_EXT_ZVFHMIN (1 << 31) > +#define RISCV_HWPROBE_EXT_ZVFHMIN (1ULL << 31) > #define RISCV_HWPROBE_EXT_ZFA (1ULL << 32) > #define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33) > #define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34) Reviewed-by: Alexandre Ghiti Thanks, Alex