Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752700AbbKKMW7 (ORCPT ); Wed, 11 Nov 2015 07:22:59 -0500 Received: from mail-by2on0075.outbound.protection.outlook.com ([207.46.100.75]:2701 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752486AbbKKMW5 convert rfc822-to-8bit (ORCPT ); Wed, 11 Nov 2015 07:22:57 -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: AQHQ3oeLuzH4BHmY1UyDY9gDoyl7hp5cwT8AgACIbACAAIj6AIA3qvBQgAEeMYCAAJ4JEA== Date: Wed, 11 Nov 2015 12:22:42 +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> <20151111105527.GL25173@localhost> In-Reply-To: <20151111105527.GL25173@localhost> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.23.230.69] 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-21934.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC005;1:hpJaPLANtiE+GA6s9XuXxewn1H0rOhJxUOzh42VYPcsXbBUjRpIS9mmQV0DxXBZxAb2S8C1f8mavMbmY0eU0Nm3PPRO29c89xrm1tyd3f3v8Yb3Kg7b0ZUrtTTY8bH8NQkOmEOnAq7pbZaaoRRzOrhajGHWAPJa/aP69KjDq9vSNv2bd5Bwb0oxcITqCBZXob+RHoszXwJN8Hmn8qv3RVXiVR6w0EAv7e64JNI1PBQKjP7jzbBFfYzMX06r3768ZUwMo6cH1BmP4HqdWcwYuxCQKHEpX+15AKgfNPUTufvFLn3NaUVaTgxBJzCS3oKvABYmqP0zZVngCK1F1PQAkN38eUkrdYGijKGaZBEYW+Dx8UaeDXG1dsSnt0XMcALaeq7LWdjS4pq+qlFfy/cyx4H/veIqyUoAWfQab3ZlPW/U= X-Forefront-Antispam-Report: CIP:149.199.60.100;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(189002)(24454002)(13464003)(199003)(377454003)(55846006)(4001430100002)(46406003)(5008740100001)(76176999)(54356999)(87936001)(86362001)(81156007)(36386004)(50986999)(5004730100002)(92566002)(5001960100002)(107886002)(6806005)(5250100002)(47776003)(110136002)(11100500001)(189998001)(50466002)(2900100001)(63266004)(97756001)(19580405001)(19580395003)(93886004)(106116001)(33656002)(5003600100002)(106466001)(23726002)(2920100001)(102836002)(5007970100001)(2950100001)(107986001)(5001870100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2FFO11HUB018;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;BY2FFO11HUB018;2:dz6epEzYkdWLSimSkcxc16Gjk3RD7GGxgrjZ0jJK8MlOLU64Qfyk9LelkOvbZekE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u2tc3PydPtZDWbB2/prs+zRDfhio9MGh9uE0ZXpcJpKTliJtcwCyidmZIzkXOXFNZE7dZaDV5GqAIloE1s2lUAnfSw5fOyaCTTxhEWI0f3lm32rO/UFT1YXmzcSFImi8pSQ2t40GO6XFH08kEMUBdMeO+5aPjv4OZMWlckAYuAT6m/0sWCvNMzJHJOIsJR67Nm3C5LuoYE;4:zWEQgFGRWJqunD7Dukzc2B+rvr5sEd0FmuRCFzOzCsiprMU5JmdPbBEKHPqkKsQ5e0/GXt1bqpxQnj4nHuwpcfCm0xyeWYMb773kgDu0HVOyjCY/cEbyH8jIEiNZINRSPIBYgzfNitOqHj1jYHK7/cOf4P/XoL9psTLgERjKhilIxOE13lki4zzn9GWzJkkkLGSZXWXXdeqc5U4g1W2pvN/ZV9UuVNqsVqkU+jkwdMEXwhxhtNCmO5V13r1wk/KipOvCC9NU/w3QZiuY3uHluGsc8w4dAL2CTWDXEIC1N/mWWKFkBsXPKkC90/s5/1fXOXPEXt08R3PlF/RXm78VCf2QLOoTLItd+XaR51oJbjNogrJ+Q6IteKpDJwfcHiW3 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(10201501046)(3002001);SRVR:BY2FFO11HUB018;BCL:0;PCL:0;RULEID:;SRVR:BY2FFO11HUB018; X-Forefront-PRVS: 0757EEBDCA X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2FFO11HUB018;23:sjoQDK68li4OaMVb/Y9cS/h3APwoXzHBB8mQ6nfZ?= =?us-ascii?Q?Wi195uZIQrDOI+/aqIH3tiNUVO6wW471/lOOSf8oEsWvNRal0dnelS1VZpl1?= =?us-ascii?Q?mv1Xo41zt7AM5pPXph7KlMphx32vN0j0FDXNyMBeyWWSZyG/BspUCSbaLiUu?= =?us-ascii?Q?4X4oHbM9qUaTbFfaUZVLivbUZ0q6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?Q?R9HBQ/8WzGO88mSQVsyUgbSIfPLQTiTnwpjWDbFLoNavBJ3P8oXI/p0k8+XT?= =?us-ascii?Q?08whJPwGIimqrpaeOZyUe9yZ0CUrkjKrqj3TpJE9WFesVYCbTfB33IZrfBiA?= =?us-ascii?Q?VEFWaOGe9+Q+gnjLSn2taJDwDAGEgupYbr1nhoU0QHP31MueH0xSsOTaG2YI?= =?us-ascii?Q?I3Xh7ziEfaT5kdUlpdujm+LwwBKY32DefS8Xysji?= X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11HUB018;5:kVLSDj3DXF5us/8OvxC7hBeHSVtfYXMrwhA2aswd1zXBk/b0alvRPB2jnlRAY0dj6ZdqxpG2O40Oz2mzW+/sRm5RO2KXNA05242glvvggqsmmBkIqIS2OutWxKzSP3i/rLrNdYYkf5GtvjvxIXJhmQ==;24:gDnXRWy6kXt+4G/46rfAmScVjtMteUkjzcV98QWnIRnibFXkksGplw9r/8VRwqhqaLMHvzIZnUOS0cOmUAB/5TGI2t/RqsLosB0n3NvDhwg= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2015 12:22:55.4111 (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: BY2FFO11HUB018 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4559 Lines: 99 Hi Vinod, > -----Original Message----- > From: Vinod Koul [mailto:vinod.koul@intel.com] > Sent: Wednesday, November 11, 2015 4:25 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; Punnaiah Choudary Kalluri > Subject: Re: [PATCH v9] dmaengine: Add Xilinx AXI Direct Memory Access Engine > driver support > > On Tue, Nov 10, 2015 at 10:23:35AM +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] > > And ignoring recommendations does not help!! Sorry for the noise will fix it next time on wards... > > > > > > 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. > > Lot of this is unreadable and I am not going to add effort on this > > > 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. > > Yes please, I know you will have arguments for it but we know reuse helps, > reduces bugs. Yes validation is increased but that is how drivers are written and > maintained, and pls automate that! Sure will come back with a patch by merging the two drivers soon. Regards, Kedar. > > -- > ~Vinod -- 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/