From patchwork Fri Jul 17 22:03:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1331444 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=hauke-m.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=kA+JsBGi; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B7ljD4WZhz9sPB for ; Sat, 18 Jul 2020 08:12:16 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=F08ZVzDAa00+QKUbdJrhVQxwzYEVGZkZfbzH9Y8mCDo=; b=kA+JsBGi5iOGubNTFV+Flk3VP0 MSnUj5D3Dt5MdGSSNw7GmWexVN/pHlTsuuvSsPUSn746B7k7XcYB6xtkUflvBKIi3qcdf+YL3V2j7 kjq0lDYFqoELcALKEO70eQcMEtewW7+K8FSsCytetc/UPpaPuJ61CFUoR9OyWLtPYfMr00fJHtSMJ QdSpRKPa4tl2W3qU11NbhX/RT9a6FeVo5UQc2hRPcQjV5C9Vg9tIOrLJ5c6UTdbGdGpGORCbPKSJe y82cwx7XRkPhAjnX3oKf7Jj5e+a6dykMgzhcFI4J03TVRgrSW/jIjYhnRzOutJoTkF8qcMgHObRpz iS/oYQBA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwYSN-0002ap-6h; Fri, 17 Jul 2020 22:03:51 +0000 Received: from mout-p-202.mailbox.org ([2001:67c:2050::465:202]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwYSK-0002a2-Qr for openwrt-devel@lists.openwrt.org; Fri, 17 Jul 2020 22:03:49 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4B7lWQ6zXMzQlHL; Sat, 18 Jul 2020 00:03:46 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id wi-law7IhCih; Sat, 18 Jul 2020 00:03:44 +0200 (CEST) From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Subject: [PATCH] lantiq: Fix warning in SPI driver Date: Sat, 18 Jul 2020 00:03:38 +0200 Message-Id: <20200717220338.6736-1-hauke@hauke-m.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: 0 X-Rspamd-Score: -5.69 / 15.00 / 15.00 X-Rspamd-Queue-Id: 24E811786 X-Rspamd-UID: 042808 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200717_180349_029120_30B1988A X-CRM114-Status: GOOD ( 15.59 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This fixes a warning in the SPI driver at bootup. This warning is seen in kernel 5.4 on lantiq deives. Signed-off-by: Hauke Mehrtens --- ...c-Fix-warning-by-using-WQ_MEM_RECLAI.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 target/linux/lantiq/patches-5.4/0800-spi-lantiq-ssc-Fix-warning-by-using-WQ_MEM_RECLAI.patch diff --git a/target/linux/lantiq/patches-5.4/0800-spi-lantiq-ssc-Fix-warning-by-using-WQ_MEM_RECLAI.patch b/target/linux/lantiq/patches-5.4/0800-spi-lantiq-ssc-Fix-warning-by-using-WQ_MEM_RECLAI.patch new file mode 100644 index 000000000000..b2e1ff89077f --- /dev/null +++ b/target/linux/lantiq/patches-5.4/0800-spi-lantiq-ssc-Fix-warning-by-using-WQ_MEM_RECLAI.patch @@ -0,0 +1,35 @@ +From 907137d9ef048e7d0282c28e47b32aa4084ad395 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Mon, 6 Jul 2020 00:05:12 +0200 +Subject: [PATCH v2] spi: lantiq-ssc: Fix warning by using WQ_MEM_RECLAIM + +The lantiq-ssc driver uses internally an own workqueue to wait till the +data is not only written out of the FIFO but really written to the wire. +This workqueue is flushed while the SPI subsystem is working in some +other system workqueue. + +The system workqueue is marked as WQ_MEM_RECLAIM, but the workqueue in +the lantiq-ssc driver does not use WQ_MEM_RECLAIM for now. Add this flag +too to prevent this warning. + +This fixes the following warning: +[ 2.975956] WARNING: CPU: 1 PID: 17 at kernel/workqueue.c:2614 check_flush_dependency+0x168/0x184 +[ 2.984752] workqueue: WQ_MEM_RECLAIM kblockd:blk_mq_run_work_fn is flushing !WQ_MEM_RECLAIM 1e100800.spi:0x0 + +Fixes: 891b7c5fbf61 ("mtd_blkdevs: convert to blk-mq") +Signed-off-by: Hauke Mehrtens +--- + drivers/spi/spi-lantiq-ssc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/spi/spi-lantiq-ssc.c ++++ b/drivers/spi/spi-lantiq-ssc.c +@@ -907,7 +907,7 @@ static int lantiq_ssc_probe(struct platf + master->bits_per_word_mask = SPI_BPW_RANGE_MASK(2, 8) | + SPI_BPW_MASK(16) | SPI_BPW_MASK(32); + +- spi->wq = alloc_ordered_workqueue(dev_name(dev), 0); ++ spi->wq = alloc_ordered_workqueue(dev_name(dev), WQ_MEM_RECLAIM); + if (!spi->wq) { + err = -ENOMEM; + goto err_clk_put;