Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6987803rwl; Fri, 30 Dec 2022 01:34:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXuyBZ9nq7bDs1WTVN9WOrCWmL8/ucdkhkDKXsFMFbTF6PbmcriUOs6HOhU3XDhMrrvyi/6T X-Received: by 2002:a17:90a:8a91:b0:223:ed95:656d with SMTP id x17-20020a17090a8a9100b00223ed95656dmr34254315pjn.19.1672392898329; Fri, 30 Dec 2022 01:34:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672392898; cv=none; d=google.com; s=arc-20160816; b=q2TtTImtjfk2FXDoqv2mwLng6FgV3laLEpr1SeTdnEfiTWSQs5ICSZXz2kE6RScORw 3tWvVV5ObMmQ31gP8tHe2GYCWE+NPorcc1Dk4z6TsTH7kH/MuB3vvMZ3vZ5Li/d2vKLU 8mjT7VIVhQZVqPoKAr5VhREAOMOQoMQsawByIg9TBltNRDb2DHuJDsgdHhWS7V8P1Vfi Qn2fVrsPb25uvSEycOM1KjXECv3jj3bdYzUbAG1OaLahJltU1hwNK0kO+YTZZDyVKKNS 89NKuyCQGAwSLIFUZlbX1HLZtwfhQvbdor7chJu9iShKcTnh26bBpHakMlwUXwdcCGmV NWow== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ctRJbTIjbWI2DKXft2nGVLYb5GzXJjZIUCwvbVp3WGA=; b=kpd//bVeqj5EvcoaazIRMRKW5Jy7u3oxNMQYgo9or/MNajr3b96iUsT7MIhfzpo88H sjHz9BKjwRyRkC4zkvwVlK5o8B6FS33oJHScEbxJuc3mQn4eQCNFZFRjjDzCMv1agbOw GSB9uA42gxOt4/fIwM1RqobkCvrgQhBep23+EkIo2D5dKMJinuwC6YJl60oHB04ZbhkL KpKjU9COhkY8490Sr0lcNTHSALwCNRvGEJtwF40pIovDNJ0M3YiYmpJdHhLZOD3eeMRl 0vVlTUXpCi2eIt9KenleKk6cNbH4hIWunfDF71JywvVwEZGmzZkCzA0lOe5gvav8Lprh u2YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b="TeM/AY+A"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bt19-20020a17090af01300b002187b07b835si20122919pjb.52.2022.12.30.01.34.43; Fri, 30 Dec 2022 01:34:58 -0800 (PST) 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; dkim=fail header.i=@metrotek.ru header.s=mail header.b="TeM/AY+A"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234865AbiL3Jc1 (ORCPT + 64 others); Fri, 30 Dec 2022 04:32:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234824AbiL3JcR (ORCPT ); Fri, 30 Dec 2022 04:32:17 -0500 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 741031A39E; Fri, 30 Dec 2022 01:32:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=metrotek.ru; s=mail; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding; bh=tuVGBpd31T4yKCAmXPLRKEmib/9bOaSApKK+OXLQB6A=; b=TeM/AY+A6WKr9pnzGR9xuqghLQygitIcOH9bDA5Uuu5gN+bslNxMBZhjXeh2d8CbRLVpEQ7Bs57ER 7eFkUyKcf7yl/ISsRj7++4bh4Sefidjj/NdY65JYPb0aSRZ8k/JU1lMTxM+0HAKA5ivcSHRkK/HZxh piLkZVeogDo8MBIv08BspFO+thNWaFR4dpMbpUILr0y2m18hymVODg58dTjKLy2HbNKV6KTlAOsvMd 3IBg47egu3yIwrxtIEHCZr02KPHI1I7MMd91NfxwinwcqWaFEpWlLJ4xbNkcy7cy137gWVcWNuYLdt orowRd4wZvuwVdz/oE9G1MWGMfYakGQ== X-Kerio-Anti-Spam: Build: [Engines: 2.16.5.1460, Stamp: 3], Multi: [Enabled, t: (0.000016,0.007889)], BW: [Enabled, t: (0.000024,0.000001)], RTDA: [Enabled, t: (0.084933), Hit: No, Details: v2.42.0; Id: 15.52k4og.1glh5v6ls.1si; mclb], total: 0(700) X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: X-Footer: bWV0cm90ZWsucnU= Received: from localhost.localdomain ([78.37.162.181]) (authenticated user i.bornyakov@metrotek.ru) by mail.pr-group.ru with ESMTPSA (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)); Fri, 30 Dec 2022 12:31:49 +0300 From: Ivan Bornyakov To: linux-fpga@vger.kernel.org Cc: Ivan Bornyakov , Conor Dooley , Moritz Fischer , Wu Hao , Xu Yilun , Tom Rix , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , linux-kernel@vger.kernel.org, system@metrotek.ru Subject: [PATCH v5 0/3] Reliability improvements for Microchip MPF FPGA manager Date: Fri, 30 Dec 2022 12:29:19 +0300 Message-Id: <20221230092922.18822-1-i.bornyakov@metrotek.ru> X-Mailer: git-send-email 2.38.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 A couple of reliability improvements for Microchip Polarfire FPGA manager: * move SPI I/O buffers out of stack * rewrite status polling routine in a time measurable way Also improve mpf_ops_write() code readability by separating single data frame writing routine. ChangeLog: v1: [https://lore.kernel.org/linux-fpga/20221223123854.8023-1-i.bornyakov@metrotek.ru/] v2: * split into 3 distinct patches [https://lore.kernel.org/linux-fpga/20221226142326.8111-1-i.bornyakov@metrotek.ru/] v3: * fix polling stop condition in mpf_poll_status() as Ilpo suggested. [https://lore.kernel.org/linux-fpga/20221227100450.2257-1-i.bornyakov@metrotek.ru/] v4: * more verbose comment for mpf_poll_status() [https://lore.kernel.org/linux-fpga/20221229104604.2496-1-i.bornyakov@metrotek.ru/] v5: * revord "fpga: microchip-spi: move SPI I/O buffers out of stack" commit message "Use allocated buffers" -> "Use cacheline aligned buffers" * drop __aligned(ARCH_KMALLOC_MINALIGN) attribute of struct mpf_priv member "rx". tx and rx are used synchronously by dma, they could share a cacheline. Ivan Bornyakov (3): fpga: microchip-spi: move SPI I/O buffers out of stack fpga: microchip-spi: rewrite status polling in a time measurable way fpga: microchip-spi: separate data frame write routine drivers/fpga/microchip-spi.c | 145 +++++++++++++++++++---------------- 1 file changed, 79 insertions(+), 66 deletions(-) -- 2.38.2