Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp13141895rwd; Fri, 23 Jun 2023 16:45:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6icrv5egniDvx3XJvE3d9TYcI3xNWPG0YC+jAuD9gtQOvxGdBDlr4HLFJ1Pa5jVkSvsfS/ X-Received: by 2002:a05:6a20:918e:b0:11d:1b15:4d28 with SMTP id v14-20020a056a20918e00b0011d1b154d28mr31913426pzd.4.1687563954627; Fri, 23 Jun 2023 16:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687563954; cv=none; d=google.com; s=arc-20160816; b=J3p3zSW7uUS9R/BHrw+32fY2wVO4bv4MRSTQH1vbEcfX2Tkz4X4zAKItwUWb24ieGT 9Dc6kUMLiMeYTI1v8GZ+lm8Z0nbjGp+Oaxm2+JwNwcXi20nqgKuJ5PbKvpkD17NzNFN7 1T1suZaA0k5RfGNT4HGYa+J33EeULvy1HTsnFXFS3PzoacqiJgI0tKX5tqkBDbvTlNTZ Pb7HwJodZ6P3M+V2KFDgQvP3n/GCkgpwniSKwpxNchOTjBZiCDYliF3madXesbofWNMu ZcAF0lF80j5VXfwLznl+Mqtf/noYpnWs7CnOhbcwCpolqMP++p7JzK89VnhiIuo4m7Eb DNcw== 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=4RUyQj6l9Rs9Q0qTKsmAbRvrqukwjqHBfCzQVde6/eg=; fh=iTbINN14VcU80VkhK13gWxszn/BMxrNQA6XAvJfx7xI=; b=hz/6PEZ92Y9sWGa8EpggQzVduXkBhD33wP8KWEUnVqtEgaAzZBeJSkp8DCVNCj9dlO m0+K/bHo4XZLKZfAEr18DpHYJIU44WalWyBiOtnPAPJmXRCLY+14yXmLJ87eCFnakxWp 0u1OEB4BNR+2TYEQsFUzGpjfiffu2Xq7bsuZUsTW3xNvwVXL7cqGOq1RS5ZJEwurQslR pRXnC6vNQiaqbKMxTJzD7XeXlNlstBOekcTGajq6iUMWkCVEyaVuOA+EyqeoRi0iusQG snTtcv+qYZNGPefGwUHh626ywj+Fv6Xb/ux99jwwhxmygHzdmjNXsdlBk0MmmIde/LMX RmhQ== 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 d21-20020a631d55000000b0053fb768afcdsi455719pgm.465.2023.06.23.16.45.40; Fri, 23 Jun 2023 16:45:54 -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 S231713AbjFWX0i convert rfc822-to-8bit (ORCPT + 99 others); Fri, 23 Jun 2023 19:26:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjFWX0h (ORCPT ); Fri, 23 Jun 2023 19:26:37 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4E931AC for ; Fri, 23 Jun 2023 16:26:33 -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 1qCqAP-0001F3-Hv; Sat, 24 Jun 2023 01:26:13 +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: Sat, 24 Jun 2023 01:26:12 +0200 Message-ID: <1788842.TLkxdtWsSY@diego> In-Reply-To: <1961474.usQuhbGJ8B@diego> References: <20230228215435.3366914-1-heiko@sntech.de> <1961474.usQuhbGJ8B@diego> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" 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, 12:22:35 CEST schrieb Heiko St?bner: > 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 :-) . ok, so now I know the documentation is wrong. before, vxrm 0x0, vxsat 0x0 writing the 0x700 to fcsr after, vxrm 0x3, vxsat 0x1 Essentially the link between the CSRs really is there - oh fun. So we're back at your original concern - sadly. I guess I need to figure out how to not have this stuff break because relying on the fpu parts to handle feels not correct at first glance. Heiko