Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12252132rwd; Fri, 23 Jun 2023 03:40:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4KdnZzkIGKQAxwLawx0mGf3R9+EnaJS2pNPMpQQBhFnSx6mNyRK0wjtN6WTjYHp17z2WoB X-Received: by 2002:a05:6a21:6d86:b0:124:413a:56d2 with SMTP id wl6-20020a056a216d8600b00124413a56d2mr5650229pzb.43.1687516840998; Fri, 23 Jun 2023 03:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687516840; cv=none; d=google.com; s=arc-20160816; b=wT0FEx92sInB5iPaKOTOcp/mjUIBksM1a7ra2bgPDf7tcC28cKt59E2NhkgnDLFOV1 jXIi3k4c0PhRwG08Tdiw8wJUbXQVMih0TRAaFDEmq0VCpnKqlVSH7d1oppji6I9WAydV qBAHP2hW/p5SBIVHQ1lc2KqvCPVwrFE0BWpiV+6yCajS3jScGb6c6yoQaFYz/41sqBBp IUYbvlkUzEOJq5oMQvXEvNy36uJs1D36WNqiUQ1hqXsue0/uv6YzrtSMYVi7aaM6qYNH W+mrXvt0kIDOJpG4k+FGYj6f5R0eWNlKkp5pUAtbm4oke6XxZj38P2I8XsZuD95GiOOq xlmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=J8DWTUVmQVtYQOCVnLM4134avCrw5mdH9mFIXp6nloU=; b=SPjySRERCYjkKYCbjye2sIjsOV9/pmiEt4vIFCyluUryJg6icJyGh04lvATYnytml9 tC7mvyJleCzC9SRoWKaiG3/d5edvqOGfR1K+PqurxDe83ph3+fRxlbPaYHsM+tW5E1BZ UxwpTrkv86jK0j5f5mydnY2tvMahaa/pn8cSd2dUT33SFUSp3Ojz3gXXTu4C+qBgXyo1 Gl40Y+qa+ZjAAMWAqUBJlrnSWILaj4NDoMIlqKlQpTCzA6ReBtHsz0aOgIAEjs36HX6c Bnv3KZJdI5iZHfywyfJelS38N+ms1z+tlSFlxearUkovzaXJUlh4X+06K4rQaH2U2dcS 1oNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kn7-20020a170903078700b001b55cebc1d4si7973411plb.120.2023.06.23.03.40.29; Fri, 23 Jun 2023 03:40:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229830AbjFWKWx convert rfc822-to-8bit (ORCPT + 99 others); Fri, 23 Jun 2023 06:22:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231980AbjFWKWt (ORCPT ); Fri, 23 Jun 2023 06:22:49 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEE95172D for ; Fri, 23 Jun 2023 03:22:46 -0700 (PDT) Received: from i53875bdf.versanet.de ([83.135.91.223] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qCdw4-0005ig-99; Fri, 23 Jun 2023 12:22:36 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Palmer Dabbelt , Stefan O'Rear Cc: linux-riscv@lists.infradead.org, samuel@sholland.org, guoren@kernel.org, christoph.muellner@vrull.eu, conor.dooley@microchip.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 2/2] RISC-V: add T-Head vector errata handling Date: Fri, 23 Jun 2023 12:22:35 +0200 Message-ID: <1961474.usQuhbGJ8B@diego> In-Reply-To: References: <20230228215435.3366914-1-heiko@sntech.de> <9132027.CDJkKcVGEf@diego> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_HELO_TEMPERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Freitag, 23. Juni 2023, 05:06:44 CEST schrieb Stefan O'Rear: > On Thu, Jun 22, 2023, at 4:35 PM, Heiko Stübner wrote: > > Am Donnerstag, 22. Juni 2023, 20:58:37 CEST schrieb Stefan O'Rear: > >> Are you aware of "3.7. Vector Fixed-Point Fields in fcsr" in > >> riscv-v-spec-0.7.1.pdf? > > > > oh wow, thanks a lot for that pointer, now I understand your concern. > > > > So in vector-0.7.1 fcsr[10:9] mirrors vxrm and fcsr[8] mirrors vxsat. > > > > > > On a positive note, the T-Head cores seem to not implement the full > > vector 0.7.1 specification after all, in the documentation I have [0] > > fcsr[31:8] are declared as "0" and uppermost bits are [7:5] for the "frm" > > field. > > Given that the pdf you linked does not mention any vector CSRs, I am not > confident that it provides a complete and accurate description of vector > functionality in other registers for the C906 with vector extension. > > Assuming that you have access to such a chip, I would be much happier with > the proposed "just a comment" approach if our understanding of the behavior > were confirmed on hardware (specifically: csr_write(CSR_FCSR, 0x700) should > not affect csr_read(CSR_VXRM) or csr_read(CSR_VXSAT)). For one, you're right that I should definitly try to confirm this on hardware :-) . But also the VXSAT and VXRM CSRs are actually documented in that pdf on page 335 Heiko > > -s > > > So I guess a code comment should suffice to explain :-) > > > > > > Regards > > Heiko > > > > > > [0] > > https://github.com/T-head-Semi/openc906/blob/main/doc/%E7%8E%84%E9%93%81C906%E7%94%A8%E6%88%B7%E6%89%8B%E5%86%8C.pdf > > 16.3.1.3 浮点控制状态寄存器(FCSR) on page 334 >