From mboxrd@z Thu Jan 1 00:00:00 1970 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 BCB07C54EE9 for ; Fri, 16 Sep 2022 11:41:37 +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=wZqH8C9IPB5xpeah/wxKNBYDZwEoeaUtFSAmjiAkIFo=; b=rR2ZOF1huOwTgH cKZahLBTy9vjkpuQZB5UkKe3yHyEDLEFPGBMwg+tFSNYqmpTXcaLIosEl6lYFZQIWMaj2ETitqWjw AodXUQuSS/T+f/Xp0SlyvrDcI/DagaExR7re8y39SEZmSJwhz+gYMhKqarzQyEBT0ytym7wUtkpSA pSBjAgOHXlTU2x8sXx0xq5P+aiHKgVm7UdEVVZ0qnYgNkpZ9lZyvFM36hbDL9xDtuciwEfV71lI5K Zyp2JD6/Xf/XLnENGGKUGVU6bfKAd0y9kF7rdmfkEElb1F0LE86F/6Kd1sV2cOa52j04UC4WDSJ00 swAqKPM7bQH7TDgsZ5/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oZ9i2-00CmKM-Hk; Fri, 16 Sep 2022 11:40:38 +0000 Received: from smtp2.axis.com ([195.60.68.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oZ9hT-00Cm3m-KX for linux-arm-kernel@lists.infradead.org; Fri, 16 Sep 2022 11:40:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1663328403; x=1694864403; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0O+QKem305LoINGTWe8PLbq0UAM4vzWU5ktHn5B5a3A=; b=agZ65Z0cmArZPCtkUD5KWHBhb2L4i92wD+AOFreQt7nMm9sLDssHcn1N i/exl5z4kd8pbB51EOAFx69q04WxWVik4X0GIwg6Ug/Vhjynp0I0aUvjm ZSh8TfuBik0t8oY6OqwbxnfrrHwfYEZ1ECcWBdLl0VbuunLXhtM7wE6Vh GyTuEqU+irHP78iwR9fMPUTMHxkbb+JYGu8gWgmIB6feWIpfsqy0bIAo3 Rs7GJ97krOHC7RYTMDjwDsVWTcWkXFLTORs72t/YfJwxtuSmPWGZAUCyB VDG5oVo41DeghEjV98tGqeVLLKkk7K42BEUK6e7rUT/R62DnuSPl0IRPr w==; From: Vincent Whitchurch To: , , CC: , Vincent Whitchurch , , , , , Subject: [PATCH 1/4] spi: spi-loopback-test: Add test to trigger DMA/PIO mixing Date: Fri, 16 Sep 2022 13:39:48 +0200 Message-ID: <20220916113951.228398-2-vincent.whitchurch@axis.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220916113951.228398-1-vincent.whitchurch@axis.com> References: <20220916113951.228398-1-vincent.whitchurch@axis.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220916_044004_031606_065472D4 X-CRM114-Status: GOOD ( 11.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a test where a small and a large transfer in a message hit the same cache line. This test currently fails on spi-s3c64xx on in DMA mode since it ends up mixing DMA and PIO without proper cache maintenance. Signed-off-by: Vincent Whitchurch --- drivers/spi/spi-loopback-test.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c index 4d4f77a186a9..dd7de8fa37d0 100644 --- a/drivers/spi/spi-loopback-test.c +++ b/drivers/spi/spi-loopback-test.c @@ -313,6 +313,33 @@ static struct spi_test spi_tests[] = { }, }, }, + { + .description = "three tx+rx transfers with overlapping cache lines", + .fill_option = FILL_COUNT_8, + /* + * This should be large enough for the controller driver to + * choose to transfer it with DMA. + */ + .iterate_len = { 512, -1 }, + .iterate_transfer_mask = BIT(1), + .transfer_count = 3, + .transfers = { + { + .len = 1, + .tx_buf = TX(0), + .rx_buf = RX(0), + }, + { + .tx_buf = TX(1), + .rx_buf = RX(1), + }, + { + .len = 1, + .tx_buf = TX(513), + .rx_buf = RX(513), + }, + }, + }, { /* end of tests sequence */ } }; -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel