Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp6893193imm; Tue, 28 Aug 2018 02:57:48 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ2A3/Fyg2Ca3xixwyttwWKD2BDYnHyI7ngwdbk5eMyDR357l5oHQoKwSMhb2jWRZ5V06XX X-Received: by 2002:a17:902:64c1:: with SMTP id y1-v6mr798224pli.45.1535450268694; Tue, 28 Aug 2018 02:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535450268; cv=none; d=google.com; s=arc-20160816; b=q5SoRuoypIe6fC1kklFnsjtyvI4HaNlxNFVj3gxbJGNH2Gc6A6H46nCZTK+KsNpNCh wTc5X8qtSFrDWj8X+I7TEixJf7OQrvxfp4Tkyt+QwvntbE7kqmWPm0BXaDF3AvIPjKoO lrIEKvIY8N71zggTGQF2bo1Y/oIngXHdGneMKKsaqSEusrmecU8UP0VumBrioiE4RF1Q 4L/1pYj6UVBlT1HV9nQc8fC/wASpqEqicgiwhLdm5SqfZxtg+eRr++hzmxIlg5LsZE7a LI3JLQSzI8MPg5Pm4eY6NFyzwMas/AgWhxHjSs2JLmEbcmKDO34GGTLqknArYBL3eE3H L/kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=zH5hKhqVs0j8SXPewubs8e5s93NefK1fJh86NLkM4dc=; b=iEIAGfb1djo+4EEOVi526IhEwUc7aD46Bj4GA1WbNLMWZiMMa98Vr6li2FjRw4hN2Z UDVacyWUa3TGWCzMpceycPndLJialF78tvL0kLcprZrfvgGAqPEWpZTywigXuzyfvb3l D/wQzV/cn4a+KEoYmp5oIBFdQUAuYOWVABc7MAQfpuZchjzqAWDQ+HZR1oZeSJASrBaq farIbM2WPGcvwBuZNvGaEvBVnCVbub8g3TT0Joau4C/BER7+417Jri9pOCM3OMlPWyp8 p7cD5uXSN4e2UulZIkR8UvCb6lRnqa0YNL4qBZGbZHZNQpSfQaKSDVlMGe7JEAhJWnlh fb7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector1-synaptics-com header.b="Ly2Pv/JP"; 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 m14-v6si552468pfh.92.2018.08.28.02.57.32; Tue, 28 Aug 2018 02:57:48 -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=@Synaptics.onmicrosoft.com header.s=selector1-synaptics-com header.b="Ly2Pv/JP"; 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 S1727414AbeH1NrS (ORCPT + 99 others); Tue, 28 Aug 2018 09:47:18 -0400 Received: from mail-eopbgr680088.outbound.protection.outlook.com ([40.107.68.88]:60107 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727094AbeH1NrS (ORCPT ); Tue, 28 Aug 2018 09:47:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zH5hKhqVs0j8SXPewubs8e5s93NefK1fJh86NLkM4dc=; b=Ly2Pv/JP5M3QrqMMXORSUgO682ogDwXUMdVYNM1Lw4jCHNiq+2W0IqS/yfX88zCWxUsRXJ5mWknyTiaqBIJSttIuedCGR9jFSXHRzl6F9Sc3S9V1eLOVIL6v99mSVAiSyAl5qDJ0zh0cIyIKuSQJQaVwWKQwaOWa2jO9tKIIyN8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by BLUPR0301MB1569.namprd03.prod.outlook.com (2a01:111:e400:52a9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.15; Tue, 28 Aug 2018 09:56:20 +0000 Date: Tue, 28 Aug 2018 17:53:19 +0800 From: Jisheng Zhang To: Adrian Hunter Cc: Ulf Hansson , , , Subject: Re: [PATCH v5 3/3] mmc: sdhci-of-dwcmshc: solve 128MB DMA boundary limitation Message-ID: <20180828175319.7ff35889@xhacker.debian> In-Reply-To: <9739a083-cb2f-1cba-19c1-1c4e0d03eedd@intel.com> References: <20180827162026.3901de27@xhacker.debian> <20180827162419.61afe238@xhacker.debian> <9739a083-cb2f-1cba-19c1-1c4e0d03eedd@intel.com> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: KAWPR01CA0091.jpnprd01.prod.outlook.com (2603:1096:402:c::27) To BLUPR0301MB1569.namprd03.prod.outlook.com (2a01:111:e400:52a9::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c516ca92-41e6-4fd1-1fc4-08d60ccc82b3 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BLUPR0301MB1569; X-Microsoft-Exchange-Diagnostics: 1;BLUP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ssuXHyKKD8lKZC3cKtJgR8Qm4N2RLNE9siAOFPRNaCw3mF8aBRUquNZbh1AULI8Fp4BzyoaE/WiekNWoutWLyrUtwQmXyMUgEz6mnI8PJvEU0Pe6CSqLVV5qbSMaROkgyDcayXIhh11GnigNm4TGXmjpyfITZUGjzroftCQERF4GQIqw7pT66gJSE05c7NW750pQeuwKcLvlWsGAVrEvfKBinwhpzIGRAvE/g0EpSlPlLzinSDWe4RudadA+N5wci1xQhqJVDNdQ4FL629OhNPgYTSW5RLaxGjR/9ZUuztEYQ5fkq4Lyd9ZEw+M2qrTVrMPJxPduOE6dQqH2/N+wy7LJeOjwj6P1JT;4:cwL8WUF/1Pjomh/auFByx5ZjkDYPj1saSpP+MTKEBg98UfS/vfMHEYD/Fal92X4VYFzsYTdP2xMxg2TTM+r1I2KWFZiGq4oGVVg6ac6fMI7s1XyqeKLA90fDY30GonMtgQcKJsc7GWGK9sae52bKjqZ3vkD0HshbUeYdNSZohy2vwX6abHlEoN41X2pSmd7FEWjw1VVNaf0Sqbk2tHsw6/sEGzIt5sBUlAs7xmbbW17E+dDdgOqb1HgQKGurN5ElapFEkvlTX1DLmPZulSlgLw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(201708071742011)(7699016);SRVR:BLUPR0301MB1569;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0301MB1569; X-Forefront-PRVS: 077884B8B5 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(39860400002)(136003)(366004)(346002)(376002)(189003)(199004)(14444005)(81166006)(23726003)(66066001)(956004)(5660300001)(446003)(47776003)(11346002)(105586002)(55016002)(1076002)(9686003)(72206003)(68736007)(229853002)(476003)(305945005)(6916009)(6116002)(86362001)(3846002)(6246003)(106356001)(2906002)(4326008)(81156014)(7736002)(486006)(26005)(16526019)(54906003)(97736004)(8676002)(50466002)(53546011)(6506007)(386003)(230700001)(478600001)(33896004)(316002)(52116002)(7696005)(25786009)(8936002)(53936002)(50226002)(186003)(76176011)(133343001)(39210200001);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR0301MB1569;H:xhacker.debian;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR0301MB1569;23:P6bjrLkmGwUP0R2ko/OKlm8jHTsKO6voqu3kYUz?= =?us-ascii?Q?mUw2yuA7mq3OT3/HZ/PblBO5Ntndze/d2eMhjkrjUpQhp7aG5A5AIeY+Q6uG?= =?us-ascii?Q?bX0l1nMsvV8+Uf929+770FFj/E9nvo3cpOlQn8KPhXNlSqYleYoaNE/NmiIB?= =?us-ascii?Q?d+CZZ73dlgCp6oK2NAliwvDTvS0OFDoGriS1WP9q94sApl4l7wcF9a1DWUcO?= =?us-ascii?Q?Q8qSDZ88tTPbfV9JfyBpCIjPQVE1WmK7VeYxOe6LAX7KyGs3oIaV1U9FVAdF?= =?us-ascii?Q?cWUhcvIE2TJ5SyUsfbkm1UgWTNnalyYx3sgidGLK5MQCZtBrlrazp8NpClMY?= =?us-ascii?Q?WMXn7tqIqxrx1NJAQRfqVa+5dk5TsDwS5pFIk3XNqs3Lv5Vg/F3Z+mUTtR0V?= =?us-ascii?Q?cNUza7ooi72VZ9EgLPbzSy7Rjir/qXBKL/0SUdZLVBJUyJb+bEGqE3NGrdsh?= =?us-ascii?Q?Q+zlvjVjNPSwSfLbwzVwyV+ByRIf6nyjbT/f1YCY0Xpbbi4gsd1N0eXAtF1K?= =?us-ascii?Q?lOy/eL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MmtheN+zO6Wg6zKViZ2fssMuUAPCTReEx5RB+o3XkNf4XBtpSK+34ULf+kv1e7EDzra1jQZzpkcL1U4NcHHj7Y83OdJzXC+11y18IQaCfHYeAWZUknov7w8Hhs4GvXiMqFizgevpWDkC7G/tOKntuy2BJqn7imyZRDo9ARa3fDOSb SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2018 09:56:20.8858 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c516ca92-41e6-4fd1-1fc4-08d60ccc82b3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB1569 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 28 Aug 2018 10:51:02 +0300 Adrian Hunter wrote: > On 27/08/18 11:24, Jisheng Zhang wrote: > > When using DMA, if the DMA addr spans 128MB boundary, we have to split > > the DMA transfer into two so that each one doesn't exceed the boundary. > > > > Signed-off-by: Jisheng Zhang > > --- > > drivers/mmc/host/sdhci-of-dwcmshc.c | 41 +++++++++++++++++++++++++++++ > > 1 file changed, 41 insertions(+) > > > > diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c > > index 1b7cd144fb01..cfbdae8703a1 100644 > > --- a/drivers/mmc/host/sdhci-of-dwcmshc.c > > +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c > > @@ -8,21 +8,50 @@ > > */ > > > > #include > > +#include > > #include > > #include > > +#include > > > > #include "sdhci-pltfm.h" > > > > +#define BOUNDARY_OK(addr, len) \ > > + ((addr | (SZ_128M - 1)) == ((addr + len - 1) | (SZ_128M - 1))) > > + > > struct dwcmshc_priv { > > struct clk *bus_clk; > > }; > > > > +/* > > + * If DMA addr spans 128MB boundary, we split the DMA transfer into two > > + * so that each DMA transfer doesn't exceed the boundary. > > + */ > > +static void dwcmshc_adma_write_desc(struct sdhci_host *host, void **desc, > > + dma_addr_t addr, int len, unsigned int cmd) > > +{ > > + int tmplen, offset; > > + > > + if (likely(!len || BOUNDARY_OK(addr, len))) { > > + sdhci_adma_write_desc(host, desc, addr, len, cmd); > > + return; > > + } > > + > > + offset = addr & (SZ_128M - 1); > > + tmplen = SZ_128M - offset; > > + sdhci_adma_write_desc(host, desc, addr, tmplen, cmd); > > + > > + addr += tmplen; > > + len -= tmplen; > > + sdhci_adma_write_desc(host, desc, addr, len, cmd); > > +} > > + > > static const struct sdhci_ops sdhci_dwcmshc_ops = { > > .set_clock = sdhci_set_clock, > > .set_bus_width = sdhci_set_bus_width, > > .set_uhs_signaling = sdhci_set_uhs_signaling, > > .get_max_clock = sdhci_pltfm_clk_get_max_clock, > > .reset = sdhci_reset, > > + .adma_write_desc = dwcmshc_adma_write_desc, > > }; > > > > static const struct sdhci_pltfm_data sdhci_dwcmshc_pdata = { > > @@ -36,12 +65,24 @@ static int dwcmshc_probe(struct platform_device *pdev) > > struct sdhci_host *host; > > struct dwcmshc_priv *priv; > > int err; > > + u32 extra; > > > > host = sdhci_pltfm_init(pdev, &sdhci_dwcmshc_pdata, > > sizeof(struct dwcmshc_priv)); > > if (IS_ERR(host)) > > return PTR_ERR(host); > > > > + /* > > + * The DMA table descriptor count is calculated as the maximum > > + * number of segments times 2, to allow for an alignment > > + * descriptor for each segment, plus 1 for a nop end descriptor, > > + * plus extra number for cross 128M boundary handling. > > + */ > > + extra = DIV_ROUND_UP(totalram_pages, SZ_128M / PAGE_SIZE); > > The amount of RAM is not necessarily the same as the highest physical > address. I think what you really want is max_pfn or max_possible_pfn oh, yeah! But these two vars are not exported, I have two solutions: 1. use the dma_get_required_mask(), this is what I did in v6 2. always let extra = SDHCI_MAX_SEGS, although we may waste, but the waste is small -- at most we waste 128*12 = 1536 Byte. But it seems solution 1 could do its job ;) Thanks, Jisheng > > > + if (extra > SDHCI_MAX_SEGS) > > + extra = SDHCI_MAX_SEGS; > > + host->adma_table_cnt += extra; > > + > > pltfm_host = sdhci_priv(host); > > priv = sdhci_pltfm_priv(pltfm_host); > > > > >