Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752416AbbKJKXs (ORCPT ); Tue, 10 Nov 2015 05:23:48 -0500 Received: from mail-bl2on0069.outbound.protection.outlook.com ([65.55.169.69]:53149 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751760AbbKJKXo convert rfc822-to-8bit (ORCPT ); Tue, 10 Nov 2015 05:23:44 -0500 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; From: Appana Durga Kedareswara Rao To: Vinod Koul CC: "dan.j.williams@intel.com" , Michal Simek , Soren Brinkmann , "moritz.fischer@ettus.com" , "anirudha@xilinx.com" , "dmaengine@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Anirudha Sarangi , Punnaiah Choudary Kalluri Subject: RE: [PATCH v9] dmaengine: Add Xilinx AXI Direct Memory Access Engine driver support Thread-Topic: [PATCH v9] dmaengine: Add Xilinx AXI Direct Memory Access Engine driver support Thread-Index: AQHQ3oeLuzH4BHmY1UyDY9gDoyl7hp5cwT8AgACIbACAAIj6AIA3qvBQ Date: Tue, 10 Nov 2015 10:23:35 +0000 Message-ID: References: <1440432666-10310-1-git-send-email-appanad@xilinx.com> <20151005152628.GE13501@vkoul-mobl.iind.intel.com> <20151006074459.GA23420@vkoul-mobl.iind.intel.com> In-Reply-To: <20151006074459.GA23420@vkoul-mobl.iind.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.23.95.58] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21932.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD011;1:OvrQ79C1nZCRQUVBmryzeXs57jL5TFgC0o2RfwzEDtCQYif9CksQLTe67jq7sDAGsMrGy+ntbMrUtJIPL+UOF1dp42GKczNYn2y/CVkM8Ln/LCiur42wIyPu+r+7D0Mu3KLMshzvvE0ayUWPDt88Wo2YmEHjZLLNonA/DKXzszmx7z5DZSOr70Ei/xarknh2Cw8LVAB7Og8wsr9+ueo2juccL4Yez6pqF0RnzXZ50KK8k5oUH9tEK4xbvjklUs7pShA8iyjhIdOIu13RVdKmDRBJs3HR8Z0s2F7RZjxBuK0BHV/mKYIuxbWf0I2C7FCquaNTfGhBNj84tWU8RErlvspaSkzmd0yD870J1vEodO29hsUDKaRMm0NjoCFL2mLL4c57tNruBsdV0IhNdgHXb6VRIkXiEEliJpRtB8YFcdk= X-Forefront-Antispam-Report: CIP:149.199.60.100;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(377454003)(13464003)(24454002)(2950100001)(107886002)(50986999)(33656002)(110136002)(47776003)(19580405001)(87936001)(2900100001)(76176999)(2920100001)(54356999)(23726002)(86362001)(81156007)(97756001)(19580395003)(5250100002)(15975445007)(50466002)(93886004)(5003600100002)(102836002)(36386004)(11100500001)(5001960100002)(5004730100002)(55846006)(6806005)(4001430100002)(5008740100001)(5007970100001)(92566002)(106466001)(46406003)(63266004)(106116001)(189998001)(107986001)(5001870100001)(422495003);DIR:OUT;SFP:1101;SCL:1;SRVR:BL2FFO11HUB028;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11HUB028;2:TAMoFVaQU3fyZQQhdGJP9xqSYFOsd9TrM6Ct1oDdcfLlY1fMrvAKoIzDOgbReIbBoucZCGA/WxYUbPs5InPvO/1Wu9UTzFgqtfPoRC2JWIbjapmfviMWZaLEIwu1zh65mnnI0Je+B1ndjQ1uiyweYpMcNv7SWhppB29CGqK48rM=;3:AhAMpvGagrWK61QVvYDgpRct2tEQsTVJB58uvDDTN94LJuCd0q7iB6g0OlFr4HpboA926c7WdyBZtuZnTnBQHKqB5fY/H8o8ezvAb644lpHZyb4hq8MQqwzWVgRSNKDoMlrRLMPJ7MYGPbXQkodQye7yCDQeLT6E/b+UWTdtaNuT8tFL8OqXmlJ9S+Ayc1S5E9mF4pjQa9fBU7YnnjssrjADaHvzc+ttnlZKmcvIzddnarBQqePYMIgDwqLAwmPegCQ23/7/gxQ99R07lmOz2Stb1leuzNutSSN9gtOU/KH+eqZJZPtM4L/ox6+dPeC/;25:kLVr2gPu0NrJF1ECNT+drnwyHAIHn9a2xCRfwtvaoF92t5sPInaDrzx0J/Jgmze4EOczhTg0vPxVgEkfL+M4huYio05q62dq59ZI1jw7txQaaZ1UN2Mpvh75mPVkdffyDEvDBRYBztlTuk5UtK4EGQNEoepfUq25/9Kzo/bu8RAtM0EbDZEeRX0ysfq9Bv9cU8kkIDV/8XCU6B6byBsmrKxrSa6tNl29h/BfPaMRLgaGfAEh3vBgT9qi6cgxAdySvUHWffhywDhCQ6+C588mhw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(42134001)(42139001)(8251501001);SRVR:BL2FFO11HUB028; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11HUB028;20:HMO+S7dqAREpyYVngLr49+UAyew0RCkz1oEMoyOTXUs6neZkqs7ffGtJKTn+5TCB1yFnwvLwVhh1kfRggEKAiXmbAC/7dIeX6UxERgqK7EFU+aSK9ow5luQiC58q3ZGCgsbqeTPhlzYQAE7bSuIZwckT3q31jNEA3E65l8Yd7ZeSWaoOtuE8JKANajqm9sO6s//3rE/aXtSKgUQ/paQ8vBcSE8lNfUdMV4LaUBmNvNv9xPHY4NLfksN4eqvEAtco3fns7nByBqu0sBAC9hT37yzqlubvoYwGC0q37hSnwT+RkdbTTT38Zch+m+VmcZtysQghD2doEXfvCW04JltIN+32SvsHVY6viEciFs2b7155NdQ+AuXkaVIvwjgzPdgNGRJ7mWHwphmKKeoORCcDia8wDD80Lxu3+MIDi56oF5W/3DSYwrsmvDPqtCw81pJ6WgmztzVZFzSdoYFdUniBiFt2hMLNRrdlWZFW5GUtovkxVHK9XNVcFnV+YXlTuviK;4:fWuo1jA/tKtdUshbkZjOeTjCw1a+YMbiu01pSPVN9zLb0t/KdPnjLa8DmAzdIKxR6g3pM17PVkDBQEMucg2Dxeamb7fMhl0FqNWNuznLLWFBJDxAvzLqId6EdmrJe+FrLKYFDOQFpV9ec72INLcp/do2wowvEeHRSqAaVYR2SU1SSAcbQazMUElhlINb+lbc3X9w637KisgMzCqibS0cUezvuaprQKsIvGW6fxK1HHqGX3C2W9Yn+TtOcFAG3TLhdQIi6CPpfL3ehuOJqwMsIjOEia5Q9Tbb/dD/2ZcLH4RhMTP3k7W0HPJGRjt8DjsulgLpAI1xtaafgzsqwnveilQeMg6QZCGSiqbRqpi8UsSfzwY7PoqHbHjqJvoVvIl9 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001)(10201501046);SRVR:BL2FFO11HUB028;BCL:0;PCL:0;RULEID:;SRVR:BL2FFO11HUB028; X-Forefront-PRVS: 07562C22DA X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2FFO11HUB028;23:H3VrQkv4kTO1jDL7G/B7FWvegpQiNHygrjwKcuOl?= =?us-ascii?Q?zs1aA9nkNuydUVQMw3iixAB5KtVYO0MqjUzMOgx7dZcntufUVaNvgYUuKsmW?= =?us-ascii?Q?rSmgozqDY0PdMKJEEMOk1rVstc9I4PzNaNy2I+uqBazM4nVYquLOtTA59nhc?= =?us-ascii?Q?Hh5gD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WbUM5eRQ4+SiYtiWN?= =?us-ascii?Q?G0CO+xbJObKrp/tpknYyFHzAkpvoWKt2PBGR/EW/7z4WBqw7oqkf2u9i7MNy?= =?us-ascii?Q?gpUi4N6tiuh7akD98un/TYVMrIwaLZtEqRXv9RFSCAZBgTIy1YGlDrE9ggNM?= =?us-ascii?Q?iEBhrkrwXJwt1fvxH1fflJxg/wlpPmcjtNIJlys01UNiW//wZxQxHRzSq9aW?= =?us-ascii?Q?09IYwPDlWPd3AZWYf5BUGwjaoLP7AdHCoQjESr9EgSj5Y9loHAjXZjk6q1t6?= =?us-ascii?Q?lAxkeUTD2OVXnePqbmJrk/I=3D?= X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11HUB028;5:GE2z8fN79jf+4sBN2QM+TMSvWQwMZ9zVhTe5yDkHtlglmOia6TodUCOcDwc11y3Fost8fWJE0tTyTX7ccVqDv0OQIM3JCO/u4JT1f1yzdcLCgchC2tABpTC2hnhGRwglafB/q8EDxQyRCZEK5KZ+oQ==;24:1ExMcGR3+m51EiybrnA6ooY1XlIzv0gpg4e+85uSTQeGeN8ziqQhG/eTGnwulemxTX9tU1Hbr7lSsRkb2NZFxbgTI+HBk7xqPP5H9Y//N50= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2015 10:23:41.8749 (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.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2FFO11HUB028 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4156 Lines: 74 Hi Vinod, > -----Original Message----- > From: dmaengine-owner@vger.kernel.org [mailto:dmaengine- > owner@vger.kernel.org] On Behalf Of Vinod Koul > Sent: Tuesday, October 06, 2015 1:15 PM > To: Appana Durga Kedareswara Rao > Cc: dan.j.williams@intel.com; Michal Simek; Soren Brinkmann; > moritz.fischer@ettus.com; anirudha@xilinx.com; dmaengine@vger.kernel.org; > linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; Anirudha > Sarangi > Subject: Re: [PATCH v9] dmaengine: Add Xilinx AXI Direct Memory Access Engine > driver support > > On Mon, Oct 05, 2015 at 03:48:39PM +0000, Appana Durga Kedareswara Rao > wrote: > > > Pls justify why we should have two drivers. Looking at code makes me think > > > otherwise > > > > > [pls wrap your messages within 80 chars, I have reflowed below] > > > I agree with you and even initially we had a common driver with the > > similar implementation as you were mentioning. Later on, being soft IPs, > > new features were added and the IPs became diversified. As an example, > > this driver has a residue Calculation whereas the other driver (VDMA) is > > not applicable and the way interrupts are handled is completely different. > > Briefly, they are two complete different IPs with a different register set > > and descriptor format. Eventually, it became too complex To manage the > > common driver as the code became messy with lot of conditions around. > > Mainly the validation process is a big concern, as every change In the IP > > compels to test all the complete features of both IPs. So, we got > > convinced to the approach of separating the drivers to overcome this and > > it comes with Few addition lines of common code. > > No it is not that hard, bunch of people already do that. > > You need is a smart probe or perhaps invoke IP specfic method to > initialize dma controller. > > In above case no one forces you to register status callback for both, you > can do based on the controller probed... > > I am sorry but validation is not a strong point here. I have a driver which > manages bunch of different generations. Reuse helps in having lesser code > and bug fixes across generations easily.. > > We cant have two drivers pretty much doing same thing in kernel > > Please fix this and come back Sorry for delayed response. I was out sick. I had internal discussions with my team. Both DMA's target for completely different use cases, have different register sets and different descriptor formats. Interrupt processing is also different. Each of these IPs undergo frequent changes and enhancements. Having a single driver means for any small change in any of the IPs the testing has to happen across a whole lot of test cases which looks inefficient. Thinking futuristically where we don't know in which way the IP changes can happen, I feel it is always good to have separate drivers. We can't predict the HW changes and since the DMAs are targeted for different use cases, we may end up in tricky situations if we have a single driver. I do agree that code reuse is generally efficient. But for our case we are not dealing with generations of same IP, but completely different IPs. Though there are some similarities between them, I feel the differences are many. On v7 of this series, I had put the same observation to which you seem to have agreed. That is the reason I went ahead with other comments. At this point it is definitely really hard for me to merge. However, if you still insist and see a lot of value in having a single driver, I will see what I can do. As I said, it will be some work and in long term it will be a maintenance issue for Xilinx and our customers. Regards, Kedar. > > -- > ~Vinod > -- > To unsubscribe from this list: send the line "unsubscribe dmaengine" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/