Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2392628ybl; Thu, 29 Aug 2019 07:37:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUYSYV3Sck4tr47VrY9C50Td0ygCg4OxERENdCqhOH9K2PeOHabxtiwhQV/OiksvFey1iA X-Received: by 2002:a63:6901:: with SMTP id e1mr8372608pgc.390.1567089420617; Thu, 29 Aug 2019 07:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567089420; cv=none; d=google.com; s=arc-20160816; b=Qs0Ji/pEZkKNfMFD6gp8D3okWPgsprsdwXwftAQzzkQ+BjKWIdZmLDqevz5zPHf7Vn iw9Afh/69Xe/qz4KEBGdObr4fZqHN27wSfgC3oOAGT91YRlmDyjnRK3UtoZXkkM05JIk a/cr0t8H8m4qDGlXzd/SABBkt+9N6P5FF1qi9364AjT1sUCgJ3EJti8J1meliwtXv5n7 IHZo/gDVg5LkxZrWc/xGFdxyqLrVAJoRM5zNPFZsX6uMHqJdbWt0G+aerkHZHy2vR1qD yT7F7Yo5zzEcqHxKodDmr59Exk+k7WPBy4fXEcLqdIcQaH4Kzel0eD4BCY3u4nRi9fi5 xvAg== 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=A23fasXWLwWGtZNLkF/Qw7NJX9iqROeXxg3LfRD4LSg=; b=Iu63ufyTkPKfGbRE84iNdL4vc49BoRJGnDKTYNEplEnNTgyjNYbjzDayQB/GPkRkGb kCrNp4VU0UuqCcXyFGyLYMXXnnD7p9MK1/R8+Ql110/N7NGNldLJ/+yYRMS1/ch3Ptrv 3YIezJZOyIdsRHLzbWcoBDM7nOgmMj2E+SvtZVOiH6uMd+7UhLmGABUo7JDQmWH+zxqD KQH2Cu+EOkSFOgqccCAsBLqdkOVKXtB1qRyjOFuUP31b1kWjOejVGyc4nftDMtz3g7bB 3xSwzOfZjpBXf1IOQab5RBDKJL4iRbsbe1o5XMsOnfoy/2WVcTg2FgvU6WlMSqrSs96J M08g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MZt5LlcE; 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 w12si2115563pgs.364.2019.08.29.07.36.43; Thu, 29 Aug 2019 07:37:00 -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=@linaro.org header.s=google header.b=MZt5LlcE; 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 S1727626AbfH2Od4 (ORCPT + 99 others); Thu, 29 Aug 2019 10:33:56 -0400 Received: from mail-vs1-f65.google.com ([209.85.217.65]:38039 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726950AbfH2Odz (ORCPT ); Thu, 29 Aug 2019 10:33:55 -0400 Received: by mail-vs1-f65.google.com with SMTP id 62so2549339vsl.5 for ; Thu, 29 Aug 2019 07:33:55 -0700 (PDT) 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=A23fasXWLwWGtZNLkF/Qw7NJX9iqROeXxg3LfRD4LSg=; b=MZt5LlcEm6Zd10jeevZWquQxYFwJvGI38ZVc8eGhT4fqHfTBj+XaDOZlgUeGsfjUHQ K8BcH2/JxwZ6FUBgnPBZjEStDRS1yUjM203s68nJZBGVeKYwfuVXFsp6N9n5R5lvZGC6 9nRcYk//uyxLMr/b3o46ntLK9G95Pab9oJ3fqav8+KkMx1I0lkBT/E09kaoe6LEQKelv GkPKm0DIhdASuc2T/jQsvI/4C1V/cifIJ9/2OXKPDl3NUypwyVhqD1IBIiIN47cwLz88 UMbglNdLkghsUG4L/aercFBhBmCLtTrFzZRhCIKPBUODbp/q8N8uUBA/17dPev29vyGG jlTg== 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=A23fasXWLwWGtZNLkF/Qw7NJX9iqROeXxg3LfRD4LSg=; b=sBjYoIzhic3MZATEKW2aU6TCT3tksCLzzeghwuEybXMY6/dXnTke8Dtel8Feg3Cvwl wBQjNnL6cgjTUIIv1sS5WxtY/hvMKAm8gjnW540z9xujpLWQp8TmypHHmnQO+N3QH/DR w+Ta6DWygjg4hu34W2I6dqxKudHK1nCaTEk6LvJywKDtyRqKjD+immLMCA+1vrcxZz9O FzOOupdBOvpBq4A2PcEYOzPvqzMOY3p1Csj21X/rP2CNnsZo+7SXeaFOUCX1n3FEKl6G RkcUaFp3TPrRCfsiI87O+bBa/JpkNVQFpZAEWFr6gDD6z/gk3THRsMhgJDDFj+VnMdn/ lY6Q== X-Gm-Message-State: APjAAAVnF91zzMNjyW2JtuBiPBzJ4uiWcC1dVcTdy4KdxPlSWcrOeUYy 97U/8xobH0i6+LgXiYxta0wnDJ5/ob0xmNK46SSi5A== X-Received: by 2002:a67:61c7:: with SMTP id v190mr5663825vsb.165.1567089234815; Thu, 29 Aug 2019 07:33:54 -0700 (PDT) MIME-Version: 1.0 References: <20190829104928.27404-1-yamada.masahiro@socionext.com> In-Reply-To: From: Ulf Hansson Date: Thu, 29 Aug 2019 16:33:18 +0200 Message-ID: Subject: Re: [PATCH 1/3] mmc: sdhci-cadence: enable v4_mode to fix ADMA 64-bit addressing To: Masahiro Yamada 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 On Thu, 29 Aug 2019 at 16:04, Masahiro Yamada wrote: > > 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. Yes, I drop the fixes tag. But as I said, I don't think it's a big deal. Kind regards Uffe