Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2348227ybl; Thu, 29 Aug 2019 07:06:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQINUn6u6R7pveI0D+XEjAI7ctrdQ5TFphMzAvv8AQB5aJg3gVnmf5cLzl9gEtpfi9oNLw X-Received: by 2002:a17:902:6a:: with SMTP id 97mr10325182pla.5.1567087593672; Thu, 29 Aug 2019 07:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567087593; cv=none; d=google.com; s=arc-20160816; b=L7l3kWmUiXvQLyLtHgQeA46Xo9GDTNbahcXiYfu7pfAdSIj2jIy+DIvPjx19Lnmxkd PNPSLpHKb1yraeoAHF9JzuFxmkUOrKJ26sYPu7OnS3hpwtUO04I7VYAYEhysIFc1wzCx h9rr8RClS7Sk/sP246LsymtexG04A6ptUz1NSgRRT5gKLMBBBqMEITchLwVzasmZipr5 M0fOiYWp9OqOe8Hx5nuAmBIFpj+1/D/lcD5ERgNBbnZP9QPzWv5290mfm8Zx4dmlQB60 BcmtcMKUD8RKoQhmMip7KpxNQHqEAY0QCLHD5t5uvF5NogT6yrso/3snO5U2vrlNZJ+K 8C8g== 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:dkim-filter; bh=V+lbFxqlT+wd+YZgxlyNRbBDlB7GpYlOVv7o2hTS5yQ=; b=PErqlpwGkzirOsuDqaBuAE34VvIxFGIbPX583eA5lBbDpbMyZC2u7zO4HuEFP115nW z6UgpMUTRnvmPpd9kZISr9kJ2l3yRPVbY6FolC7poDjYce0eIZinx4z4zJ9gdMnBp23/ 5buiXEYLXgJcL93bQr2133G+7AN3tlyftJPfd5eEyQlqI/Hyom5UX7wvwBNTz3yLxYFb zcMZF5Q78JMs82J6TEjPjprfYxrTiNb1Hfpc/NkG3Mpz7L+BeAutqMJf/6BSvvrJOGJ9 PfOw7XuqTUTwjQIExilV4v0XoEZa8qcgczhyQEwmkuBmgQayWynV7fSOCbV30vOYmWMS oXVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=vGtZwdNq; 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 l184si2130286pgd.203.2019.08.29.07.06.13; Thu, 29 Aug 2019 07:06:33 -0700 (PDT) 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=@nifty.com header.s=dec2015msa header.b=vGtZwdNq; 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 S1727906AbfH2OE6 (ORCPT + 99 others); Thu, 29 Aug 2019 10:04:58 -0400 Received: from conssluserg-05.nifty.com ([210.131.2.90]:31526 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727063AbfH2OE5 (ORCPT ); Thu, 29 Aug 2019 10:04:57 -0400 Received: from mail-ua1-f52.google.com (mail-ua1-f52.google.com [209.85.222.52]) (authenticated) by conssluserg-05.nifty.com with ESMTP id x7TE4hMT005980; Thu, 29 Aug 2019 23:04:43 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com x7TE4hMT005980 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1567087484; bh=V+lbFxqlT+wd+YZgxlyNRbBDlB7GpYlOVv7o2hTS5yQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=vGtZwdNqugs7ZwQdGDWOMDjdUeOubga9J2nO4YdJJ91bdf3rSAcky03Ezi4jo3Fp0 uN3tOrkq03IXkzNnX14lsNN1FGd8Jh2MCgc4GmWa/WHELUDbPOBV4WSTgt1UsI3hUe ZjsuSIa088Tmzezv9iAARNvhKXyAkzy2xEnbpT5V3miPAAggqxSsAVwiFiwjeQVQmo XNRkqd+TyqilT9A5gU2MctK8FVDKDXjbcOECNFbDWC9od5ivUzhc6xf8aYMCFKYQ9C UfxbdYB9TOT1v2Ip7USxXsciKX/YpPWfjHOquUHU8O22hwFtHUdb1ZnFX91a5xf/Yu Y7I5w3IXZwpow== X-Nifty-SrcIP: [209.85.222.52] Received: by mail-ua1-f52.google.com with SMTP id k7so1192145uao.6; Thu, 29 Aug 2019 07:04:43 -0700 (PDT) X-Gm-Message-State: APjAAAWKY2xiJgszPCeGssTO2T/9OSDQ07n8AZBFgzHQ07UE3RsbNZvN mQpgC5pnG8+cSSC/XKYS+S7qsxZAbj+BjFtWum8= X-Received: by 2002:ab0:4261:: with SMTP id i88mr4930502uai.95.1567087482413; Thu, 29 Aug 2019 07:04:42 -0700 (PDT) MIME-Version: 1.0 References: <20190829104928.27404-1-yamada.masahiro@socionext.com> In-Reply-To: From: Masahiro Yamada Date: Thu, 29 Aug 2019 23:04:03 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] mmc: sdhci-cadence: enable v4_mode to fix ADMA 64-bit addressing To: Ulf Hansson Cc: "linux-mmc@vger.kernel.org" , Adrian Hunter , Piotr Sroka , "# 4.0+" , 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 Hi Ulf, On Thu, Aug 29, 2019 at 10:27 PM Ulf Hansson wrote: > > On Thu, 29 Aug 2019 at 14:05, Masahiro Yamada > wrote: > > > > On Thu, Aug 29, 2019 at 8:48 PM Ulf Hansson wrote: > > > > > > On Thu, 29 Aug 2019 at 12:49, Masahiro Yamada > > > wrote: > > > > > > > > The IP datasheet says this controller is compatible with SD Host > > > > Specification Version v4.00. > > > > > > > > As it turned out, the ADMA of this IP does not work with 64-bit mode > > > > when it is in the Version 3.00 compatible mode; it understands the > > > > old 64-bit descriptor table (as defined in SDHCI v2), but the ADMA > > > > System Address Register (SDHCI_ADMA_ADDRESS) cannot point to the > > > > 64-bit address. > > > > > > > > I noticed this issue only after commit bd2e75633c80 ("dma-contiguous: > > > > use fallback alloc_pages for single pages"). Prior to that commit, > > > > dma_set_mask_and_coherent() returned the dma address that fits in > > > > 32-bit range, at least for the default arm64 configuration > > > > (arch/arm64/configs/defconfig). Now the host->adma_addr exceeds the > > > > 32-bit limit, causing the real problem for the Socionext SoCs. > > > > (As a side-note, I was also able to reproduce the issue for older > > > > kernels by turning off CONFIG_DMA_CMA.) > > > > > > > > Call sdhci_enable_v4_mode() to fix this. > > > > > > > > I think it is better to back-port this, but only possible for v4.20+. > > > > > > > > When this driver was merged (v4.10), the v4 mode support did not exist. > > > > It was added by commit b3f80b434f72 ("mmc: sdhci: Add sd host v4 mode") > > > > i.e. v4.20. > > > > > > > > Cc: # v4.20+ > > > > Signed-off-by: Masahiro Yamada > > > > > > Applied for fixes, by adding below tag, thanks! > > > > > > Fixes: b3f80b434f72 ("mmc: sdhci: Add sd host v4 mode") > > > > This is not a bug commit. > > Right, but it can't be applied before this commit, hence why I added > it. Not sure that it matters, but I can remove the tag if you > insists!? I hesitate to add Fixes to the commit that did nothing wrong. I added "Cc: # v4.20+" so this is enough for the stable kernel maintainers. -- Best Regards Masahiro Yamada