Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755927AbcJYHZ0 (ORCPT ); Tue, 25 Oct 2016 03:25:26 -0400 Received: from mail-co1nam03on0044.outbound.protection.outlook.com ([104.47.40.44]:19494 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752418AbcJYHZY (ORCPT ); Tue, 25 Oct 2016 03:25:24 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; free-electrons.com; dkim=none (message not signed) header.d=none;free-electrons.com; dmarc=bestguesspass action=none header.from=xilinx.com; From: Naga Sureshkumar Relli To: Christoph Hellwig , Richard Weinberger CC: "dwmw2@infradead.org" , "computersforpeace@gmail.com" , "dedekind1@gmail.com" , "adrian.hunter@intel.com" , "michal.simek@xilinx.com" , "Punnaiah Choudary Kalluri" , "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Boris Brezillon Subject: RE: UBIFS with dma on 4.6 kernel is not working Thread-Topic: UBIFS with dma on 4.6 kernel is not working Thread-Index: AdIreulhNSfiAXz9SeGoIHaDLH4vBv//fz8AgAA4/ICAAAQegIAAAf6A//teMLA= Date: Tue, 25 Oct 2016 05:52:49 +0000 Message-ID: References: <519a83bf-1244-5151-b873-bb8e1f2db3c6@nod.at> <20161021125313.GA16754@infradead.org> <20161021131505.GA25942@infradead.org> In-Reply-To: <20161021131505.GA25942@infradead.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.23.95.32] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22656.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(13464003)(377454003)(24454002)(189002)(199003)(586003)(8746002)(92566002)(97756001)(106466001)(19580395003)(8936002)(2950100002)(46406003)(81156014)(33656002)(7736002)(305945005)(5660300001)(626004)(11100500001)(7846002)(86362001)(50986999)(76176999)(81166006)(8676002)(93886004)(47776003)(63266004)(6116002)(3846002)(23726003)(189998001)(54356999)(5001770100001)(2900100001)(4326007)(50466002)(5250100002)(356003)(2906002)(2920100001)(19580405001)(55846006)(7696004)(15975445007)(87936001)(102836003)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR02MB506;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;PTR:unknown-60-83.xilinx.com;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1NAM02FT037;1:Zc245gJt0cCIfADCCGi1XF17Gekw4Z9DwbdzgHrrlWLjHlXqAb0zESkCtixNb2nmVmExdUYWy+qgmbF74lWG72O/GJdY2RBor4Tuaza1XRojblaYct6AzMdypdNWYW1fg5n99Fs+50cAckQ39sx5n2/4BbnhYmsXlxFGo1Xlc1rqpX/0ExxJgNyGhLUuYNOol6ztV8Ki0rV0PyX1xSTCu+um5v/DKHnPhwHhM7XJ+3+bSQhaZilOeCRvJiG/YZg18OQR4KH1Qlj1Dw2Y8axmVBOlxowMLtNruOpzt43sruM7oeDHk1e6kZUF/Uyyto9Ls4fhByBM1bkpFeqhb41P1MXkdn+WglL7RsVe23rjeOmQkM4L6pgX5xLYLIu50GJrZ5TS4e/0GmFW04JH0vBo7jB2N3GxqaYjUIG09JdX+KZQ55MBo9H67/NIt3wjjXUD4rJSZ9F415YesAaOF+3kX05sagAMxs7LF0CwKpvYlxwwbYYaGUIsBLtk15zu0QkZgtLrnscRdWa0SBlAB6aijidFKRqbAUBCSIXQ/m3RvJvF54yIabDU0m2q0t42JYaLIesm/f/aTm9QCO8gYt2HcgKy9nEAS2GNdjSaJsYhCwzZSoK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whnknivuVte+50+t6c9D2aW5 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501002);SRVR:BY2PR02MB506; X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB506;31:XCl0mC8enGW1zKMcIs6HvtuT6oEXZJ/UR7jaJeEqpXUc0H5EStSnxZhs7JiF0TJz/mrDa6pyE+FzaxxX7WOIIs/MJnbQzMpzsa2kgyy0Sxmm9eitf0T6w+xHCgi2SWcuao5s9DvD+te84F0ht3mtmN+dAFoBayjoVwr5z4jr+Fmdq0HTqmJ7cFatbkc3iRtPI4q7pPuDXEp6xMCCvpluyvaw3SDmthentbeiDRSLHBOygLyyN44iVWnbLykL/71hRydz9fdXtFAzeu6ZxA5W9g==;20:0HrRTY1FcSrRBu1NbINU9cJjgc5LocFsFX5uFOpKqhYVKPVF76e3Sdcmym3hvhDchy+dlgAx/2lmwznd2ARJDKc8gwNdk1qHlVVzH+eTXx647rh+gfXz6h+KxNp9K7XJt0tfkWMFvWhf1/FxqAAf1K4tNdQezxZWUeBGXNqKlEpzC4+2r6bAu05wTDrxaxwUnz9C2yazYJ2QeFFKqXUEP+pPrTVZy2NIkz5MG6CNQmVThfOWXXFUu63AexDdSrMC9ZNe487KtoeBpi6gMsz6QaGo0UhL/HO6zV5W38RYtMPCZpH2+V6lxkgxwbNNj3AU8HucmklllDft/tfiqT3tEyWJTJHckQdjrRyKwK4RnHcJnkJtTZoDdWQE2zv7bwe5v/s2yHtp8hJWXQv3oazMO33aS2k2jDcOQW4j7eOacnq3iZujJt/vcxSaEqNF0wtxiKX8E2swfepnkBw7BY6tUgUTG6+DxmnU173rSg0x7NVgClCNGqVfq+vRZ/D3+GIW X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(258649278758335)(192813158149592)(58145275503218)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(13023025)(13018025)(13024025)(13015025)(8121501046)(5005006)(13017025)(3002001)(10201501046)(6055026);SRVR:BY2PR02MB506;BCL:0;PCL:0;RULEID:;SRVR:BY2PR02MB506; X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB506;4:t+yP37Qk7Zu/upG6TMMhNZUYd2xL5nI7VyCRlVMA+E3z6UzNDa2190JnG/TVn4sFSWyIn4ytNKztXCAZ0CXDb0d48L06FL6+tcIP9ed43+59PMbs0F6nqNX0eEIym+CSmlnsHbm4d94duAPTClkRKg1w7AOkAxzvdqTbZNcYNqs89ljwwe3GOo156nZQmBFH/PB0aWCrdKC7X40j4AGJIGhZMGAHxcms9axE4H6Rp1bG02Hw591zJdqPwy2YCCe32bqus9rssgCkCG/4HfNXXOSWihonuODfgV0NLqF4z6z2AnGmX1m5k06PAu55q1dqPT4PW41Qx8/vJNTfnxjSJm6wRXzj/Mgnw5C67NliiMn3uvQOHX8zMDhZl4usiDls9rebB+HERtIDs/Fhh+y7iLQ5+CiKkzuNU5SGoRhEUYk+ZyI66dhhksBJKgFkqpVbRAxFuwd51HmrTDELy86bc+Wxgrekz6/MEo0kfWQ+xizj3gf6YRzKhnDuum5+FwLkEjmQqEc8lHz6gs9KYzkwGnTt+GnIviJClKYT6PmbMqv+zqd9VEW38pB3j4Hupm7G1aDieNKimEykHVQKmDSPe4jzMU8yTIPlZcL3RGo8D4eqzhVqmbhKS+dPE7ZHIR98DGiLKonLXuukVblh5JDOs2OfkgycYQ7qSqdD8V11rn0sP1cEfYc6B0+lXJLP/Pq6 X-Forefront-PRVS: 01068D0A20 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR02MB506;23:veWA1F6zqWcZg8FDhtl3nZ38oOeN0oGSi8Mx1c2W1D?= =?us-ascii?Q?D1yaSFqtQtdfy9C5b+Q065fY/K0xS8EmxUJe3TFEm+Zpb5bEpJw4Nwemt2lp?= =?us-ascii?Q?BFfXIoq3gb3ddxKHJucTZE2ij7s/+/rivXWaJh1WhlDAixf90v6mVxzPCYi+?= =?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HIwAFhisHgi/EJkA2fTO?= =?us-ascii?Q?+TDN0zYreJRPQlNZeONE+61xzvGYROVvPPPF8a2+sKUEL/feMpk0k7k24WSm?= =?us-ascii?Q?ZvABtegm0jhhhojcVd0lozxfaRuiW1w5fDFfV929ZOIv/AEdXqEV5eiHxOKo?= =?us-ascii?Q?T/vZryRYcFFMQ2J20FB6KwAr6aGVd6sHgm75dqoLDI4S7G0R6JbM0Slhw44S?= =?us-ascii?Q?C8rd9zHnJAwMn51eahNHkmSDAB0Dki9JHvwYHSvA0kQNH9z8lev3gcmLIRzg?= =?us-ascii?Q?=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB506;6:/ZjkoV9MTILq7/Or9BWiqiPwK9AYbRz+kCDuJqJvc06VS62YOxMqGJnvrXGmcsQ5mk1CKtQoovgC2tt2f7c+7styWq4KTVl6/vPoQT473KjgliHWnSd+TY/4N1RqxgOXYbGhp+2vUWqILIWyNV2ha6ZqtXWgTGmBXDEri8j9K18Iyb8q9tCl1FquQRAjcJZXVkYOl4QdgCsA5gVzh151zsEC30CELcBMshFakeSYiQ6inL7HZ8RuYO1DtlYOL3RzppAl7VrxBnyqKIYIDy+CIa678eLAQxvjiWPsl4+zSrQZJX1qmIGjwh2HIzEdFxZzQs9ncSTWP2fdUYsCFKr3r81iWv6/5ZmxnaYWBtficwA=;5:JlqAiF7Q1sRhUtjooxE9wrItwEP4syCrT0jftAnWJ5sJUNngueSrpxD1/W6EqbA/P1+ZoMlhAhPdlSXUXdcWSOFih7lfh4V25ueq86sSDaLXVCCOpL5nBXxEuafVIuFtREPyzye4JwpRocK+Tqv+yw==;24:QBsDBrPsD31kPKic5JKYHMhGJYNtG2xwM9gWSpno8LVfWRCaSg2LqAbjh91zlPy0rp7fj8FRFpkv+R7dUdyvX5P+u26Bl7n188AAzmJxM4k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB506;7:q8T7BEuUX75ewWeikKe+StlRRHeqJu7L7xAMhoRh9dsF5P7hqVwCEN1P2FqN/B03dVtjHnLm7A4A6uxuPuyIY/GHGAgwPYX41H/8z8A69te1AZheCKHAw9I/QJpufeG0lOfry0C8Ge0oLml1oFn+txF4oT59slor/V1nljQXh4t3MotfUPxCrxXS9UVYE9V7Bs1uOd6SGrcSJiwiWt1+NOCD1GQuV9rJp9RW5a/F4rL1BdRcbQx5lH9kWwPmkrEaRd9IidcFHJ/33dHwbfLpgcIis8l0BC4yeNbnDMNAdRxKhsM6v8YPqLM8sB5Y/iGmHgWlD2KFW1C+prMh/zSUxulQoo/8TJX4cKg/3rBs+yw=;20:f9qeNw7cpMhHm5nf5NhCTVdTTPOfrS7pVX7KpLpRq25FQhCCOplXFgdJ35yhvRDycqavi9BG7vGWgbPQwk+PtU695XRSLzDddMif4gsPfgyq9uN2BlB5sUxw0Ox4ZxSAE4BZRikTuSf5A6btCAi4lIXoa6clghzgNO6HZLI+afc= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2016 05:52:53.5876 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB506 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u9P7PVwj020102 Content-Length: 1669 Lines: 28 Hi, Thanks everybody for your valuable information. I am not aware of all these dma related APIs but where to handle these dma stuff? Is it in UBI/UBIFS(at the time of vmalloc allocations)? Or in controller driver? And also is there a way to know the memory allocated using vmalloc is contiguous or not? Based on that I can switch my driver to work in dma or non-dma mode for ubifs use. Thanks, Naga Sureshkumar Relli -----Original Message----- From: Christoph Hellwig [mailto:hch@infradead.org] Sent: Friday, October 21, 2016 6:45 PM To: Richard Weinberger Cc: Christoph Hellwig ; Naga Sureshkumar Relli ; dwmw2@infradead.org; computersforpeace@gmail.com; dedekind1@gmail.com; adrian.hunter@intel.com; michal.simek@xilinx.com; Punnaiah Choudary Kalluri ; linux-mtd@lists.infradead.org; linux-kernel@vger.kernel.org; Boris Brezillon Subject: Re: UBIFS with dma on 4.6 kernel is not working On Fri, Oct 21, 2016 at 03:07:57PM +0200, Richard Weinberger wrote: > Hmm, thought this is still problematic on VIVT architectures. > Boris tried to provide a solution for that some time ago: > http://www.spinics.net/lists/arm-kernel/msg494025.html Things have been working fine for approx 10 years when using flush_kernel_vmap_range before doing I/O using the physical addresses and then invalidate_kernel_vmap_range when completing the I/O and going back to using the virtual mapping for XFS. Of course all this assumes at least the higher level that did the vm_map_ram operation knows about this dance between virtually mapped and physiscal addresses.