Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13470097ybl; Sun, 29 Dec 2019 12:39:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxWAizVzlBbFpU9YfENzlA0fImkbD0WA6TSZn0Y5gCI3NEV5Gq1MNR32jykpBOARIJVgTU1 X-Received: by 2002:a9d:62c7:: with SMTP id z7mr62579656otk.189.1577651983603; Sun, 29 Dec 2019 12:39:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577651983; cv=none; d=google.com; s=arc-20160816; b=GdWn1a17wZOOfw8K6ygUNFc9Fqkt0oIixQSnww3kkMFnjtzjYfO3+3mwxaGfkRdcMW CERnhOJ9VNc1A/fS7c6oZAQJGIyzI/OA2wms9ykR5YmOJrzwDhIZSYeuqr13koCTDZIT n6frvNYnUG6RI0uKfKnlQ3Eo66OqfT8u1zD6pjhnGWuEYio4Dp1+LIe8Oro3r2bTRBJK 6waTG3JYL98tsL6fd7iWazCT/oZF5AJOGVbxPfg9E9kUQSgAckkolRvwAgOFFgn1ejTI jPWAHC6hnDUGBQ4RfsZyuNzvbB4lDz9q0EHUBs8uK/zkdttgf/M2QCf+HkZ7rcJGSdY1 zq2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dsh6B2PcmBn79Smw0pQGIPZb8DtVMEK/SbCXoiJIJdc=; b=TMDuvHbJG8yaJEgAQJK3XjSCCa5+N/LBzSYWuqHSeRYUjd4o1g/GEEwmKoYUukQfe0 Kpz4YTWhCO3HY7TCH8iZYTbXcvoUmruZjHHG4+65qFQpQKodTmlIdohgiL+jb7T/3EDC IB9i8vy1waAXzYRJ5SVWcXZnLsBGcfMAh8NrJEx29MW3NSiHweurf7ykIbw9RmXiFXyV WFG+d+x+9QzeFUFZwAKNFzzwNl3KcpoInJ7DZSHf4HuRhnQMUCtqbqx6DHjv0zAFDMUr NOQ16b2ogs3kINuP5gqVb5KxNJg4HIH/FL1hMjCwPmms7jFAmU7MkOGvJWBm9Rj9b7kq AVqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=af3YbElE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o83si12865922oib.44.2019.12.29.12.39.32; Sun, 29 Dec 2019 12:39:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=af3YbElE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730056AbfL2Rg3 (ORCPT + 99 others); Sun, 29 Dec 2019 12:36:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:41822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727474AbfL2Rg1 (ORCPT ); Sun, 29 Dec 2019 12:36:27 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A8AB0206CB; Sun, 29 Dec 2019 17:36:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577640987; bh=coJCxagjgyUDd+VqanPTFNqIug/xnV+LkxVnKj7/EHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=af3YbElEwEOzrAb70Irb0/BxSbdiwGtdFZ1xzLbG7hKLSl2Nu+RAEaHDGJLhEDVvk EZWTShZRNsM3vlhCUiFsg4T6x9QtuNj97MvaxhmgqzNUHQjavaNXQCoS/zBDuSLHwF 01E0xQuZoRfAj6S2k8O+R2kSqmkOIbGQHrU8+nt8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rasmus Villemoes , Ulf Hansson Subject: [PATCH 4.19 214/219] mmc: sdhci-of-esdhc: Revert "mmc: sdhci-of-esdhc: add erratum A-009204 support" Date: Sun, 29 Dec 2019 18:20:16 +0100 Message-Id: <20191229162542.807700563@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229162508.458551679@linuxfoundation.org> References: <20191229162508.458551679@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rasmus Villemoes commit 8b6dc6b2d60221e90703babbc141f063b8a07e72 upstream. This reverts commit 5dd195522562542bc6ebe6e7bd47890d8b7ca93c. First, the fix seems to be plain wrong, since the erratum suggests waiting 5ms before setting setting SYSCTL[RSTD], but this msleep() happens after the call of sdhci_reset() which is where that bit gets set (if SDHCI_RESET_DATA is in mask). Second, walking the whole device tree to figure out if some node has a "fsl,p2020-esdhc" compatible string is hugely expensive - about 70 to 100 us on our mpc8309 board. Walking the device tree is done under a raw_spin_lock, so this is obviously really bad on an -rt system, and a waste of time on all. In fact, since esdhc_reset() seems to get called around 100 times per second, that mpc8309 now spends 0.8% of its time determining that it is not a p2020. Whether those 100 calls/s are normal or due to some other bug or misconfiguration, regularly hitting a 100 us non-preemptible window is unacceptable. Signed-off-by: Rasmus Villemoes Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191204085447.27491-1-linux@rasmusvillemoes.dk Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/sdhci-of-esdhc.c | 3 --- 1 file changed, 3 deletions(-) --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -648,9 +648,6 @@ static void esdhc_reset(struct sdhci_hos sdhci_writel(host, host->ier, SDHCI_INT_ENABLE); sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE); - if (of_find_compatible_node(NULL, NULL, "fsl,p2020-esdhc")) - mdelay(5); - if (mask & SDHCI_RESET_ALL) { val = sdhci_readl(host, ESDHC_TBCTL); val &= ~ESDHC_TB_EN;