Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13407851ybl; Sun, 29 Dec 2019 11:09:24 -0800 (PST) X-Google-Smtp-Source: APXvYqwVCwEpHuFiave6uIVAyr0NwJSpbuq9SBAeQhUmolYwksPzUHZU75DAPW/l/zQWKLpsDeBa X-Received: by 2002:a9d:7cd0:: with SMTP id r16mr72843571otn.50.1577646564750; Sun, 29 Dec 2019 11:09:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577646564; cv=none; d=google.com; s=arc-20160816; b=TfZ0lWjtx6t+BqsXgAbl6f0WGxEsEpmBamPcvwKUNVOJO0W2PI5WnUI1qdfgA7NViX pTK9biglRM0savbN8dQpNMYa3TjWMjvrcvxt+6hfC9WX677XvUOShUG3e/hAZ9eTVR/K E1vL5nvplCP2BoopVu8GcShRJFAxIdsW35iwXZkmZi1m6PbGW0NZuzMd+iSOI+rEY3sX I/+CjZHzyTv9jiNYu3Dhpn0nRUWmtTH4045RnaPVVpMWmpITgMF4g+SIFdv4ja+Ek8h3 xwCfv9h0mARM5z6HLnsMJakBNLqVtks55+OQNjJ4uO+HXt3T2FNQrYPCpHG+8Sy1D1C/ kjkg== 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=Oe/5/wbpgxCrpYmJuK98dOp0dQlAMAECUGsZezQvoLQ=; b=CPt072swdm+gupJTEEglcchB+fPYOtp2yJYbUGavagDENBbXzSzQL8Oz924+z/jK/m ffZ2O8UshnYrV8KEpeOTuAXtN8gEkF75sfnc9WjAl9bPlsBDi1ZtcNJwnM3QX3V5uA/L XUuaWogW4TQO7uQuPDcy3IKkN+eQsklKpdy7LrTHnbuGj8jcqXjP5sUshqRnUq/CFkiu Xs//29lCNIIjOzwCN9qbYU0ut16mk39rLLrno6tfEC+hHAeIdQAecamy3cbAoqIdQyu1 s0Aob165QrZf/0p3f/+JGWAz1oUnaqnINq28KZsDcM0baDL7R/Hnw1CBTmzIyuOVYSeN 0uPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D1f6RoX5; 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 q2si19211506otn.220.2019.12.29.11.09.13; Sun, 29 Dec 2019 11:09:24 -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=D1f6RoX5; 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 S1728420AbfL2R11 (ORCPT + 99 others); Sun, 29 Dec 2019 12:27:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:49510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728401AbfL2R1V (ORCPT ); Sun, 29 Dec 2019 12:27:21 -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 2EC26222C2; Sun, 29 Dec 2019 17:27:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577640440; bh=VY80hTtja85SkMaqS467ItajsdXs54ZTgnddma92D2w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D1f6RoX5kMJQyd7qumA+HbnC/QzNMGvnYyd1rxR9rtLJVhkbh3IEjSRWuidXw3/Dq nV40WIYr+ZhSzuvEUgobdh99tS0ORIGBeavFEvSov8eycOZHcyXqY2YBlNLFNhz4gi j4hRz2rf5DEBW7HSMSaO01TzVonfUjRP+hdOVf8c= 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.14 158/161] mmc: sdhci-of-esdhc: Revert "mmc: sdhci-of-esdhc: add erratum A-009204 support" Date: Sun, 29 Dec 2019 18:20:06 +0100 Message-Id: <20191229162449.884427203@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229162355.500086350@linuxfoundation.org> References: <20191229162355.500086350@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 @@ -615,9 +615,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;