Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp384144lqr; Wed, 5 Jun 2024 08:46:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6gDfaeoCW98U5J87UPF6LJLspMOacnuGVj1jjOFwN4ZFRxQ0qhz5AHyI/vwRNgDfe+R1ZkFeI8HISwFeCQ4RVcV7Brw/Cx1iIlBd4QA== X-Google-Smtp-Source: AGHT+IFlT8x43RS7Pkkzct6ctPQNUZW7bUDJhB8Lpf9drBdjgmRQingXEoYc1pZnH5MnZReWwE7W X-Received: by 2002:a17:903:32d1:b0:1f4:8a83:a2dc with SMTP id d9443c01a7336-1f6a59ffa8dmr35750995ad.10.1717602369066; Wed, 05 Jun 2024 08:46:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717602369; cv=pass; d=google.com; s=arc-20160816; b=CEuj0Eeis+1lyg03qpdXtxyGoxyceAfYdv1htj8NVxOrs5zsPJz85Z7QPsbQx8QUe0 EJMwZbdjRk8tQG4gGWgbCXf72CSqIXH4hSqIFv/41XLkHdZsVi2K9DNRC07rQf3MDCQd L5q9J6xWDiOf29Yecb/rA0EHvTNKY8d6VW7236/aFvbvPKfo5JLSHfEMvKxHJ7cOENi6 hUfY2LsEeyk2rZOzP0jsy2Bv6CshkAM+3xbWX1yZIae2ta5iKeyM3DbtBJTptBpt3+98 /VDJwRMuM4fMlSMIfN+XpfSUYdBi0WkpeGUzNzBGNzF9409ZM6Q0hVlO9CIt3hULqkIy sj0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IcBvuhGsqvPNBrucaKHValSuFcrBtXSlV1ZvSna8wcc=; fh=JE+vLMuJlOpJEFLEfbfzwmdOGXjFC6MRlXHStNsMiRU=; b=gkA61e/4+TiAHGJ2uaGmcG66B4vqd9qbVwwOK6frmqyIzYeW9toH9c3NvYzZoiZzzK wW00P7PZAf6EQsdX9QBeOnX2RRX52V7St5rkEd8TIhYBj7vsecHIiSiQSkknCqztDNt5 +avTNxcJpPn7eaU/71/ZSB/WWy2eTCcNNRepCWW/0TXLEr5CgfynQYu+0uixsA1F0kdr H9wDzRoyL+5G5VKlrJLWQSDgxmphwriZKfxCAB3ZEt73k3pugBivvcFt7loF4n4CkaNU iUQ4My31FOxjhf1f31cVDlM7dE3xl0fTlOfhQqAPuiTYUoYWOunCdFgHlux6/mcvT5AP DH6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HkcFclWH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202856-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202856-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f632364a3fsi103562665ad.166.2024.06.05.08.46.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 08:46:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202856-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HkcFclWH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202856-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202856-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id AA141283148 for ; Wed, 5 Jun 2024 15:45:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA95913AD29; Wed, 5 Jun 2024 15:45:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HkcFclWH" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E0392145340 for ; Wed, 5 Jun 2024 15:45:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717602311; cv=none; b=GvTEBPKdMsy3z1ZEdsFL3fvOh/ZCJldNxt11Zgojc4M/5I1jCmuaewZmg4xA31vYDJXj8BCCv9jvxJPPwyaFLpyBeg9kCw9fpc4GXPgEAHBSCjFXUvuCRs5JbVvQictFiRjl3oAfytIoFwtyiGxqQgXawzAiz2QLp/IO4AgzAHc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717602311; c=relaxed/simple; bh=j0rMndXLq1rio0UdMWk+Pzy9T/J6NqtZCqpB/roM3rk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N0UWk/aO126S2MDIEYMUfpGRdBVVKcVO2pI/sdiiYk2MMP5+FBcIhN3JsjbrayzUO86N98V6fAe/AfSGaYCk4sD+1DxKnv3dAOpU5UR3CYxVtNywEFhG4Z5GWB4jkD6GDQd/6DxGEnLRcC4VfN+P6VPygk5IiUFYyCbs15DQvtA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HkcFclWH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0941BC2BD11; Wed, 5 Jun 2024 15:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717602310; bh=j0rMndXLq1rio0UdMWk+Pzy9T/J6NqtZCqpB/roM3rk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HkcFclWHz1QL9rIC3mApEB7RDOsAgvw3yccqB0UO8WGi56FP0DQKJi8c4RjOYbYuG 7XojgoBqScWJV3khwJMgmmZhFEZuadYXtWSlPh+u5qJM1sIvLEMLVgU2Kqz9ltvmmF JTJ83iK0LnBmip8qHlgyB/z6kayd1JZmAKqKuaX+PYY0Sd1Lc19bzmNQNZFsuQU78p 8M5LvlPfFfkNtDar6BUQyfSFFmLXaNIIUBL4Uk4jbeeJXe5L1xxTY5DvOasGJtp4kR 6YFDotTR36BCFIh0dXnrZNJ3JgvzwKnHHr7lebNLGHwy+9KnWWnD2+NONqctCo+wqV jcAlJN42BWO8Q== Date: Wed, 5 Jun 2024 16:45:03 +0100 From: Conor Dooley To: Jesse Taube Cc: linux-riscv@lists.infradead.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Evan Green , Charlie Jenkins , Andrew Jones , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Xiao Wang , Andy Chiu , Costa Shulyupin , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Ben Dooks , "Gustavo A. R. Silva" , Alexandre Ghiti , Erick Archer , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v0] RISCV: Report vector unaligned accesses hwprobe Message-ID: <20240605-chowtime-mannish-d0f428acd173@spud> References: <20240604162457.3757417-1-jesse@rivosinc.com> <8e2556d2-8021-4e4c-9380-7568ff74a84f@rivosinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="03IvgSR7vpRDfuV8" Content-Disposition: inline In-Reply-To: <8e2556d2-8021-4e4c-9380-7568ff74a84f@rivosinc.com> --03IvgSR7vpRDfuV8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 04, 2024 at 12:42:10PM -0400, Jesse Taube wrote: > On 6/4/24 12:24, Jesse Taube wrote: > > diff --git a/arch/riscv/kernel/unaligned_access_speed.c b/arch/riscv/ke= rnel/unaligned_access_speed.c > > index a9a6bcb02acf..92a84239beaa 100644 > > --- a/arch/riscv/kernel/unaligned_access_speed.c > > +++ b/arch/riscv/kernel/unaligned_access_speed.c > > @@ -20,6 +20,7 @@ > > #define MISALIGNED_COPY_SIZE ((MISALIGNED_BUFFER_SIZE / 2) - 0x80) > > DEFINE_PER_CPU(long, misaligned_access_speed); > > +DEFINE_PER_CPU(long, vector_misaligned_access) =3D RISCV_HWPROBE_VEC_M= ISALIGNED_UNKNOWN; > > #ifdef CONFIG_RISCV_PROBE_UNALIGNED_ACCESS > > static cpumask_t fast_misaligned_access; > > @@ -264,6 +265,8 @@ static int check_unaligned_access_all_cpus(void) > > { > > bool all_cpus_emulated =3D check_unaligned_access_emulated_all_cpus(= ); >=20 > There was talks about Zicclsm, but spike doesnt have support for Zicclsm > afaik, Support for Zicclsm just means that it can perform misaligned loads and stores to cache coherent memory. I guess support in Spike would involve setting that in its devicetree iff/when that's the case. > but I was wondering if i should add Zicclsm to cpufeature and aswell. Ye, please do add detection for Zicclsm. I think that should be fairly straightforward to do, nothing too special to document. Cheers, Conor. --03IvgSR7vpRDfuV8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZmCH/wAKCRB4tDGHoIJi 0r7xAP9jbFQzTrog7i5n5EAYAE+bJz/oSCWgrT9GztBbC6wUjgD9GX0VhFIUjIEh r5T/gvSXy7WZaTg4asdowbl5nicgfAQ= =oWHY -----END PGP SIGNATURE----- --03IvgSR7vpRDfuV8--