Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1833796lqp; Mon, 15 Apr 2024 21:14:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVTzlPKKqmyXUBHSeQGaKFeiOYrneOlPf4mq2h4ixOHnR7r30wVCucNbDqfHbyCNCpwfgjHuSofhwSkWtdWMZ3gYqPRQZlOQxcInaY8uQ== X-Google-Smtp-Source: AGHT+IFwAymlr7YjuAANnHIRyQUvpbRKvwlhXGGc/i3/AtePHHcCrQYoiqMblLv5IfD4SaxpkOkP X-Received: by 2002:a50:9f26:0:b0:568:cdd8:cf60 with SMTP id b35-20020a509f26000000b00568cdd8cf60mr8958594edf.8.1713240856814; Mon, 15 Apr 2024 21:14:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713240856; cv=pass; d=google.com; s=arc-20160816; b=pV/iDjHFsWiEUrTiJYQsb2PG++1vxUvFv3BRHJx53GHC9T1p/yFmG0Epphbq/KBv8f zf5z926rJz9wQpj8Z+5qTPStE4D869fNoRlD1Pa/MPwLDtcc7WlxWFwC6olK9p8ccSbi TObGTz4eB5VGWPVP01it56D5nFvK0h7q5cW3HOAfV1tgRTA3fVt9g4vi5bMXdm2PjBoy wavFx0W1iG7tOyKVx2mtYFBdwHY3ft9p1/J/T2G6IlpEWDBm984xN2iMZH/v6yh1RVSN YM2lZmLLxsFsl+qz+Jx/iRNJG5NPFQrGynFwngT3ZHc9MGmjCT87cdKvWu1ukJ7tblBL M0rw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=lt9+WFFQa5ypEuNBueQsHraOx3Sw6YlRb9NPkxzQDbc=; fh=i89M6PK7JIamWW94osl3qWkdg/9lx/4uXKvCiAcgobs=; b=ybIMXW3Pc0UmbXmll98BcbUmxzHbxTQyaY2gcRieAhMFsKBnk58QPJSN6q+409R4qZ JY3IsCRtnk6vSgNdtMJZP9XCKYhPNiUy66Tymdf7etUjiWghANJy5PZEiI9rhnCkJmQY LAAs3mggpR/aCoIlydFHncy94mDn7FBWVl0GAFzTbDYoY1BO/Kq0P+ISlpv4RdoP66sM mY5JTROa0PgKPYXb+32/fcqBP/JuMpGjpEfjCrh4QnN9SFfbdfg82fc5CnbOHHNS+Y5a e0kxHicVYM6BRM6u/9eMbWbwBzvEhkoCC/PZqLXffJ3yDTmVUB7PEFp7fkhgoyTcTJm6 JY2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=Qa9eSp7H; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-146211-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146211-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 28-20020a50875c000000b0056c3602fb40si5192224edv.610.2024.04.15.21.14.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 21:14:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146211-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=Qa9eSp7H; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-146211-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146211-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8BC811F23850 for ; Tue, 16 Apr 2024 04:14:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F31671B30; Tue, 16 Apr 2024 04:12:20 +0000 (UTC) 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="Qa9eSp7H" Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.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 D40F45B208 for ; Tue, 16 Apr 2024 04:12:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713240739; cv=none; b=IWCQIXaFHYuZ1gFgeg0i/nBgmUn5sguls0xqwwJHSTSSukCu6rCrdaaS1sMpqewLh4VKeMMVu+GKQbG+gJ28PRVTynfIYeMaSFmj1xVD+TT7iyOaOc5EXR0qHe3Wdi/AciczXftwIwB3K2FgHWpgi7cJAW+oTejoC9bFabT36do= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713240739; c=relaxed/simple; bh=pB2VSPvj33lI/8AQbCi/3smUxH+y5ljsCL7cqqiQMp0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HHz5k/DYnT1jI1Xqdve3RpuGbFY47TNkUv4gANtjphFAnHIBelK1iEKSNSS2gbPVxoXfK3drlgfJegS1zYMR2x3flr9DOeUPUap6fJKg7LJk3dlwR0MLAB6PWscf/7PaKhulyABxvUsTvt75frDzL4mAQ5dGjmiOHNIKbEDSs4c= 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=Qa9eSp7H; arc=none smtp.client-ip=209.85.210.180 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 Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6ead4093f85so3193987b3a.3 for ; Mon, 15 Apr 2024 21:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713240737; x=1713845537; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=lt9+WFFQa5ypEuNBueQsHraOx3Sw6YlRb9NPkxzQDbc=; b=Qa9eSp7HEMvyb/z5skEPZ7hdYXGhHogvjum8g7rKG6Hn4Aw6D743nMlCeLdQDOenbb SmQs1DUKgy6Nf0okAxZNgDYHgN36m/hArC1TiAtu0BYUcQeJLyIdWmoTT8w9HyGrAEQg /enYdahEHcCQOyktQScWF6/l3+u6y5VHaZeJMC73FAfj2OIhRfxA8b/wDGVL63J1qrcd /+gn/FMnQsSFVLCiVWykKTLavVggrzelij9fIaRqWQzVAerd3zsb8ehNtfeE8Y83j4Cq abureW3D6jMnEp8QWqvspYozb2stcB8SBQfj1gEA5kr7vVr69KSiRME8aZ9CS+ISUsuN 8ncQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713240737; x=1713845537; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lt9+WFFQa5ypEuNBueQsHraOx3Sw6YlRb9NPkxzQDbc=; b=CHSKrQa535G+BQjSfnwIcpSu+8xBuF+rrPWLdn3qKE+No0/Lp6sTH9AxgmAr0FwBgk ofUtoRKOPciMZISq4olgPmIY+7it8PNexlPIJ9DQwKA4ivEPdr54wLT50qTPz70WGMZu UQyjwhXkugpebVS4GIsK+vtREhLBGBNAyDO9dhKCbtpoJrFxYrPOJ1JuBuIHWh6EwYSN 8QLj44ceVF3He0i9uq+g59sK+aikP2kXjBrjYlYElcTaIjlL4AJLwnAphbNCHYWJ4Gxo c9qmusjjQg8M74XHWB0Km3UWYqfMnB9Ik6jXj0lHjpwPS9GulZN31pat8FMkIsboI4Gb RNDg== X-Forwarded-Encrypted: i=1; AJvYcCWdOhP79JSlXSAgWWfV8D77gXdlUENspHRSlWK1lJhMBd+9Vw15X4geL2e/bFGVEoXCLv2LyPGEYsactkNUg+jDlb+Zkdg/2mmMH87v X-Gm-Message-State: AOJu0Yyf+ubaI5bGVGTJ+tNHw4FWLP8JUD736ye1rPXsW9WI7VwqV8bH aWCSM+BOURNbNJrMJeH5stNH5I27yCflyVccEI5dEIUneW98ACO82rMTc/QlsIE= X-Received: by 2002:a05:6a00:2308:b0:6e7:3223:4556 with SMTP id h8-20020a056a00230800b006e732234556mr11616992pfh.32.1713240735967; Mon, 15 Apr 2024 21:12:15 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id z184-20020a6265c1000000b006ed4c430acesm8383149pfb.40.2024.04.15.21.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 21:12:15 -0700 (PDT) From: Charlie Jenkins Date: Mon, 15 Apr 2024 21:12:06 -0700 Subject: [PATCH v2 09/17] riscv: uaccess: Add alternative for xtheadvector uaccess 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240415-dev-charlie-support_thead_vector_6_9-v2-9-c7d68c603268@rivosinc.com> References: <20240415-dev-charlie-support_thead_vector_6_9-v2-0-c7d68c603268@rivosinc.com> In-Reply-To: <20240415-dev-charlie-support_thead_vector_6_9-v2-0-c7d68c603268@rivosinc.com> To: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Conor Dooley , Evan Green , =?utf-8?q?Cl=C3=A9ment_L=C3=A9ger?= , Jonathan Corbet , Shuah Khan Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Charlie Jenkins X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1713240719; l=1060; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=pB2VSPvj33lI/8AQbCi/3smUxH+y5ljsCL7cqqiQMp0=; b=dG18cYHtMBrx7rXL/eDJ2J/MEkXppkdVPVqNGAzWfC+Il8JQEsduUE1vvr/F4ONbgf1PyHIwe CJzJ8zZcdQTAxXdraBfQwbJEfD2R9/JWH+8NHRtQIw3nfMBSlLS4cMj X-Developer-Key: i=charlie@rivosinc.com; a=ed25519; pk=t4RSWpMV1q5lf/NWIeR9z58bcje60/dbtxxmoSfBEcs= At this time, use the fallback uaccess routines rather than customizing the vectorized uaccess routines to be compatible with xtheadvector. Signed-off-by: Charlie Jenkins --- arch/riscv/lib/uaccess.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/lib/uaccess.S b/arch/riscv/lib/uaccess.S index bc22c078aba8..1fe798666aee 100644 --- a/arch/riscv/lib/uaccess.S +++ b/arch/riscv/lib/uaccess.S @@ -5,6 +5,7 @@ #include #include #include +#include .macro fixup op reg addr lbl 100: @@ -15,6 +16,7 @@ SYM_FUNC_START(__asm_copy_to_user) #ifdef CONFIG_RISCV_ISA_V ALTERNATIVE("j fallback_scalar_usercopy", "nop", 0, RISCV_ISA_EXT_v, CONFIG_RISCV_ISA_V) + ALTERNATIVE("nop", "j fallback_scalar_usercopy", THEAD_VENDOR_ID, RISCV_ISA_VENDOR_EXT_XTHEADVECTOR, CONFIG_RISCV_ISA_XTHEADVECTOR) REG_L t0, riscv_v_usercopy_threshold bltu a2, t0, fallback_scalar_usercopy tail enter_vector_usercopy -- 2.44.0