Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4764953imm; Mon, 30 Jul 2018 22:56:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfje2q89JIDynvsQVnj23LsoGYdwDkz5tPw5iyimHX6dKnM53ZTB4lm3TWM9p4khA72zwGM X-Received: by 2002:a62:f610:: with SMTP id x16-v6mr20980257pfh.169.1533016608710; Mon, 30 Jul 2018 22:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533016608; cv=none; d=google.com; s=arc-20160816; b=gowUMiIk9J+m3IczU1rHARJtlJfQxc3OgbQsuEBMUthVWtpjrxIgWoW4bRighS8Ctc MbOjiIfgLcXfYk7R5NNJJ6dzbSulPvAk1Jc+Tgg/F+fD0cjSqxJjc+BPMK7/0M0lNbRk gF3HUWGYHKV46OOKlbEEW8R2A49A7dwBgB+WRA6Am+6ZIbyuMa7n0R0sfQa+v8YBWIE9 AI5gFZG4xjyuF0syFApqy42wPHVswJ4MLEGfLk7FL2efx+BZc1JmR+pZzAYajiYXKrB7 x9Ov4L4+35GLEulZ3jvyAFAXCWJfxY8ta+F+QQMxFxxVVfM5xdW+l8omTs5CLD5Zi+WM tVLw== 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=q7xhR+SEvFHogB2e6PovTIgxMSfbolumkcpJU428NhI=; b=QvjmUSZ9OU5V9o3Vqf2Llb7R3C9xu231wIUeIXRwOUCTKeHwrHrAfWL7n9Mdz/5nld Elnk2LGXgHHjHLak0GcKSXSdUiSzbititqAmn9v2eY3GPWielhXWDIyEWsaWASl1reOO zwvrTBVwhUjryetKiVpMxhZE9UNny8MePFHyN5YhIpwS2vxuXlwcp1pqV7Gb0PdA2Ck8 /ka7995VrrcqhIjXkxbltMX0NgOlrPMoZuiIRgyHwQgs9KmWNIH9KW7RY4HLn5YncMkL TfsnB+XbHxQI6L3/ynMG7nlVOf7TnKDJExjgAL7C0dxBSxHcnj3vqOrrcU4hCYA+6aJD l46A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector1-synaptics-com header.b="G/YEjcmT"; 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 l81-v6si14704704pfa.368.2018.07.30.22.56.34; Mon, 30 Jul 2018 22:56: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="G/YEjcmT"; 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 S1729099AbeGaHeF (ORCPT + 99 others); Tue, 31 Jul 2018 03:34:05 -0400 Received: from mail-sn1nam02on0049.outbound.protection.outlook.com ([104.47.36.49]:39904 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726917AbeGaHeF (ORCPT ); Tue, 31 Jul 2018 03:34:05 -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=q7xhR+SEvFHogB2e6PovTIgxMSfbolumkcpJU428NhI=; b=G/YEjcmT19gxQhmE1uG489k3wg/Ho1hWRNgUqUsNRGQQo0xlowuFvuHbgQPHeBboNbUJtnFQWdhBJM5H0Sa6N6bfdy5kAQvLUCro55fE84+kFoHUhm+UA513kbpiI8o48ZeqlFGTuYxX+i9rGMYEXRsKnQ5k7tDAAt9/KfdNOm8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by BLUPR0301MB1570.namprd03.prod.outlook.com (2a01:111:e400:52a9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.16; Tue, 31 Jul 2018 05:55:25 +0000 Date: Tue, 31 Jul 2018 13:52:57 +0800 From: Jisheng Zhang To: Robin Murphy Cc: Adrian Hunter , Ulf Hansson , , , Subject: Re: [PATCH mmc-next v2 3/3] mmc: sdhci-of-dwcmshc: solve 128MB DMA boundary limitation Message-ID: <20180731135257.268924f3@xhacker.debian> In-Reply-To: <20180731112924.6a1e8388@xhacker.debian> References: <20180726151017.4da1e336@xhacker.debian> <20180726151424.4bcecf41@xhacker.debian> <20180731112924.6a1e8388@xhacker.debian> X-Mailer: Claws Mail 3.16.0 (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: TY2PR02CA0018.apcprd02.prod.outlook.com (2603:1096:404:56::30) To BLUPR0301MB1570.namprd03.prod.outlook.com (2a01:111:e400:52a9::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cec7be20-11e8-4e60-3933-08d5f6aa37c1 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BLUPR0301MB1570; X-Microsoft-Exchange-Diagnostics: 1;BLUPR0301MB1570;3:/f8dQNS966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SXIHNvpb5262JErAmzaSCIYk+xA5CQFxD2DkwotFLeJlZMYVJ9kWD4xBwi0KRTTcsxHEvcLYbL4yCav6v4FFeoKeFW4U18tzBphka5NT8lup0Lgk7haYhbXUetpftKwfGoDOPwQr9RHCSSewDeC22JPadHb7kgmkP6OYVazOmx6/FXFuODZe1ZC/R6rPrdSI0LQr7TLrCOfI7HfpabOeiiST30Uh3AiKvAxXiayO9LSfEyHvajWF5O7m7tDND9Eh/SPrJavEDaQvSj93FOJGu0fH5FnjXp9f0DN4VJLVrKT2uIIIqUZCNo9tmkHH/5dxZZtLxXLiQjh3;4:PsdgMsIjRT6FAz+14P6gRm4UThczrsvZaGpi0jM37l21gmGUIfWVj+i+PoCn4BVarfV+M7+i+nv8EO8m7aIWWrT9R9V1zLDMrz2jCGwpPUYIxgRLFRshdxPfNdqMJn7ojFMO6sYdm4i6kw8BIEZZrvqp74y8zbm3kqbw/+pJQ3W64soNfRxljG0fgcYtV+t54+CxrJv9pyThUa4xFFZdJ8J/6LditZIebdp9vf4AfhM9fy9dxn42Oq7a0J/AOO2PM0k5Pxs9QDL3UvwRVGslrQ== 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)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011)(7699016);SRVR:BLUPR0301MB1570;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0301MB1570; X-Forefront-PRVS: 0750463DC9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(39850400004)(366004)(136003)(346002)(376002)(51914003)(189003)(199004)(97736004)(50466002)(5660300001)(6916009)(1076002)(3846002)(6116002)(23726003)(6666003)(9686003)(54906003)(6506007)(53546011)(386003)(53936002)(33896004)(16526019)(8676002)(26005)(229853002)(7736002)(14444005)(186003)(81166006)(55016002)(446003)(476003)(486006)(316002)(230700001)(68736007)(81156014)(305945005)(93886005)(106356001)(105586002)(4326008)(47776003)(8936002)(86362001)(6246003)(50226002)(76176011)(52116002)(956004)(11346002)(7696005)(478600001)(25786009)(66066001)(72206003)(2906002)(133343001)(39210200001);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR0301MB1570;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;BLUPR0301MB1570;23:nuRMELwoE/9lXitu5/CpTHmNVhvD+bpTPFCbYfv?= =?us-ascii?Q?3BPKGTfYAwLnehm9oQ9Az7ThwucdGE30wGjnf1uRSj2Z5mHmL5C3zPxZRjGs?= =?us-ascii?Q?VGRHhwS3k28BgFGLNvKpvQsuwXsNiBp+jV83NEWLJ/tWvZNLemjbP2KpaVX+?= =?us-ascii?Q?+/Et/MTa7bvPS5n40aAlk6PFPKolQeChZ+MD2y5n/whezMxOoUS5nmq1Ko1f?= =?us-ascii?Q?0M20tMX7YqYciWZf0skKIIxhDM//SqvWbttC2DZLC3BzMBlkI9bJqaFPZJwq?= =?us-ascii?Q?BOYesQ7eERM5kI6EykQVzthcRX75sekpHW45AXMqpgBDRMIP1Eq5GUyRsRli?= =?us-ascii?Q?1z4nxwO19+c+tq7yS3KXm/pHgAgEUZ4usZjeu/4oQ5EzGCMf8exeSyNUIcEL?= =?us-ascii?Q?XsFLGXU5NVKU1TNvUqkmZOIvVBLYnqusPvb3tHvB6Z3h2uxzlN571NF17O2A?= =?us-ascii?Q?D2Fd9/D2PFTFF82tbkUez/TXSMZRoMpn0p9D1WaYrbgRD8pcftnNg0NCaGg8?= =?us-ascii?Q?ZUHKHauiZuzyXwrUEMXd0CyoQ4+Z+16cztyebk4Z+t4xC+6xj3yePysp2mqd?= =?us-ascii?Q?H0Shs8LPLev316S34yDhHhrU6n3nkW2EP41ZPdFEuy5LodIhRqhnnXIbzdPd?= =?us-ascii?Q?Bl6T/t2blnRI2S90OYPQEgH2vCdaQez7QOWJAeGRpUDwHmEAFpzCoSY7s5AT?= =?us-ascii?Q?Vo6oqhmq71lODLT02UQV5/fOF+iFw7DuGka9CTSuCsWt/DJoSH0TBvrIof3t?= =?us-ascii?Q?pOMbTTrwHDAYPXsUX8DKQXZ7GXRs6N+WF2jXlk+RnN/lMrKG13Fp4CMQ6zYF?= =?us-ascii?Q?kBhjnolX59MmRPG7nMcMaNj69tNjPtkuPsDkYwcACU03Gb/ODTAVqr1sAxwA?= =?us-ascii?Q?x9dAwvwrL22+X14Df5CQSz4vlTxYu6pUrz1Niyyl0THqx8U9MpMn1hMsVlWn?= =?us-ascii?Q?wOf2cfPRQIfTB0mzQEuK12E7rHnmxYDnh7AbqrvWmqcMgcrNa+xl3WwVPRaj?= =?us-ascii?Q?Y6VJDW0yhbIga79zqByqckKqio9jBmSRBos4L0wnQQeY73V3n8CyGFshE11c?= =?us-ascii?Q?ocwzmEdCuuGJhbjLdgJYq8oBoEAq0n13ngQO8Z2OuSlaxOdsjMJPbf511WN7?= =?us-ascii?Q?5RZnA1DQ0dldvlR1O++q3qmPWOHh8vJ/hr0/fRSzeJPyp0ANSwJRmmVgkNbw?= =?us-ascii?Q?6NA38uF1h9Wwce7D97oNcohahdsWDW8Sa4iuc8oNV1zs7420xlciqFDT4pd5?= =?us-ascii?Q?m0iAxpUAY3TPibBkOu56Hs2LI+quD86VySYOYiLc17lS/RJQ9r2smn0P+T+B?= =?us-ascii?Q?Lt+nSQY8u7MCPsIj7ORVe6vKR3PAevW5evkGmCAf2ARRMh0alt5FmdVrJKK/?= =?us-ascii?Q?5mhap3f4MI7595zf+pIpe8VpdeR4=3D?= X-Microsoft-Antispam-Message-Info: Vu5Y/k5gREyxyG5Com0p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m9ZdwRPrFZVjTZfqR0xK1Ayr2M2HLYllOeOLzIs/Qw7j3vDcHW1vKLxpfyUgHY0dQpHClmYaeXY2wdxWGwMiRCei9o8SOAXspkmLOPDSBQ1zEW7P3z7S71x/B+CwzvGnG+IxAmjRxGwezv3VhmUV3U7nP9dfrtRcDeG/IEivxmepye/RqeZKXiuFLQyx6VpuLcPc4UAh05NB+ZwMh6 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2018 05:55:25.6357 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cec7be20-11e8-4e60-3933-08d5f6aa37c1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB1570 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 31 Jul 2018 11:29:24 +0800 Jisheng Zhang wrote: > Hi Robin, > > On Mon, 30 Jul 2018 12:06:08 +0100 Robin Murphy wrote: > > > Hi Jisheng, > > > > On 26/07/18 08:14, 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. > > > > Out of interest, is the driver already setting its segment boundary mask > > appropriately? This sounds like the exact kind of hardware restriction > > that dma_parms is intended to describe, which scatterlist-generating > > code is *supposed* to already respect. > > Thanks for the nice input. It may provide an elegant solution for this > limitation. > > To simplify the situation, let's assume no iommu, only swiotlb. And > the DDR is less than 4GB so swiotlb on arm64 doesn't init. > > There's no dma range limitation with the HW, the only limitation > is boundary, while dma_capable() doesn't check the boundary mask, so if > we taking this solution, we need to teach dma_capable() about the boundary > mask, I'm not sure whether this is acceptable. > > Another problem is swiotlb initialization. When to init swiotlb, we dunno > there's such boundary limitation HW. Is there any elegant solution for > this problem? > One more problem is: swiotlb isn't available on all platforms, e.g arm? How to solve this SDHCI HW's limitation on arm soc w/o iommu? Thanks