Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755031AbcKPJZX (ORCPT ); Wed, 16 Nov 2016 04:25:23 -0500 Received: from mail-dm3nam03on0045.outbound.protection.outlook.com ([104.47.41.45]:37536 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751572AbcKPJZQ (ORCPT ); Wed, 16 Nov 2016 04:25:16 -0500 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; imgtec.com; dkim=none (message not signed) header.d=none;imgtec.com; dmarc=bestguesspass action=none header.from=xilinx.com; X-IncomingTopHeaderMarker: OriginalChecksum:;UpperCasedChecksum:;SizeAsReceived:1926;Count:20 Subject: Re: [Patch v7 3/7] irqchip: xilinx: restructure and use jump label api To: Zubair Lutfullah Kakakhel , Michal Simek , , , , References: <20161114121351.10924-1-Zubair.Kakakhel@imgtec.com> <20161114121351.10924-4-Zubair.Kakakhel@imgtec.com> CC: , , From: Michal Simek Message-ID: Date: Wed, 16 Nov 2016 10:24:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22702.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-IncomingHeaderCount: 20 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)(51884002)(189002)(199003)(24454002)(377454003)(7846002)(63266004)(5660300001)(93886004)(106466001)(2950100002)(92566002)(4326007)(87936001)(305945005)(77096005)(47776003)(86362001)(8936002)(6666003)(33646002)(189998001)(65956001)(31696002)(50466002)(31686004)(65806001)(64126003)(626004)(2201001)(230700001)(65826007)(356003)(36756003)(9786002)(8676002)(54356999)(2906002)(81166006)(76176999)(36386004)(50986999)(5001770100001)(81156014)(83506001)(23746002)(229853002)(4001350100001)(107986001)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR02MB2867;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;PTR:unknown-60-83.xilinx.com;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;SN1NAM02FT016;1:Hoe5o4H5PmGWu1mcCcB7X5VsdVXfFlVYyjuKeFA0pkbkKBCBanXyisEzYFz3a+XX8VUAO+0mfxX033u4sgKtpEaWsHThiHhOaXOi9toxpFiH4iNRPd/Iehe69mYDK2jwhZvPu5/cvJ058BIFVjWwTdUGp/lMtkiRddqOM6Jd4T0eoHolfHmNETU71kPm0YfyoKfeFG2ZsuNcq5Jnl4d4ALsOtGiMrsEUwX0DcvfXGcd9aQrhdTpSYoU9ptewHT4vAOdpnjI3I6+YsDmGYCBhmiZJcFwqJjxX+btxJ0hKoP1/la0BttvOkJ6qXIKpz2KvAFszPYcFl/+7Cr4wcGz35BKqBlFEi/8KEnUtfMZN/DzzhrCdoLKEvAjZMmM4RUYFBZnbCUSTzKi5Vy3sa1it2UVdXvspO9PcdYcJrTNkpQ8Ymxv8KTJRrkfw4UdwpQC2AhRLOcXjOuh1FFG+VGxiCAFq6ToyBNPOU59uvrPVtJ29bS6O931q0Y25Nu3B5FQOb7cSizaZynfeUSTsj/qWTuhtgoQzVYNLgzyRRX5i19hvTDdeQyRFU921HbLBTgjtRNVPJk57obC9PANqGX8C6Te5KJDC6mY0NGVJACQ3Izk= X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2867;2:yPqoY2QzFbAYjl9ylVzrnfHAS0eLkyU3K4QHmaO1wppfrX0xPlmdza0v4lhq06mEPKZFNVfttoaxxsQj+Ue12PYV0PxWuUlktYhW6ZL+1dayROJiVqdeKobhb9RCbc2KBi4s6oltQawrPETXATED3zyZKueUV7x0umuPMRnrFIE=;3:IdSo90edYL2iqzSX8fDlovoPF+WCUGJ5o90JVePdMIyYMnUNVCE+OM0UY8I0N1mofYVCGhPeI4JXUN+Dq2AJ6FzuCEAzJLKxBijMoUn4cxDgYsgYpjkDGnE1AXBjjtBHCHRPkxTpj7nP2sT/iJwUZEKnagP6cyI/B7W6ZWhp3f4wykUAhjKPjIVPX4r2CpcHQ3AZPnuRaACrK8HQpTZSLLRmGsFpcW+w9SahjHd+SQxUpvITDgibVrfOaYioRVmTFZxFAstioTOY9EFh2EOhf21aPvfojLzml20eX569ByE= X-MS-Office365-Filtering-Correlation-Id: f7997593-2815-422b-a4b6-08d40e0276a0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002);SRVR:BN6PR02MB2867; X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2867;25:3kHTlN0MZfpWyDfWEW60CXZbQHQDYxehHgAspp0BadcVhQuQYNvnVo9hbO96Uye614hzt6jrzCN6ahj7MMF3oSFDvWL0k3ueieu9ZkygCWkFIo9nUsazYAGc3x9SYiefu/Oj19YvnjuMVsS2YxmptpMWNjNXCUXcJZi+okDUwvbGoaAfg3KXhPJ2/sz0KXy1rnBKAkQeNGZm84xodERsiN0AApnYFk5KC3P1gRnkwqLwOtF5lvA9UwxxEYYCn2Os5yY4UFimVact83AVyKzIuZ/L1H9WAZdKi1qMNJWQgtumFIBljQYaQX4kMi+HI5EXSY5bmm+K5MmGmz+m41evtRDXJ6SGZmXT6mDDRzFO5115DUi2XgSx1HMQZvmkxZJmnLdLjN9khLo8kIaifIPuIhNM8rr3pw//Ifa0/orjkSSyWOsRVqn0U6n9ep33QzrGzi9YSEOEHFeffexq4k84Pg==;31:fuXd6GM9jxPb6chBfuX78SCoJaUCHN1GMiVIFqnP0VUzQ1HBmGhse6mBreRZsNvqD5ypq28kvbPeyOArk+yT9rK2lgSTdXd9sj8r7g97Dg6Ue8G7mjjv7Kssn8eJd7+qAD97FqIGD4Qun2NA795Z8MNUYay0a3Dv+nappyIZl87caK6AUkJQkK5df13L2DGJpL7/LvW67uUM9QSf4c5glAfEPjMc8HBWhv749NvBNSEMZ/A96llpV7TJUt6jK+5rT/C8cYlb1oFxB0w+l3JD7w== X-LD-Processed: 657af505-d5df-48d0-8300-c31994686c5c,ExtAddr X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2867;20:r3Ea9blz27J0ma5Zqg0gHAffk2TpMQOx6LAMSQ/GNdONsYoPrq4b9PBBxfFbZ8p30gipVnh1rZdaLw4BGzDHoHioOhbeR4euokc8LAYZK4GGDjaGTL1YuE0Q5QWN4n0z/sJkgctig6c50prOBtQ5ITuqimKYE2EUiXVGgo07GWdTpDP+PijgJxojLd6uvmZEMDLQuXrFCVbpWTABDvRLwlnoTNvHd/nl07eAbE0ZGFHZCRW74LnXxYl/A8QlZuVLRVYmh+YHZM7P3SF9gbKivaDHGXyOQT73On4VQIAnrxWvy+1yr++kg0/1lbUtx6dhl/tVQIot0egPLSg/JzwST6hEj7AfkO3O9r6pRUz3Pusvt/dbD1O3DrMDh6MP59Jpb4mQprAf6Ws/wyIbRYcu+Y8wn1xhlB8jUBaj4sHKOTCXIkFuW08cSzEIgO4HgBS4j/uyHjraPp8/Wcy1kHHTRgIdmY4CQ6FyQa+2ll70Xas6l8J+3iN3sF1e1fdiYwx5 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(166708455590820)(192813158149592)(21532816269658); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6060326)(6040281)(601004)(2401047)(8121501046)(13024025)(13017025)(13015025)(5005006)(13023025)(13018025)(3002001)(10201501046)(6055026)(6041223)(6061324);SRVR:BN6PR02MB2867;BCL:0;PCL:0;RULEID:;SRVR:BN6PR02MB2867; X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2867;4:eRaTKfIY6SsEpb8icnNgFCGGcmZuy8b4aNIsq9Jnjs/jlr8vpE4kea92h2kxFMU4eK2zRnXZWitOo1IVwGMnq+0mewAWD6tJBUIq79eepeHCAgXUdy2Ypr8xyGFRvQw2cafGNrwEuABpn2+yVM2Op+serVtM10E5rdxmSQ5YEOgEDP57I1aORxrEvdGGiUDT7vIm8wgF2iBjdp4N0d8/9t4UiX+55/idT/czn70vWo8MzMNg1URfDC01+fS/ESu7z3J5zG0pHtziGGHBoTfsA7P3ixMdi+sGqZud0W9nZPIpURiJD6zZLiWaBnaNxFtNd1jy7FFYgJS07BVuQzVAL966QT8bgnzrm4WyVfRzRroxRR7VdKMHVMF16TxS5sSBUDmhdwM9w5Lm3reh8lXn4/qD+6LKeFFb/3v89ojev9fxWKTLk0RRwR0mKqEvdclbMEQvn6Lfk0Z90+F+S+BxIvLvjdqah/Jv4JYHjq4seDcwa9gQp5Y1XjRIe1mVd+hMcOoSE+Phq/nq+LPlexDgPhQSUdD0Wg0gOKF7IDc7cx3tx4qMN4WV0Ycxp98QKkDZN0uH20sn6FSduxlna49qC2voHUHjxxLjj1jRuRotQQpPmOXUrDjEaX9KKNCn+wwZvTUBt0pCPAPCPZR7fHhfTWRT3i1jPWqKsRnb5ebV2Q7ywe2J4j+H9Q3hEc/UssTC X-Forefront-PRVS: 01283822F8 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BN6PR02MB2867;23:ETB9S5N/ck1tp+BBfXWjqcMqhNTxrQjQU8rRM?= =?Windows-1252?Q?5NM+SqwhzeB/hUV+JnPe7G+60lveNs13hWwtTZijUk0TIvKP0qX0WuJW?= =?Windows-1252?Q?2eIo942uPOOf0XHa+aNyZH5h6gkRFlRJPb6rLQOApWYru3jh5tDrMkc5?= =?Windows-1252?Q?siq2wmB3Gtg12GsjmtCyhKIEFR6y4xTcw6aY5W/viw2+unwVgaX2VN5v?= =?Windows-1252?Q?efoSXehdH9x6cBnc2fur8FOas4N6t65SLFMtdUvsCfJM1nUFh9nL6O+J?= =?Windows-1252?Q?jTuF+H95WBdfY59funSoYy6UOI+d5Dfx6gcYgh5v2bdXLZ6x2NQkYVpS?= =?Windows-1252?Q?TghaKxHbr6U5qAD12682VCV4dFGHxmZV6y7HwQmTPvnuxAJMT/XDU9gJ?= =?Windows-1252?Q?vWzXNPUsU6H+fIETjisI9pjfTvDgWHtKpOQn3jUPUizDUC4y85P9B4pj?= =?Windows-1252?Q?XupIQAJhfWJAWihkWrEzE/L4tzVKp6HIKCbG7KChPfNlY3cJep7LPCjy?= =?Windows-1252?Q?YpUzAtRddm1xCtm3iQJsRc5DGVBJfxrYmFpbQwSOA70JTZ7ppn+W3yY5?= =?Windows-1252?Q?7DKGno/4NwPREaP8D00R5A+UR+MUyVXm3mMVEEOXMyQ8THrb1EXyE1tj?= =?Windows-1252?Q?FrPUnHQdtAtZdqAXz+hZpmQvJuko/RzDVeKCtk4f1kIIMmh5vjQBRr2c?= =?Windows-1252?Q?Z3xsa7gRXk8r0xcbI3XNXmBzqwp17GmkOUxOdaTfXK4EJ3G3QEcTPCQH?= =?Windows-1252?Q?pXjtJKcbbAhrTfewU1hGtn8tY7NTcm9aYwW/REJKb1cgVLD7H/Pa2Gf3?= =?Windows-1252?Q?B928s35tVDJmcE6lzoNPkO1AjEKReRcz2DmiRl5lMpEzfWeAKK3fTOeR?= =?Windows-1252?Q?nTdOnUCOJ+8Zs5AE0vlGVIGvacB2noGqGd9L96e0B1bkdoundLJD43ld?= =?Windows-1252?Q?IcX9/jbU61e9E6T4J9Ye1hmJQ/hlKQAla4KuVRJ9kqr0upaLEYkW7xwk?= =?Windows-1252?Q?yP+34zOC57UTtdhAcaG9TkAz2OAcLY1Y8lXA2qGGSgl9l2+l3VyJY6y2?= =?Windows-1252?Q?RRHitviXO2HvT1eaV2oBXwdDOBSj4zxw9XJIhtVQyDW/Qy9I7iSyf5dO?= =?Windows-1252?Q?+5gAyPFy1qGYMLdEp8EvPuvh/cxZL63z9P1mqrH17Nol04xP+apg/z/k?= =?Windows-1252?Q?iNW73v6LYRbq4ozPu8ZBt7DOe93hZ/zwXnG3ZcvNJxsf/SwZIFFlUYga?= =?Windows-1252?Q?/ChrZEOQF6f9aqDzRwWu5ijl6wAlZr1IAWDbpVAY4SdLiPmxfnuacjmW?= =?Windows-1252?Q?/kPm55GpsAm9pUSHsZcXaRDlI0Tadm0wQ54vEjtuhEg6iAkJ6EWUNba0?= =?Windows-1252?Q?XIVG9SEbTP2cAlJIPfBXDRG5aI6e1vsuw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2867;6:wDcsUuCHIA0XqX3jLB2SiedBIjQEiTgqb8p1ekmSGn0fxu3uZN/3BJQODtof26CeE7lFzsC3BLBBcQcu9sPwDVCg4dI7qTvmyG9dcXPnl9zcUE5CzCyJM5N1zoyDljoqC01Hv+2UppW5FeYv4BrhNxryEnkZMF8tEaVm66JgKnUMcZLqt9w5EKUAOMpl8FaUKgxkHgEE+Thefl2VVgUpmvrUXniiGZ1qY0bPgX871gnRBMckl3OXaTmkcvJASM/hlH9sUqA7Sl9HNJK9jTtCFDBTOwsd6s8ge9JRdWWRI1jfsO8znzo5Hv1ueP5/TUC1VQc0QYmkAiawB+tZqpYWURTI2L33mdjwHV9hIb1oaIc3zwpIdzmQxjn2sQdVOdDt;5:1lK5/ag00eIjFWS9IRr2BmWRVWmEbaUY53Tdgztf//qAAkNpDd2ynNRvkZBMFNzucKnhF2WNU4w1uAcAj/CqhLNImcO4X04/iYj60rnO8Kvv2PH4kFL6qwVmpePO6bqsNddkx29tYtpWdVWkk1wJEw==;24:vL2+nQoOHkhjH4GOpZmGeir/mFYMSEU+cJaLsws+qHXMRG70SWgXLDfqZzdor5nweUxKKJMnI1EEpw1d/RnhHhDXxlyQjXE6m4py/4sEN5A= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2867;7:eh0E4ehFCazgqIqqQYwc150XGIR4xDIfxkoflmcRZw7o8Gris8bye/YBW18AbzgJ7ll4uAawZoI0FxVZoFoFRRLnN2qzTl+1vA32TS+1udaG1Tmli6NabE2dyGq7YFyCNHcJGXKVijUIOp4AttsugiUX1SLcyZ+2s/8OWcMCTV+pwhr/L/+PA/eiTSs/hziVf2hTVqLCCpmebxOihlAw5YIqigIy1id3jui9/A+VwHSh4ZqiCF3N1P72nNsaWYJQWLarCKGYsKsu0bMFMAu+biYOmjFbR731sqBlt6HXNAmyTzfCVJFSaZt2VLzrNOLuBxkAqt0I3M6M2KIhYvvloq9+o327fdMbcanvRBoOLqQ= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2016 09:25:07.8888 (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: BN6PR02MB2867 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2760 Lines: 83 On 15.11.2016 17:03, Zubair Lutfullah Kakakhel wrote: > Hi, > > On 11/15/2016 12:49 PM, Michal Simek wrote: >> On 14.11.2016 13:13, Zubair Lutfullah Kakakhel wrote: >>> Add a global structure to house various variables. >>> And cleanup read/write handling by using jump label api. >>> >>> Signed-off-by: Zubair Lutfullah Kakakhel >>> > > ... > >>> @@ -138,59 +136,75 @@ static const struct irq_domain_ops >>> xintc_irq_domain_ops = { >>> static int __init xilinx_intc_of_init(struct device_node *intc, >>> struct device_node *parent) >>> { >>> - u32 nr_irq, intr_mask; >>> + u32 nr_irq; >>> int ret; >>> + struct xintc_irq_chip *irqc; >>> >>> - intc_baseaddr = of_iomap(intc, 0); >>> - BUG_ON(!intc_baseaddr); >>> + if (xintc_irqc) { >>> + pr_err("irq-xilinx: Multiple instances aren't supported\n"); >>> + return -EINVAL; >>> + } >> >> I don't agree with this. >> Pretty long time ago we were added support for multiple instances in >> xilinx private tree. >> You can look here. >> >> https://github.com/Xilinx/linux-xlnx/blob/master/drivers/irqchip/irq-xilinx-intc.c >> >> >> Not sure if this the latest way how to do it but as you can see >> we were setting up >> irq_set_handler_data(irq, intc); >> >> and then when you need that structure we were calling >> struct intc *local_intc = irq_data_get_irq_chip_data(d); >> >> And that should be it to support multiple instance of this driver. >> >> Based on 5/7 you are describing your interrupt subsystem like this. >> >> Peripherals --> xilinx_intcontroller -> mips_cpu_int controller >> If mips_cpu_int has more than one input you can connect more xilinx intc >> controllers. >> If not you still have an option to connect >> xilinx_intcontroller(up to 32 peripherals) -> xilinx_intcontroller(one >> intc + up to 31 peripherals) -> mips_cpu_int controller > > That configuration in FPGA is technically possible. Although not > done/needed in the > way we use the Xilinx Interrupt Controller IP block in MIPSfpga. > > This series takes the drivers out of arch code and makes it accessible. > Any further development on the driver would be common to all architectures. > Support for multiple instances would be a 'new feature'. > > I say this as this series keeps growing and mutating in terms of its scope > and work. fair enough - it can be added in separate patch. > > Would it be possible to ack this so that the restructure out of arch code > can move forward? I have tested the whole series on Microblaze and I can't see any problem in running it there. That's why Tested-by; Michal Simek If everything is right needs to be checked by irqchip experts. Thanks, Michal