Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1748463rdb; Wed, 31 Jan 2024 08:00:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHPKyVtSMfoZbGAMByh0iUu/qbZ4GTfqsYohj0h6i4HitHUaJe5/TiDC1LWTnFxbYv3y4/7 X-Received: by 2002:aa7:d456:0:b0:55e:e463:f4a0 with SMTP id q22-20020aa7d456000000b0055ee463f4a0mr1257810edr.5.1706716845809; Wed, 31 Jan 2024 08:00:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706716845; cv=pass; d=google.com; s=arc-20160816; b=DSXs/9iwznTzCGdA7ggIELyyPsemGzMpvo5ZTqm5co0CvxxjdIqs9bM2NCPTpaX6lB Uyff28hnUGX0SS3J6Vp6H41vIZeTz+tpiTYqYjCJ04t2DLt+B6z3777bgdrKKueLMVLP PPQuHPlBa3lLxBQ+L5SEE+Jq7Nr5suFFYlOyNauGZUevgDWTBsiZwq19uQ+LtceLonh8 nfdGUPL7R+EZm+tiaSkqXuQ1LenY079bqejgUFa0sK1xnFNAOmErU5UgRX/1ICebIeA+ Rh5RboOOnc99DzaY7cdDj/83082xq/BMK1dfHefTHlS6jPm5d3mD2sXq7Y6WIa0zfq7A 4hFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=l+Qkjn6hBpgJiZ+fG8bZMEzxCOTIiddvh/UVG/MhUw0=; fh=8kQ3GomW0BFfQlaPvIasahr2Mr2KAfkedeFRyTT5Kx0=; b=GehPE9RfKpPmStiGlNMclEdX4bRYzwqgU5bGBTiYnmJjkh02MiyFDT4vKe3zRF6I5o 2N+27CSLJLpNSGD/v7faOq2RIE6uL8/gKDkfKyRq8w/pzQNjjS5WdXT9vK7eNiTyROY8 ndZ3aF8L0hu+VGWBq4kn0mHKnj2gVRQjtws0l+Z0YLKFnzkpYSTVOOVqLH9jqEcLGzBp rvithVibPVm7x/wR1SXzzH7mJQq/1GZ0q2oAWRk2Levu27pbCj8kDd6cbdOYzPdveURp keTodUQfdeV+5bAqAh/F0j7LvhNAmz0qoElmggw+wcP0LDpZzjatQg1GQXUs6qMs9QDV 9NGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="qRe/M9ly"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-46748-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46748-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCV93e7GDwKQazckmTksOHJQWX9e6+8R+d06IavG8k5AaKQmtDaeydILnXY0hI/YxBmjQhvcvw+F50ienhhnpuW7u9Zb3dsJU8h2NcBTxQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id k4-20020a056402048400b0055a90d7f270si5776051edv.178.2024.01.31.08.00.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 08:00:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46748-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; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="qRe/M9ly"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-46748-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46748-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 8DD071F21E62 for ; Wed, 31 Jan 2024 16:00:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 429A412AAC0; Wed, 31 Jan 2024 16:00:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="qRe/M9ly" Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC207129A9B for ; Wed, 31 Jan 2024 16:00:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706716837; cv=none; b=Nwv1JgNMRyY+8gkye7bMMJ44dVD9LPCPuLI1OPvvc2KdO8wUNqI8kNmqFcTrCCdACRQohEFq+85ut2qKH+C4FW0442gG0RPChVMdkSNBWud/S5uOw4cd3K7YwUHyKKV9jHbFHnf3e+3N25xLfowAge48Rdeo8UJ/iuIurf5WbTM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706716837; c=relaxed/simple; bh=nSwfX/I4NKy222TEBcW2+p2OJa9bkp/fM57ofciF4KU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IfsJRI/J1sYrIOOJhTRFWw7WkISqnDGmBLUa3TXZzHaUIeI+b8QCYwZ6fUHcB9mABfFV7+gMf+7QHLw5hWLdTDVTKU6Vj5G0yxMB/i0KSlp769L4ivDiD7Hj0z68UNh2t48ULygTtNrZwq86FwKDix3ObLF1AcUQSaP0M6+il2M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=qRe/M9ly; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-33af4a0beb3so2013496f8f.2 for ; Wed, 31 Jan 2024 08:00:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1706716834; x=1707321634; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=l+Qkjn6hBpgJiZ+fG8bZMEzxCOTIiddvh/UVG/MhUw0=; b=qRe/M9lyL9TEurl6SK/dcol5VR7SkE7LbiAuLQmNDtxImrLPBHBmgC6k44wqBjAohu kUQ7OzDQSWL3PRypkFw2PI7rQ1oRUND5mJi8s6aFD2MMrPFyFCNtAFZYCpSZ7QLIvrjX vUlbzHFy6HzyVB/5XEYdfoGgnp9wQA2T63xeLazfZBgLlGU1ZxAT/U3nkK2+XlwQtwYF 4Cpe4Wp4j4Bm9DScWYSRmPJZvCUn9yHEpQzNq25inrqxdX+bMemDEleL+SGPCDaWzaL8 Agm+xPMoIKI5a+hKq3WQiTdH1Lo3KFTXK6CgrA/SQuKjza9yBgnTctwXUIxqSFOn2net NYgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706716834; x=1707321634; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l+Qkjn6hBpgJiZ+fG8bZMEzxCOTIiddvh/UVG/MhUw0=; b=hl3WshjALooWWXeqzZeyww4wXyLoF/bX1hDYEHYfc2UqbQRROkt+NU69KWUmyfjdDV b1UVgfDg7S6RfirExiDITBhfxTl36qoO4QBK9ZyMY2qD425vBDhqt2VTyQ8wtdIYEMkW dxQfRl6pU/TATlZ/gJYzdrAbjWGUnQxhDuZRDCDxCofEamlx0pw2BsKQsx7rf9oyKSfk crBNbT3Kqs01jHncjVCWezdBuO06nrxOBoz1r3c/VsjJjIARgkerbkW058vyg2G3oaVM rQhBi+jY0XGHgOfVtHsx/sLHr0J0Z4tl2XZkkMLVHK+5SQfogJTgRCJIJynKA7ByMQHm JSbA== X-Gm-Message-State: AOJu0YyCysl5hpx26eQ0ymldk4volxo4TV56A0y8X8JRR3DTjP4yxt0O +gIkJd0qJRW54hRolcuDdxvQbVoHeSJ6kOaDlxfC/9B3XnSEFsrFLDy+Te9mWFU= X-Received: by 2002:a5d:5917:0:b0:33b:d2b:58f3 with SMTP id v23-20020a5d5917000000b0033b0d2b58f3mr558876wrd.19.1706716834000; Wed, 31 Jan 2024 08:00:34 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUn1b13ZNRzCy283eTAlYXQTLMwRwVlajpW6U17NkyZK4wk2yBhhQ7T7nAGYIIbO3fJ1ARDkhMYCymd0vjQMM0mrJ0m/2m5lqBZyglATKjW6Zzxk/B6IJxznkuZmxZ1TJ3cH/Jp7BwBza6guGnEdasuQE0GewfiE3ubxHmLjvIs78DGDJSzfU/27VEF5pveogS4Vow/bhAbdFMdW/IYDGaAnF3nYumVGAKKCQ9nOgSKC2eBOC9xOLx9JnZoKZ9Ho2yCI5z7MSseFIDdPa/XkBHE54iCbRdQndKCDPy8bxiyotgwxiZcx3+SuuiPofERe0MckS2S/6E/kyrL0HaRaM6pU0woqZankCuKbNH8VnYSPLkzkZXNl1AoJEPO2fnXvrc8+TnmO3oeiqwbluhwV/1QlsQj8h5rpppgqTJEQ3xcqtL5sWlt6z665n7oC4bUikHUEWzai7vZXm1fcPUkYFOER3XwNdulkf/usUZHT/OjBrDM0lxJa6CFYX9RdHrjmrlArydX8NPIXD5OMrv4c+E2pFpdAAT5fFO4s3946JLh8K6iNGoyV/fVL/yo3WohQ0Ry8fKH1EPmF4vZRA5gJKtC5ux/QZPWhUJlSKGm0HRLl5zV1RXt+xleNrI19UU+2m9Tgg+hmovoV0hevg== Received: from alex-rivos.ba.rivosinc.com (amontpellier-656-1-456-62.w92-145.abo.wanadoo.fr. [92.145.124.62]) by smtp.gmail.com with ESMTPSA id v8-20020a5d59c8000000b0033af2a91b47sm7494000wry.70.2024.01.31.08.00.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 08:00:33 -0800 (PST) From: Alexandre Ghiti To: Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrew Morton , Ved Shanbhogue , Matt Evans , Dylan Jhong , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-mm@kvack.org Cc: Alexandre Ghiti Subject: [PATCH RFC/RFT v2 1/4] riscv: Add ISA extension parsing for Svvptc Date: Wed, 31 Jan 2024 16:59:26 +0100 Message-Id: <20240131155929.169961-2-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131155929.169961-1-alexghiti@rivosinc.com> References: <20240131155929.169961-1-alexghiti@rivosinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add support to parse the Svvptc string in the riscv,isa string. Signed-off-by: Alexandre Ghiti --- arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpufeature.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index 5340f818746b..2e15192135fb 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -80,6 +80,7 @@ #define RISCV_ISA_EXT_ZFA 71 #define RISCV_ISA_EXT_ZTSO 72 #define RISCV_ISA_EXT_ZACAS 73 +#define RISCV_ISA_EXT_SVVPTC 74 #define RISCV_ISA_EXT_MAX 128 #define RISCV_ISA_EXT_INVALID U32_MAX diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 89920f84d0a3..4a8f14bfa0f2 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -307,6 +307,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(svinval, RISCV_ISA_EXT_SVINVAL), __RISCV_ISA_EXT_DATA(svnapot, RISCV_ISA_EXT_SVNAPOT), __RISCV_ISA_EXT_DATA(svpbmt, RISCV_ISA_EXT_SVPBMT), + __RISCV_ISA_EXT_DATA(svvptc, RISCV_ISA_EXT_SVVPTC), }; const size_t riscv_isa_ext_count = ARRAY_SIZE(riscv_isa_ext); -- 2.39.2