From nobody Thu Sep 19 00:54:07 2024 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) (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 6C04317D89D for ; Fri, 26 Jul 2024 16:37:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722011863; cv=none; b=lqKCEa9ppYoin76nZsbKO8veOg3xBR5UaU3AUEePvyAVBWRwz4pnS/f5QHdZHApTDLU1Q5zFpRVcxvXzAwjDnNR9gbbn01byzZSb8VKu0cChqBFG+aqCY37gzX4ept/jqxriaJY9j36mBH2mlebgwa8RG34J0J0HpMsMLZXh25Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722011863; c=relaxed/simple; bh=F9TUuRxlIYugU1/usYl0Y6QWEsQM7GZcfyLclleEylQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hTg7QEiuTIvCFyMYxTnyiMBBWN1CdgiQ5L2O5QK2/m21Y+2O7wb1NgPX15iR8xDxSARdSBjiwQLnJvBnSyY4H28CzpnW5lL8m7gHF8XFYid/TVL/vVYPLJ7n5AsPUu2osWGFJeEKelXJu0DOytp/P4FwOYq7gL9IRv2iSXFlCVs= 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=Ylp7A1zn; arc=none smtp.client-ip=209.85.216.51 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 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="Ylp7A1zn" Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-2cb55418470so833803a91.1 for ; Fri, 26 Jul 2024 09:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1722011861; x=1722616661; 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=o0rt4u3JgYQdmYK/5XCmCvbMmsxncqWCmcN6vbrwaOA=; b=Ylp7A1zngH6RlgwwDxueNwnrfdZOJB1xgvITv5VuLskUrJyN4K9j+R+0Ksoqwgtj8c 2qSuy6c+4Z+1fDnVE/X7JFDSvwdMH00s7R30QlgVjPf3CHdZmw/K1SP4YdSdPDO8aRj1 7/dZ5g7x2hj0gvnmavHxBrASDnb2O019fjphHV1QYIBcLzdqkhaJyqr87AMshaLxnF0H clKjFCGV327LtsxvUFkeS7b7ZVrGvNFJlJz18ffFVrJ5PPcSFCWr3LxfXtRWlgkQXubs iedK5qkSRLhKIAZoPWQ8v9ZTLJqWDxAAWLdN22WCdjG6Hg6NTA2uT8qOAs6rqJjMut/2 hWLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722011861; x=1722616661; 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=o0rt4u3JgYQdmYK/5XCmCvbMmsxncqWCmcN6vbrwaOA=; b=A3YI8CMfj9UqRzJstzW+7sGMQ4BjerjHajuHj/PSekJIvrLzjEGVQHKBFLtTs29nsp mpVgDjBzQ2Nzap6ZRT/bYanJV3EIG6o/rIDk3U4qKu6WpSzdAIWPfXUS5umukIjT4mZ7 Y0GLjKAPba1ZFl20DIBWTfOkEWHSJ1d2Lx+dMlUNR1oPfL3WofDJeabmunFPersQZ4ll 5wnEgVGREejylgeRvP4nfflDbhVfOIsHOOWXzREcmmYQJOfsbCYu5Md3EWDKT3XgOFET d7P2I+C7mQ7vTUSKm9iUgEw7Icyf6qH564uSBdx3pNGSqPPIZl0eyucSwtQzdRhPLat3 tFiw== X-Forwarded-Encrypted: i=1; AJvYcCU/2q9lZ0JckPo/iPL5FQAaC6DVRjtS2WElH9a9EJyeufWaJuZZB/wWu4YByDQeclv2c+zrXar7jedOr1uLYgNnkOMZPzcqBSH9br+M X-Gm-Message-State: AOJu0YxyDJ20MLKooP2gEm3oF1ZE4Eho13SWKfJDbGZUXUkYymVM780a jCaE7MeU48QlVKz4aANa/AuW9QQSTXrGvhRmG9PQfexD4BU96suVp0rTMqJwI/w= X-Google-Smtp-Source: AGHT+IFt0Hx7tCHd8rmEPH3r9WQzWMpJRolI2HaFqal33DHnd4BM9lIVbdq7BXaVWa8aOT/1lsYEQA== X-Received: by 2002:a17:90b:2552:b0:2c9:62be:292a with SMTP id 98e67ed59e1d1-2cf7e1fba30mr38548a91.21.1722011861534; Fri, 26 Jul 2024 09:37:41 -0700 (PDT) Received: from jesse-desktop.ba.rivosinc.com (pool-108-26-179-17.bstnma.fios.verizon.net. [108.26.179.17]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2cf28c55a2dsm3676619a91.7.2024.07.26.09.37.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jul 2024 09:37:41 -0700 (PDT) From: Jesse Taube To: linux-riscv@lists.infradead.org Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , Evan Green , Andrew Jones , Jesse Taube , Charlie Jenkins , Xiao Wang , Andy Chiu , Eric Biggers , Greentime Hu , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Heiko Stuebner , Costa Shulyupin , Andrew Morton , Baoquan He , Anup Patel , Zong Li , Sami Tolvanen , Ben Dooks , Alexandre Ghiti , "Gustavo A. R. Silva" , Erick Archer , Joel Granados , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH v7 4/8] RISC-V: Scalar unaligned access emulated on hotplug CPUs Date: Fri, 26 Jul 2024 12:37:15 -0400 Message-ID: <20240726163719.1667923-5-jesse@rivosinc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240726163719.1667923-1-jesse@rivosinc.com> References: <20240726163719.1667923-1-jesse@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: quoted-printable Content-Type: text/plain; charset="utf-8" The check_unaligned_access_emulated() function should have been called during CPU hotplug to ensure that if all CPUs had emulated unaligned accesses, the new CPU also does. This patch adds the call to check_unaligned_access_emulated() in the hotplug path. Fixes: 55e0bf49a0d0 ("RISC-V: Probe misaligned access speed in parallel") Signed-off-by: Jesse Taube Reviewed-by: Evan Green Cc: stable@vger.kernel.org --- V5 -> V6: - New patch V6 -> V7: - No changes --- arch/riscv/kernel/unaligned_access_speed.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/kernel/unaligned_access_speed.c b/arch/riscv/kernel= /unaligned_access_speed.c index a9a6bcb02acf..b67db1fc3740 100644 --- a/arch/riscv/kernel/unaligned_access_speed.c +++ b/arch/riscv/kernel/unaligned_access_speed.c @@ -191,6 +191,7 @@ static int riscv_online_cpu(unsigned int cpu) if (per_cpu(misaligned_access_speed, cpu) !=3D RISCV_HWPROBE_MISALIGNED_U= NKNOWN) goto exit; =20 + check_unaligned_access_emulated(NULL); buf =3D alloc_pages(GFP_KERNEL, MISALIGNED_BUFFER_ORDER); if (!buf) { pr_warn("Allocation failure, not measuring misaligned performance\n"); --=20 2.45.2