From patchwork Tue Aug 20 15:24:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Taube X-Patchwork-Id: 13770423 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E232CC531DC for ; Tue, 20 Aug 2024 15:28:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/18CpQkcctCvLd12FXrk0mIzuSvNUdNJySGBM7B2+a4=; b=RQOpjncNmchvtB mmeRJE2IBjPny2R1DoyV/ys8cJrMHYg6w3Jb/hxyXeAqVSnE7ajaanYWxwqOqP5NCMfAhTKo8sz7z by64S0yyB/S7Nh9tVo7tvjVP8KDH2ZXDCc8fQezIbGA5601P7QUY4ZKSsIWb6PQogiXfkwvQgtUfA 82q6OsVrwC/M5llTFmBFKHnwPBZNUNDMUaUrp9QerR/Qu1gcX7d4xhYQGfLHQpj0QtYe1DQtX0a7s kv/INYRrceQxNQCgbCsuVDYnNN8yItpZvIqIRTB15lHH/gE/k04vD7UYrn7jtPC49e/A207eUXYs6 iUsIyuRWOilbtn7whg1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgQmp-00000005pVs-2PQX; Tue, 20 Aug 2024 15:28:43 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgQjB-00000005nP2-016o for linux-riscv@lists.infradead.org; Tue, 20 Aug 2024 15:24:58 +0000 Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-2d3c071d276so3932691a91.1 for ; Tue, 20 Aug 2024 08:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1724167496; x=1724772296; darn=lists.infradead.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=K9yIy6nc3JckPfgq1SVS1dt/ubbPwao76sjUpFJbUU0=; b=vtuWoe0Ybjw0emVyuKvxBcJzCEzXnMEAadsCNe8GIVBFzFcDFQBzxo5XlSQCt6T1z8 f/ogRylEcV5i9WAFA66xcD5HeId93TAwpXhScIsel/g5UO+W+CnSKO0NZmoLDFLEnH7H LWSULLxNBZjyFTPWfsSgSfxOFParQS86Mu7SA5jwduXA1OXy8tqCoy+S36IQB+rmHi/O lfWR+d83x3j495KiVey4rWc4weuL6uqoZEEgqpbdZ7tdZNAip3EZzYqbUD6QtEO6A3FU ouHMnBO/IN66MJzOzw7G2zXoN2N8MCUXc8Sz7b3ABRETPFIZqo1KT3qDa8p+G5ydh8VU TSvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724167496; x=1724772296; 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=K9yIy6nc3JckPfgq1SVS1dt/ubbPwao76sjUpFJbUU0=; b=LlaWwuLr7oewTe5xozqyS/N7zZ7O/PGRBG0jINJBzs/bqSz6d03FWlNr5Q4dL4luvA yRGFgqVFNClxOT44qEFFIXDzAKFiBy9nNGdznN0EN83zig0hf1L2fdjAii0+3J95/l86 o71IecYIVsXfXDsqx0+rj4GnefMwF75VT4zyw6rohM5ZLTTBx7lVGMj/GSKSGJNI0dMZ k7f2A6qb7I+/Tm0mRqtFMwiN+eOVwIEn9dClhoysdXaSW65Wot3K2OPwybQheBidCr2w ugMfWtlFAMeSdxIQg/ltj+D/mNIB+gHWM2nWYV7liIYFnAvTobNiKqrmZUcWFv1fSmZ1 PBWQ== X-Gm-Message-State: AOJu0Yw9YIsLbDTNb4MK+GbUyjx49Sao0RLssuW2s8vFwGAhXZfyHFfq /GHF7E/IgpbYd8AYLzt/kU33+AlIHG4FcQP4TARwahFyW6euI6Dw5/rLXpPSaNwtHU0OrVnYPT7 + X-Google-Smtp-Source: AGHT+IFjpFHeANOi3RNiE4tvCPPb8ENoVMI5hfDn6rIWfrZrc5je7gBHKyKa1cngmecZurzkCscwrA== X-Received: by 2002:a17:90a:1bcf:b0:2ca:f39c:8d76 with SMTP id 98e67ed59e1d1-2d3e03e8cb9mr14580242a91.39.1724167495634; Tue, 20 Aug 2024 08:24:55 -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-2d40bea7cb3sm7258157a91.25.2024.08.20.08.24.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2024 08:24:55 -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?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Evan Green , Andrew Jones , Jesse Taube , Charlie Jenkins , Xiao Wang , Andy Chiu , Eric Biggers , Greentime Hu , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , 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 Subject: [PATCH v9 6/6] RISC-V: hwprobe: Document unaligned vector perf key Date: Tue, 20 Aug 2024 11:24:24 -0400 Message-ID: <20240820152424.1973078-7-jesse@rivosinc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240820152424.1973078-1-jesse@rivosinc.com> References: <20240820152424.1973078-1-jesse@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240820_082457_067872_8228B585 X-CRM114-Status: GOOD ( 11.50 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Document key for reporting the speed of unaligned vector accesses. The descriptions are the same as the scalar equivalent values. Signed-off-by: Jesse Taube Reviewed-by: Charlie Jenkins --- V1 -> V2: - New patch V2 -> V3: - Specify access width V3 -> V4: - Clarify we're talking about byte accesses using vector registers - Spell out _VECTOR_ in macros V4 -> V5: - No changes V5 -> V6: - No changes V6 -> V7: - No changes V7 -> V8: - Rebase onto fixes - s/RISCV_HWPROBE_VECTOR_MISALIGNED/RISCV_HWPROBE_MISALIGNED_VECTOR/g V8 -> V9: - No changes --- Documentation/arch/riscv/hwprobe.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst index 85b709257918..ea4e0b9c73e7 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -274,3 +274,19 @@ The following keys are defined: represent the highest userspace virtual address usable. * :c:macro:`RISCV_HWPROBE_KEY_TIME_CSR_FREQ`: Frequency (in Hz) of `time CSR`. + +* :c:macro:`RISCV_HWPROBE_KEY_MISALIGNED_VECTOR_PERF`: An enum value describing the + performance of misaligned vector accesses on the selected set of processors. + + * :c:macro:`RISCV_HWPROBE_MISALIGNED_VECTOR_UNKNOWN`: The performance of misaligned + vector accesses is unknown. + + * :c:macro:`RISCV_HWPROBE_MISALIGNED_VECTOR_SLOW`: 32-bit misaligned accesses using vector + registers are slower than the equivalent quantity of byte accesses via vector registers. + Misaligned accesses may be supported directly in hardware, or trapped and emulated by software. + + * :c:macro:`RISCV_HWPROBE_MISALIGNED_VECTOR_FAST`: 32-bit misaligned accesses using vector + registers are faster than the equivalent quantity of byte accesses via vector registers. + + * :c:macro:`RISCV_HWPROBE_MISALIGNED_VECTOR_UNSUPPORTED`: Misaligned vector accesses are + not supported at all and will generate a misaligned address fault.