Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1125723rdb; Fri, 2 Feb 2024 14:54:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtTByaAsUHstDIRZbpIuZMKJBRzj316imv6Ke3qAYLcoCmF+XULwi0CYy6aIvdkLUrzde3 X-Received: by 2002:a17:90a:ce03:b0:296:67b:1892 with SMTP id f3-20020a17090ace0300b00296067b1892mr6363865pju.41.1706914471996; Fri, 02 Feb 2024 14:54:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706914471; cv=pass; d=google.com; s=arc-20160816; b=nP3fwNqJ7Hfzhqcfr8fKEvHWWk1RscwA2RA3ofJyLz1yUSoViFag4UwmFFmi96rkTe 6GP/Xhznze4VNExfwT9xPbjCH//bpxaxXCHjyk59VfLwqo2HyNH570xQJ2+qB7rDVJRz 7+uhvrxVWFKfbNSjsJtt760lHOxl1b5Sk2ICYQ+MeI/bfQgQLgL8grHzSCUZR2u/wPKX f/bnVbPtIY4r91lANCiUoXNv/IHVL2TblM/JDa3cbL/n5KkABJTMaBLd4wzKerAARr31 s/WU05ZFcL9u6XTajyehXnENkFnhZr7k9IP4xtHDLFk3ug18jsiGikXSAwVMqTz0wOGe VM2g== 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=lpYpfX3d0lEqY8NemDQnnpajZ4Q2WhZVnT+X6mZcTl4=; fh=Lk/1249P/DoMbku+PrmxSQh4Rwdolqxjaw/qCRyTEGg=; b=YjNfFG1N1R9hwDCSBHYxPxAOsoonRzFBswOGNQY11mx/XdETnPweOGE0gh0x+URe0v NXnYTb2sXrm4/7+j5xlYTgKb95T+qhC0TY/Tvs+L70aVEhFf6DOxMoFLAGRrwE84WAeF MY9KnwjRv2TBDHkXhj72xrp2kaQnDl+CmB26Dce4XLEtvogCS6Q2M18efnVIUTwP2Rb3 h6KrYlOjlFi5LOdT/VkauZjagc9G+dYTErJ2kqHg2CNGU93ji/C39Lm6eG1UUpHft684 HglEaf6KadlM+OvcSO8GX2QntIzpxcMgbMyaNUMpiU95UUrRTPioJ2l57xDvfM+Udd+r pSYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=boSTt5Zf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50683-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50683-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVeA9/TsW80TV4hgEoDnSECeqr/dx6KyxjRgRnEDcoRTeDF1B95DAqi4S+jabo7Hmsq2sJGDcnBGfgnkWYFo5GS9dcqUvkQ05wZ3+yyjA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q11-20020a170902c74b00b001d936f175a2si2252671plq.594.2024.02.02.14.54.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 14:54:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50683-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=boSTt5Zf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50683-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50683-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 980EEB22325 for ; Fri, 2 Feb 2024 22:49:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 961A2126F1A; Fri, 2 Feb 2024 22:49:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="boSTt5Zf" 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 BE5771E876 for ; Fri, 2 Feb 2024 22:49:41 +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=1706914181; cv=none; b=V2NJ/MFa42zd+AKUszXL4KeO6ZzX67fLdSZhedr/coFLSLiA5SqnkSkW4RvygUlB4WEleiOsy4KzMtj4Px8zlzT23NSnpzBBHTAyMHUjNylHa/ceAwlwT7narFZJ7tDRhakRr2pOBwcZArv7M8lO37Eoz9CD5J7UMByEZq5MKhk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706914181; c=relaxed/simple; bh=XeSblRB42/YZlnp1E9dabRYvXz9IdEs8lmOUxmmzrv8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=e1rjW/a+vzKWm0XPm/VJZdh8X5Da5QJpfdaLr8v8EopjDesohu3nswgD9ReyWs4OAcIJUzv2EDy5BsBdlbb0cZvAbKrYRb3VR0jf9kXX5HpcJTLnK1oaQ+reVSbNRUbq1rR/78Mmh/h6nXxxEzw9kOwmVFo+ZGqd50ThSbs4URA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=boSTt5Zf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14372C433F1; Fri, 2 Feb 2024 22:49:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706914181; bh=XeSblRB42/YZlnp1E9dabRYvXz9IdEs8lmOUxmmzrv8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=boSTt5ZfXfEhnNFa36YvwU7Nzq7lj32vsfw5RxaSyX34RDQ9ifG4x0K2YrUBqBex4 +NqlnDTi0OBRs9rYZu+I5xznmrg3ttkn/6WJVN9BI2iTaI+ITK91rSLnlggH8sC1mQ ePWg/G8jdeEDP+LfGyRfX9AKc2SdJ5LE7PiIXR4fXdIAkK7PkuMaxJ5R3DkGGyD+Vf mgMzTXzk5Vf8ZhGaoIShF40ohMmw+W5YmIBlAksq4GrZj3hMd7sWybiX/sS4OdYgYS QwEV3MIYJ0VfBSpzzWgpcFZT98JLsBeYf/hw7qyTl5AL+LiHjZMnuKGVVP0FAlSO0Y 3zQG5wrTVBybA== Date: Fri, 2 Feb 2024 14:49:39 -0800 From: Eric Biggers To: Charlie Jenkins Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Evan Green , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] riscv: lib: Introduce has_fast_misaligned_access function Message-ID: <20240202224939.GA2055@sol.localdomain> References: <20240201-disable_misaligned_probe_config-v2-0-77c368bed7b2@rivosinc.com> <20240201-disable_misaligned_probe_config-v2-1-77c368bed7b2@rivosinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240201-disable_misaligned_probe_config-v2-1-77c368bed7b2@rivosinc.com> On Thu, Feb 01, 2024 at 03:30:45PM -0800, Charlie Jenkins wrote: > - if (((unsigned long)buff & OFFSET_MASK) == 0) > + if (has_fast_misaligned_accesses() || (((unsigned long)buff & OFFSET_MASK) == 0b101)) > return do_csum_no_alignment(buff, len); Why did the 0 change into 0b101? - Eric