Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5185590ybl; Tue, 10 Dec 2019 01:52:56 -0800 (PST) X-Google-Smtp-Source: APXvYqy+4oynt/WWr/91PIBDw73Sg8LLs2AvhIULTjZqk3EyUbjDfnhEMLCtPgkV+bBucQCaNzwB X-Received: by 2002:aca:6186:: with SMTP id v128mr3294170oib.17.1575971576449; Tue, 10 Dec 2019 01:52:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575971576; cv=none; d=google.com; s=arc-20160816; b=EzUhPBThc3J7LnefUOXWNy5reJy/NvXS/JY3ci50O2KxmR7axn4gCWPgukL4jlN3Nt Fvykw4dkHvRgIMG6YvyZijEw1vci9Cs3B4SzNM4yizI8Nhe62+HR8V0qdNZ38h16+dZT aNtsbqabjR0y3EVpDOT/dtJN+FD7H1dfUpFOkvcvdDN3T+C4Tw9QHhUeCjqiALhL36xS Krsyr9uhCo20ZsXxPnyYSDN1zBDCri9yRojQuoO0lbdmz6eCQXY6dYOI79bP0YmETZLQ DidsDoC6G6szE25tn9ubAIVsWK0tVfz0TA4y40AJSWV9np1ApkKWpzA7PlS7vpzumFjf 5zYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ybsluu38MO5eh/YLSNECYiElz7Q4IKjXe1U2m0DW3pA=; b=0pakd7Hz5eTZ7i2opFgr0/kEvlzfhhTVnIUVoiMqAf/E+5s+jP2LIR6rbkLBl/Nip0 mlx+lnpdP9l+P4vedXOMp1ktfbHRJTk7soR0m/yLs5gRaVL+cNHzMtP9rgMYhfkUe+lj DxW0mhYYJmCvIsJ7/T7gqJLIg+QtNRky6xOKKpEJP1B1Dl7hqo8ITtAgLIuTJ29BBgXd gofFSGJZA/R0lMjXuphiu6MbQ/0zSmMPVhjZwrKJfLT/VEvkSEhzzOH3GmZ4cZQSBLmB aaBQAZesU1hORwtjBPMIvxO9w5OHSkWVQLe/jtY0KqjULOFZeBR691FCXd+1bGe/xf7X mP+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zgHuWeY7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v145si1596158oia.68.2019.12.10.01.52.43; Tue, 10 Dec 2019 01:52:56 -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=@linaro.org header.s=google header.b=zgHuWeY7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727131AbfLJJwI (ORCPT + 99 others); Tue, 10 Dec 2019 04:52:08 -0500 Received: from mail-vs1-f68.google.com ([209.85.217.68]:33416 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727177AbfLJJwH (ORCPT ); Tue, 10 Dec 2019 04:52:07 -0500 Received: by mail-vs1-f68.google.com with SMTP id n27so12592428vsa.0 for ; Tue, 10 Dec 2019 01:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ybsluu38MO5eh/YLSNECYiElz7Q4IKjXe1U2m0DW3pA=; b=zgHuWeY7/innDowtWMwI8fnAseVFKB5h8yAU+F+pXXolVXl7IT59cgR3WjvfyHEKhW 1oJBc8pX9KCvwqjcnkqaBTwxHysQW3v4BP42qGr1GA89dxSewio7bUk2jlVDFdS5MNsw tjDpH+kEBA/0avN4I6DtRqv+G+GPp6XyI5rU4VS3cqkpH8P5Ax40K+EH8WfYDK1ACA82 L58BwWWTVb46EJwVANNVbkh7gvhikAPoTnL8+pRWF5Q8nR+DrIsPFDhUGp/FtVn49yZp PoI1VeaPwpSrsxY8/BKDruPtuxroFhcqfnCqDCZo/EXdaU8DGyIlqX9ltATOWRYuD+IT aFMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ybsluu38MO5eh/YLSNECYiElz7Q4IKjXe1U2m0DW3pA=; b=ON7c195+cN1emN9ivf3uVN9F0ZvB59sxuY6U6X7EHTpepPQt5GI4/mVKyWgSqF2Fq9 oujU2YIpeuZyJAw5Tjq5JunTD9b39hKcXUS0MImpIXHtm6vLl5/qJXfU+3kkMdECvc24 T1zbyqg27TmAEpBGX0EG9iBdTs1nC0a1JBVqCMFuWPk440tsPf2mCWIEVHAZOjb8zYWx 7YNOfW+YBTHXRaPiu74q8b8owhqkn7Vp78mlHw3yYJyeN/W5lYQ2JrnUEORzUtT6YVVx vXIPS35rdfz3D6SOE7fG+2O3h4gmJ3c90w3YtJnj8KoDcn3FXMKTCNtBx5+UE4dXNXV/ eYzQ== X-Gm-Message-State: APjAAAVB2TAGwvRkpg+ysGrH40G8cK+4kBEfjqS7y23ip3wEByQ1s5IH q65UQjQRLnCIiFaVtLhnBMQUjSc8qlx5N3cNMoseOQ== X-Received: by 2002:a67:b649:: with SMTP id e9mr24229005vsm.34.1575971526021; Tue, 10 Dec 2019 01:52:06 -0800 (PST) MIME-Version: 1.0 References: <20191204085447.27491-1-linux@rasmusvillemoes.dk> In-Reply-To: <20191204085447.27491-1-linux@rasmusvillemoes.dk> From: Ulf Hansson Date: Tue, 10 Dec 2019 10:51:30 +0100 Message-ID: Subject: Re: [PATCH] mmc: sdhci-of-esdhc: Revert "mmc: sdhci-of-esdhc: add erratum A-009204 support" To: Rasmus Villemoes Cc: Adrian Hunter , Yinbo Zhu , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Dec 2019 at 09:54, Rasmus Villemoes wrote: > > 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 Applied for fixes and by adding a stable tag, thanks! Kind regards Uffe > --- > > The errata sheet for mpc8309 also mentions A-009204, so I'm not at all > opposed to having a fix for that. But it needs to be done properly > without causing a huge performance or latency impact. We should > probably just add a bit to struct sdhci_esdhc which gets initialized > in esdhc_init. > > drivers/mmc/host/sdhci-of-esdhc.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c > index 5cca3fa4610b..7f87a90bf56a 100644 > --- a/drivers/mmc/host/sdhci-of-esdhc.c > +++ b/drivers/mmc/host/sdhci-of-esdhc.c > @@ -764,9 +764,6 @@ static void esdhc_reset(struct sdhci_host *host, u8 mask) > 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; > -- > 2.23.0 >