Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2301130ybl; Thu, 29 Aug 2019 06:30:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZQViQqGITFZXQk/27sSEVYHWbWpb+VM3KKRFBLfs0qJnaonB6nbYCSdcvkjn+UqJZUTJZ X-Received: by 2002:a63:b919:: with SMTP id z25mr8234508pge.201.1567085411495; Thu, 29 Aug 2019 06:30:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567085411; cv=none; d=google.com; s=arc-20160816; b=xoyvPyLLqKIlL4krmMdGwz6nqZjYV/Vu7qhU25Q0s0IaeAfra257YL70deDxy+sNTd Kik09I874iMl3SX1AKNEFw7MxIMs9gRV+VftvuiYMJaCceMHVAAv1vEf/OKbOGjUj5Zq Ah6yllePYk1LBtY+l2Yrz+JOBqSMKj0BNplxQ78rWDjq2cJ71QVW5qRvoWsK+D4oubFp tMlb15+9eL4gxmFqwglAIA/iNo6fyYXaxabyCBptep+D2foDLfqFDraf8qQGVpZtkeCI +JHn4r7Xe0B4dvXKH9SCreK+Aa24fcSSxYtqg9O6DX/H55Jdmzk/b3z3YakCldmyL5PG z4XQ== 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=ZHPJ2CX8ytGZ59Fh54fNpJL5kK4m1cHIPf+TD22z6+o=; b=QqIx3ETukV5LJ37vvPg+Fh3YSEzLsqmq8WFo47wzEX1LxgfSEaBA3sWZhOmQlPbgUY R7xm1H5h1PbJwXuEVvCboOkENGz3vyJcixq2KE732QioVN1f1sSHEtSUXvrJqX4rzAIT YZztPfMsrFZ2ShDkiotJNQmuaH0PvbOoxpV5kQVcMKLj/OI4AKTTQBrFrtEEbT4Jm0tC 8graNmK48fcaShaKhDoxnzy8xBk/LezD5cgeWyske8tXbMohEcnmEvAM9khRrrOlFHNC ULm9Sg5XKV9lzaf++D1EEXt/pYq1Pu+NgvEVbNF7aK2BjFcpFDG5m8WscKMApe7JRbdw I4xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NeaPl8zt; 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 c22si1832180plo.375.2019.08.29.06.29.55; Thu, 29 Aug 2019 06:30:11 -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=NeaPl8zt; 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 S1727798AbfH2N1l (ORCPT + 99 others); Thu, 29 Aug 2019 09:27:41 -0400 Received: from mail-vs1-f65.google.com ([209.85.217.65]:43408 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbfH2N1k (ORCPT ); Thu, 29 Aug 2019 09:27:40 -0400 Received: by mail-vs1-f65.google.com with SMTP id l63so2372357vsl.10 for ; Thu, 29 Aug 2019 06:27:40 -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=ZHPJ2CX8ytGZ59Fh54fNpJL5kK4m1cHIPf+TD22z6+o=; b=NeaPl8ztoK8Qgdcm1+9gPoJDy8U3vejd9FkPsydEcY67n3MnWOq+NaObq3ozxUJ5Rk DwuiKOIEv1nIHZsB/vk+DkE2/fghIqX3BE2c3KQzYmprvcAaDqLw3Nh+8cwLxYuBrewg ylebGR/9Rc/fZ5+HwC9njjO3tJ4KcfsEjQoagoqlXBHQMoD+N2o7klC3HPzUcNiWlpX1 fm7KsQ/qoQsxBoNSjtRp5kI8h28S4gwjEIZFP5THgEgyanEG0EDd02a9Fx8l7b+ty0I5 ZtvPoOLmPPKTI3+szjIA8ewjhbuGKx8ae5OyYEAVu3xoguAAqQhIIugSUjLkZuxcFxWy NGtg== 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=ZHPJ2CX8ytGZ59Fh54fNpJL5kK4m1cHIPf+TD22z6+o=; b=HYSA5kMuYQ+3JKNgOirdb5gODBXe1UlQZ+u/shpswpjB1+9vwwvYaHw9/Ma6ztA3RZ t9wEd6xJJZW6xx7QdeihQqE6E7XEkMDmNMyI3zxvclgmzjng2GB7+QZcy90o7+Ikefui PrUZwMMWXLUctj28LjFcEj58Od5oW/TyB/M+/rDCNBODaz0Io3UHH6+4xxNptUXtyp52 rizjE/m/Mi93SPBPl8DuR9GIGbrzaqbjdJcB4hsl8ir/TNG2S2/elhTtFSCkifu01icC IVfFuKsAX0amt/8YVuzmyF8VqR40zVxIQNjV4pVf2Swc9ZS7+64rGnltJyxso0nyufqE 5uKQ== X-Gm-Message-State: APjAAAWb0idbiw9UVlWg/3vgr2PbS+sVBHEEzaeIFMGedk5ryCmsKG1R Vq5pFF6PUTvkiw2bEXvPg3fIjwHMwnUvs1hyZgYXdg== X-Received: by 2002:a67:e287:: with SMTP id g7mr5409930vsf.200.1567085259869; Thu, 29 Aug 2019 06:27:39 -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 15:27:03 +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 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!? Kind regards Uffe