Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2402483lqp; Sun, 24 Mar 2024 18:01:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWCXDeY/ZTeway9y8MLumZaaX8IOowjHuzozbiEcAwCKbvV13Ccx7feLOVqkX5kiMYyqALne+XnOrNwrp/FQo0IavsW+Ht8E7vaQCkhNw== X-Google-Smtp-Source: AGHT+IHen7p9cDX1R4GXkjJdHjQLwMndeLtyzn+GA5OG5nokv/iiZsPAe2/1JwcKbnOg/GjbyWKl X-Received: by 2002:a05:6a00:3ccc:b0:6ea:8eed:d369 with SMTP id ln12-20020a056a003ccc00b006ea8eedd369mr6953013pfb.20.1711328507599; Sun, 24 Mar 2024 18:01:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711328507; cv=pass; d=google.com; s=arc-20160816; b=ps56Y9+JfnW5hckCtik2z/XzeXvW695dkIJp/9VrzUCiiiODL+J9TcklnAXXFT0qbA XfpXduMacgrbE0r3MbmRRjmMfaNNhOw5EG/aZ8s0l/1oaJzHVaClp9yGM0hiDktX9Xpt lnUJAzhHJbnNb5e1JI+j+c8M90kN0wJUjj1MaIByGGf72ep7CBPsrXV8kM7gtMxgJs7r +4Xw06xftJbLsMrxrxl0QUxxbA3DiKg+Ffs3Z/OVBD6Bgk6Ofpm8wdHxP/8loD/ISWYO 2BT9JOWCFsDaHwzlsKLBiQdtwvSrU1hqvj4nHttbL1CVsVxcaUp+MVGi6xSq7exRSZpY yNVQ== 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=f7353wek4mXMJSU37pS942obIh7s9iHDpruJOE9GB6g=; fh=7CQiY4WX2fBVhJp05nAsefDV5izdkCVR4Jn6ima0qkQ=; b=VIDlzZgGCSKKo2aaE2auymClyegN1eELpVawYhiHNmYj3jHGY5s0UhuB03GllwtyVy vGHHfmzatRC26DecpbSYwk6vHtorwvZHHDvVs3vRvHdTR4JtjXz6uf+1avGTgDdWuY1g icIZSYUESx2GuQ9SGqYE4htc6zmf3Q8cLKM+p89hakPfyChd1j8rPt+ZLY+aGHi0EAWi pXCDc2daXYrh9jTtwoXRCqBxwDO94ajiUdGfrN3m1JEkf4/JtqQVPfy7wdkQGULjmkQx flHMCncn3v9ytRHbHunMnZ8C0mTm/ynWkI6sFtujX2mRVU/3S8eUwvhtKKlfkirsN0/m PLNg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H3OmYPeD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113541-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113541-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m18-20020a62f212000000b006e69b4cc485si4124635pfh.80.2024.03.24.18.01.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 18:01:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113541-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H3OmYPeD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113541-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113541-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 1D2C22851FE for ; Mon, 25 Mar 2024 00:59:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 235321C1C15; Sun, 24 Mar 2024 22:45:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H3OmYPeD" 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 452BC1C1BF8; Sun, 24 Mar 2024 22:45:43 +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=1711320343; cv=none; b=eQUgVtxu3jac0t+xJ/QcYDi9CW63MnUKxq8X9TWpxI83MVB6uMoWTCcXlw4XcpC/o5u7w17rNwReGXv3DAOZ9iLtN5Zv8yeHoQkZyoRPYNWFcg3Hg1hYZVf6Zc0LfQIgAMrE3QoGi2JROZXOM+NGGoaP1rIeBAfFZD0XhP9S5zE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320343; c=relaxed/simple; bh=EQayvAY48XGcdY/Bs3X19JhpOzFM3Evjdmnwpr0g0Mk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MQFxv9hO0dnoumWdkWZAQ+iRQ3dGLPo4j1t28kfuaOKh08wQN82r3Wkt6p81rC5XRcQlglWB2Xly/td8XXlMtfeYwTujUnoGcNVaFAjFBFrzptqEbkC6t3/5kNo0BMMofCs6pCYUZXWJK2CSwlkaOCCV/VoUH2r67YxggUVPQ80= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H3OmYPeD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B65DC433B2; Sun, 24 Mar 2024 22:45:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320342; bh=EQayvAY48XGcdY/Bs3X19JhpOzFM3Evjdmnwpr0g0Mk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H3OmYPeDNlipUeO9IzihAS3SnqAWGzm/IUlE8h2UQ4UAaPV3V8ZYftfqftBRmXEf6 XY2EYxRKvSHJk5KDRoxSjYiTSzfxAhRjCDE9KCojiAbVpC/GwZpaG175ueOU9yElFX YH1ZP4lL4Dzrn7XbXLd4xBuoUj3G5GfvNh2d9gGhxInBVplQJEiZUzeXO8TLAyUlrC M3xsWTugej1nOCYTglyFH3g8KH6Mzwxu2iJPotIvKjs368RO4hb49aer0cT+XvwKpS b9wmX2c6cydkadCTFLaAi8a4zCZ+H8k1FGTjhXOUXOCIxsMmD+Rlv3/wtGmiCvHAp1 wImPT6tT1vu2A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Charlie Jenkins , Conor Dooley , Samuel Holland , Palmer Dabbelt , Sasha Levin Subject: [PATCH 6.8 650/715] riscv: Only check online cpus for emulated accesses Date: Sun, 24 Mar 2024 18:33:49 -0400 Message-ID: <20240324223455.1342824-651-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Charlie Jenkins [ Upstream commit 313130c62cf1fc410ac8730b291fd4fde582d032 ] The unaligned access checker only sets valid values for online cpus. Check for these values on online cpus rather than on present cpus. Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley Fixes: 71c54b3d169d ("riscv: report misaligned accesses emulation to hwprobe") Tested-by: Samuel Holland Link: https://lore.kernel.org/r/20240308-disable_misaligned_probe_config-v9-2-a388770ba0ce@rivosinc.com Signed-off-by: Palmer Dabbelt Signed-off-by: Sasha Levin --- arch/riscv/kernel/traps_misaligned.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/traps_misaligned.c b/arch/riscv/kernel/traps_misaligned.c index 8ded225e8c5b1..c2ed4e689bf96 100644 --- a/arch/riscv/kernel/traps_misaligned.c +++ b/arch/riscv/kernel/traps_misaligned.c @@ -632,7 +632,7 @@ void unaligned_emulation_finish(void) * accesses emulated since tasks requesting such control can run on any * CPU. */ - for_each_present_cpu(cpu) { + for_each_online_cpu(cpu) { if (per_cpu(misaligned_access_speed, cpu) != RISCV_HWPROBE_MISALIGNED_EMULATED) { return; -- 2.43.0