From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f180.google.com (mail-yw1-f180.google.com [209.85.128.180]) (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 33D4C3236 for ; Mon, 1 Jul 2024 15:49:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719848967; cv=none; b=SX5jjQ2n4U6jGS3un5iEiG+qNDrCmUGGSdPrsqQ7mJfHdHfhsIuQNrllgwsY2uFD+lbZI0a5+hJhn64Snpz43D4WV/Ys0M2JeQyLRZfIYUb4Pe8iAChlqqv/0NdD93esNSaGoNctl/R+9AVGnOb5EUuJ7Yhw2dnENh6VAEio6nc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719848967; c=relaxed/simple; bh=7wpTDCYkfM0h9G8p58hcJdgXA+PbS7WdaAYXL72gy+A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=X5/3RQswbm/6WOnRS6H8EOU8QpCYK7omPgVybSjCvwlfJFJHXO0zEi1+LdwdQ2gJLfDoqyHnaEQ6x6tvL9SlMsJ/0areJztx9H/3zpH1idFHsRwbDL4RolsCcxB30RreE+uOqVgh8kG03gCc/mbOe+BHMpKgAJlQ3Kon3jejBIQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com; spf=pass smtp.mailfrom=sifive.com; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b=TxpvVahb; arc=none smtp.client-ip=209.85.128.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="TxpvVahb" Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-6325b04c275so31901067b3.3 for ; Mon, 01 Jul 2024 08:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1719848965; x=1720453765; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=umkqtCJW3Dg9JtpfzIAAg1v5vJehmts33cJFqn8dvR8=; b=TxpvVahbrreOtYqdLCGsduPIeatSSJqrD0sRe9SrSNMVR4h1EfRwr2T8C+/TXTphey 1BvOTolUqFbaRFbJ3vB5fzv996sDKqXyIF4LHe8w/C+bfwwojFnWtd63R3dxhoW+LSUL xDA1jnAK69sfslASgvaXKar/FVcP9oCchikDH9PKqlwdfIZ6jeI4c8PiDIdw9SKlbGPQ nlt8KYun7Gp1zjHEC4JDa2huokwqPfoqTXWOuwFPT/J5LXbYer1i8aSIxhLsWcpW1VWN 9M48huni+ruHOgpD8eIlBQSX8sTaL0RBGMKzYRqziilz/VWdIlBiZgpUv8y30Y++hxtL whww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719848965; x=1720453765; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=umkqtCJW3Dg9JtpfzIAAg1v5vJehmts33cJFqn8dvR8=; b=i24pK9BafIy0uZ9sCsGX5G2N9c5Yy/a1IfH2wrXB+wvjf9YVvgd6m86zKVoOdnSE3z K2RxTT4OvpBv+tyY1MAc4wtG/Y7z0jlq5waysftPrHur/Ez+FyiAP1pWiISSvA+sMeXh QclX15L2sjzFbxCrwgacEytEtKmdRHU5KAthg7AEruefVUZN5209J3o6Idazw9kZTaGs VoXstr4zVWbvrrrYx2wALY7oto1Eg+n7qxD7WNzQ1OEYDRhr73bIf8IR9Hto4eG/S8lI 1M7y5NJqBzp/c48nqc+9UvaeEYBq8DhX1OcYppJk92iLM/HNhsPR6KTwoAYs6xTGKd/7 ZC+A== X-Forwarded-Encrypted: i=1; AJvYcCWFa1ispoSM8P3Kth01An4B6ZcnYYRxyTcPPHccDDGxSE2l+CbjdvmbtXJ63KKHZz9r8lBhVAAbW7v6NsLz2roGpMcjMV4yHn1wHa8o X-Gm-Message-State: AOJu0YzG4Suw8nLmO81LYRfVgl1ARQCqEWg6rMk5l3VeO/MmitwNqENR bj48R19vjbZjuir1S3AxPL7SteRQZ15jQ1JTR6KkyxJNldItxbafVTfBdaRRU/E= X-Google-Smtp-Source: AGHT+IGu9I2wc2U8NTdlZqwI73pTcvt2JvT2wJhK92JWQZzopvjsvNausRGAk2vO9Al2yPEEKQkmTw== X-Received: by 2002:a05:690c:710:b0:64b:8e82:1f9 with SMTP id 00721157ae682-64c7123bf4amr65310827b3.18.1719848965244; Mon, 01 Jul 2024 08:49:25 -0700 (PDT) Received: from [100.64.0.1] ([147.124.94.167]) by smtp.gmail.com with ESMTPSA id 00721157ae682-64a9c405c9csm14034647b3.128.2024.07.01.08.49.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Jul 2024 08:49:24 -0700 (PDT) Message-ID: <54232f3e-4fea-4996-a90b-6de51e1c51e0@sifive.com> Date: Mon, 1 Jul 2024 10:49:23 -0500 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 v3 07/13] riscv: csr: Add CSR encodings for VCSR_VXRM/VCSR_VXSAT To: Charlie Jenkins Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Heiko Stuebner , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Jonathan Corbet , Shuah Khan , Guo Ren , Evan Green , Andy Chiu , Jessica Clarke References: <20240619-xtheadvector-v3-0-bff39eb9668e@rivosinc.com> <20240619-xtheadvector-v3-7-bff39eb9668e@rivosinc.com> Content-Language: en-US From: Samuel Holland In-Reply-To: <20240619-xtheadvector-v3-7-bff39eb9668e@rivosinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Charlie, On 2024-06-19 6:57 PM, Charlie Jenkins wrote: > The VXRM vector csr for xtheadvector has an encoding of 0xa and VXSAT > has an encoding of 0x9. > > Co-developed-by: Heiko Stuebner > Signed-off-by: Heiko Stuebner > Signed-off-by: Charlie Jenkins > --- > arch/riscv/include/asm/csr.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h > index 18e178d83401..9086639a3dde 100644 > --- a/arch/riscv/include/asm/csr.h > +++ b/arch/riscv/include/asm/csr.h > @@ -220,6 +220,8 @@ > #define VCSR_VXRM_MASK 3 > #define VCSR_VXRM_SHIFT 1 > #define VCSR_VXSAT_MASK 1 > +#define VCSR_VXSAT 0x9 > +#define VCSR_VXRM 0xa These are normal CSR indexes, so the prefix should be just "CSR_". Regards, Samuel > > /* symbolic CSR names: */ > #define CSR_CYCLE 0xc00 >