From patchwork Fri Apr 12 04:11:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charlie Jenkins X-Patchwork-Id: 13626804 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 A4737C04FF9 for ; Fri, 12 Apr 2024 04:15:54 +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:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UbQt9JSadfveXhgY1xhOVnHt3XzCOy5cOvLbS9e/bVI=; b=ANgl3c7Pq6cLEw iiPRNe/Vm6mBs5JuSBgAJHKUVyy/bpsEgOFYqprQ207CCPl0J1PTegEAFDAHb7npcmPR/BXfxmFlo AvZjB/yjpIzYsK6f7eFigYK7Hfq1hF9NI0LB8fCI9BIyAQgD3+Us7GzwF1tKVzG5TabtX81VNQqmr +nAjLl6wx131HJkQJkMxmAIuo/vESAh6keJlEhdtWZjmUDGN/jk5lMeRruhKkpUz48ui8P04oAgns ZBl7aYeNNM2ZVlrsYZFq/kA3CDs6sY4Mc1Z4FuxTiaJvml3n6bfs9kT3ntbNPcsyH39mxhgvi8bz6 pyICcDkRz6zNO8qCfRcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rv8KC-0000000FDPF-1uP7; Fri, 12 Apr 2024 04:15:40 +0000 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rv8Ge-0000000FASt-0soW for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2024 04:12:07 +0000 Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-6eb5310e9fbso337763a34.2 for ; Thu, 11 Apr 2024 21:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1712895118; x=1713499918; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=89KkigznkOkTkIiVd8Bev6F1MF+EXqz9OwTBLz7EuqI=; b=CZhOCunW78v6Aur4v4i9s7nZlfGk/8M+BVBYvKzFqH7iNUHz5hzVsPECuO7NG8xzDn rRFuPid37noIRDdKp2eifOeEpKWe9cJqWpnt/+yQ24bHNS9ZHgDMaa0D/lkXbc+TWvHO wRK/1c/L/aKajAQ56m9jdG8CI2mcRLxuLnICFHy3myMWurg0HauKaGSj1QtDnOOMP5Q8 YRSOyo9E89CBOK6pnXZoi+XIQfcIJITqDYkana0Y27lvrM5xvn4Gd8uPpNs3rCOhfwPY qkwlySvCIWcQjWWHCfkoN7hr6Dq6W6oPH2kfwIsp+c0HXYvWMt+PgQhNTzdHmnlrHe7X Rlog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712895118; x=1713499918; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=89KkigznkOkTkIiVd8Bev6F1MF+EXqz9OwTBLz7EuqI=; b=SWoS1fZAseGbqG2gfBSx2Y8x7kzzkkphqQ0M98iSxl4B6WUeF5G/Psfj/eLHvIjduS AOLGrKAM7nNydjWw4mkAD9pBWWlCDpKxeHitlrs9R1fqvJCeekhfOILVEiB1xNYMK3Cs qgdYl1mzVeCzwM9w9d14ILvTGKAinUM4OO0rV5eo7XMgKFHI2ctnVhNygYvAYuxK8zb6 bHAtYiLch3RXOJfuXwPq03wypsM4AVdGjQGAxYm8LsvjN/aNrYeFs2KJfYNAKqZfemhH AnDFxNNE3WjcTF2D/F2PkSC8pqFE8u4ehayoY7QqjCn4QOZyxIzIJ1KFZzQqVUZimD1r FCqw== X-Forwarded-Encrypted: i=1; AJvYcCUXnIIGdV/vxTuDq7kIgMJOyYneSalGGvv8Ag+dbjIcHcGSZp85HapuCKyKyrm5hVvDco0NEOJ9NT+CeN0jcwiJcKgEipteePcogr7Jlm5/153FJ0E= X-Gm-Message-State: AOJu0YyTFD37ny/+7/Pf6NQ8hkOz+dsG8mSdmgOeOEiwWaQgpZ8C96Ef WUqmwbtXDEiI9M/esPLrK7WMoEp3BL2suxVhMmdoqgPzrFupfK1KWzjfXYxKEgc= X-Google-Smtp-Source: AGHT+IGcw1jnW0l0MGMcAPq0tGxntmRUuPWox6H1ipX7MybXPBxYHdvKCOaV97uW9OMyYzsQMOMbXQ== X-Received: by 2002:a54:458c:0:b0:3c5:f333:3819 with SMTP id z12-20020a54458c000000b003c5f3333819mr1496177oib.21.1712895118136; Thu, 11 Apr 2024 21:11:58 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id ka13-20020a056a00938d00b006e57247f4e5sm1949712pfb.8.2024.04.11.21.11.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 21:11:57 -0700 (PDT) From: Charlie Jenkins Date: Thu, 11 Apr 2024 21:11:20 -0700 Subject: [PATCH 14/19] riscv: hwprobe: Disambiguate vector and xtheadvector in hwprobe MIME-Version: 1.0 Message-Id: <20240411-dev-charlie-support_thead_vector_6_9-v1-14-4af9815ec746@rivosinc.com> References: <20240411-dev-charlie-support_thead_vector_6_9-v1-0-4af9815ec746@rivosinc.com> In-Reply-To: <20240411-dev-charlie-support_thead_vector_6_9-v1-0-4af9815ec746@rivosinc.com> To: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Conor Dooley , Evan Green , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Shuah Khan Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Charlie Jenkins X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1712895091; l=1077; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=dpMQyQf6EiV3FnyfDhr0ctcgVQcOupbnA1FwXdRflyI=; b=yG9+AKMmuUbWWqUzPvnobYPlplrI2ZeAtqu5dbsmkCx71ozS6qstYkuGJ9cZehtHrREk7qb+H OVTyBaKWh53DGh3LtPRjDx7F743TkUYJceC/ov23653q6S2VSI+xJZN X-Developer-Key: i=charlie@rivosinc.com; a=ed25519; pk=t4RSWpMV1q5lf/NWIeR9z58bcje60/dbtxxmoSfBEcs= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240411_211200_822268_CD6DC80D X-CRM114-Status: GOOD ( 11.99 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Ensure that hwprobe does not flag "v" when xtheadvector is present. Signed-off-by: Charlie Jenkins --- arch/riscv/kernel/sys_hwprobe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/kernel/sys_hwprobe.c b/arch/riscv/kernel/sys_hwprobe.c index 8cae41a502dd..e0a42c851511 100644 --- a/arch/riscv/kernel/sys_hwprobe.c +++ b/arch/riscv/kernel/sys_hwprobe.c @@ -69,7 +69,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, if (riscv_isa_extension_available(NULL, c)) pair->value |= RISCV_HWPROBE_IMA_C; - if (has_vector()) + if (has_vector() && !riscv_has_vendor_extension_unlikely(RISCV_ISA_VENDOR_EXT_XTHEADVECTOR)) pair->value |= RISCV_HWPROBE_IMA_V; /* @@ -112,7 +112,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZACAS); EXT_KEY(ZICOND); - if (has_vector()) { + if (has_vector() && !riscv_has_vendor_extension_unlikely(RISCV_ISA_VENDOR_EXT_XTHEADVECTOR)) { EXT_KEY(ZVBB); EXT_KEY(ZVBC); EXT_KEY(ZVKB);