Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
Hey Milo, On Wed, Jan 06, 2016 at 10:07:55AM +0100, Boris Brezillon wrote: > On Wed, 6 Jan 2016 16:48:23 +0900 Milo Kim wrote: > > On 01/04/2016 06:02 PM, Boris Brezillon wrote: > > > On Mon, 4 Jan 2016 13:28:24 +0900 Milo Kim wrote: > > > > > >> This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) > > >> driver. Currently, there are two AIC drivers, AIC and AIC5. > > >> Each driver consists of chip specific part (irq-atmel-aic.o or > > >> irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). > > >> But consolidated AIC driver is just one file driver which supports both > > >> IRQ chip systems. > > > > > > Sorry, but what's the real motivation behind this rework? > > > > During my driver development on Atmel boards, I just found major > > difference between two IRQ chips is how to select HW IRQ number. Other > > parts could be merged into single driver like OMAP. > > Except that this major difference is a central aspect, and if you look > at your changes, you'll see that you're introducing > 'if (aic_is_ssr_used())' statements in pretty much all irqchip > callbacks. > > As I said, I'm not against code factorization, but it's not really > one to me, because you're adding extra conditional path all over the > code to differentiate the two chips, which means those are not so > similar ... > > > Before reviewing the remaining patches, I'd like to know more about your > > > real motivations for pushing those changes? > > > > Yeap, thanks for your time. My idea is simple. > > > > "Different IRQ chip operation can be consolidated if simple data > > structure is used." > > As pointed, I don't think that's a good idea, but let's see what others > say. > Thomas, Jason, any comments? I'm with Nicolas on this one. I appreciate the effort, but it's best to discuss the proposal with at91/irqchip maintainers prior to investing so much effort. sorry, Jason. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
Hi Milo, On Wed, 6 Jan 2016 16:48:23 +0900 Milo Kim wrote: > Hi Boris, > > Thanks a lot for your comments. > > On 01/04/2016 06:02 PM, Boris Brezillon wrote: > > Hi Milo, > > > > On Mon, 4 Jan 2016 13:28:24 +0900 > > Milo Kim wrote: > > > >> This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) > >> driver. Currently, there are two AIC drivers, AIC and AIC5. > >> Each driver consists of chip specific part (irq-atmel-aic.o or > >> irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). > >> But consolidated AIC driver is just one file driver which supports both > >> IRQ chip systems. > > > > Sorry, but what's the real motivation behind this rework? > > During my driver development on Atmel boards, I just found major > difference between two IRQ chips is how to select HW IRQ number. Other > parts could be merged into single driver like OMAP. Except that this major difference is a central aspect, and if you look at your changes, you'll see that you're introducing 'if (aic_is_ssr_used())' statements in pretty much all irqchip callbacks. As I said, I'm not against code factorization, but it's not really one to me, because you're adding extra conditional path all over the code to differentiate the two chips, which means those are not so similar. Could you list the common aspects shared by those two controllers? > > > > >> > >> How to handle two IRQ chips in one driver > >> - > >>Structure aic_reg_offset is used for device configuration. > >>AIC5 IRQ chip uses SSR (Source Select Register) to select IRQ number. > >>On the other hand, AIC IRQ chip has simple register access. > >>To support both IRQ chips, aic_is_ssr_used() helper is used. > >> > >> Patches > >> --- > >>1 ~ 5: fix IRQ priority issue, clean up RTC/RTT fixup code and etc. > > > > As explained in my review, those irq fixup are essential, and cannot > > remove them. > > My apologies for this regression. I should check your log carefully. > Thanks for pointing this out. > I'm just thinking about boot code modification for this. How about > supporting RTC/RTT fixup code in at91bootstrap? Nope, because at91bootstrap is not mandatory, you can use u-boot's or barebox's SPL, or even develop your own bootstrap code. Not to mention that kexeced kernels can also experience some bugs. It should not happen if all drivers implement a ->shutdown() function disabling theie interrupt, but I'm pretty sure that's not currently the case. Anyway, we have to support existing systems, so removing those fixup is simply not an option. > > > > >>6 ~ 19: create unified IRQ chip operation with aic_reg_offset data. > > > > I started to review those patches, but honestly I don't see the point of > > this rework, since you're trying to merge drivers for 2 IPs that are > > completely different from a functional POV (except for a few tiny things > > like priority or irq type definition). > > > > Before reviewing the remaining patches, I'd like to know more about your > > real motivations for pushing those changes? > > Yeap, thanks for your time. My idea is simple. > > "Different IRQ chip operation can be consolidated if simple data > structure is used." As pointed, I don't think that's a good idea, but let's see what others say. Thomas, Jason, any comments? > > If AIC and AIC5 must be separate, then I'll try to rework > irq-atmel-common part. What would you like to rework? Could you describe in more details what's bothering you in this code? Also, you can join #at91 on IRC (freenode server) if you want to discuss that in a more interactive way. Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
Hi Milo, On Wed, 6 Jan 2016 16:48:23 +0900 Milo Kimwrote: > Hi Boris, > > Thanks a lot for your comments. > > On 01/04/2016 06:02 PM, Boris Brezillon wrote: > > Hi Milo, > > > > On Mon, 4 Jan 2016 13:28:24 +0900 > > Milo Kim wrote: > > > >> This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) > >> driver. Currently, there are two AIC drivers, AIC and AIC5. > >> Each driver consists of chip specific part (irq-atmel-aic.o or > >> irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). > >> But consolidated AIC driver is just one file driver which supports both > >> IRQ chip systems. > > > > Sorry, but what's the real motivation behind this rework? > > During my driver development on Atmel boards, I just found major > difference between two IRQ chips is how to select HW IRQ number. Other > parts could be merged into single driver like OMAP. Except that this major difference is a central aspect, and if you look at your changes, you'll see that you're introducing 'if (aic_is_ssr_used())' statements in pretty much all irqchip callbacks. As I said, I'm not against code factorization, but it's not really one to me, because you're adding extra conditional path all over the code to differentiate the two chips, which means those are not so similar. Could you list the common aspects shared by those two controllers? > > > > >> > >> How to handle two IRQ chips in one driver > >> - > >>Structure aic_reg_offset is used for device configuration. > >>AIC5 IRQ chip uses SSR (Source Select Register) to select IRQ number. > >>On the other hand, AIC IRQ chip has simple register access. > >>To support both IRQ chips, aic_is_ssr_used() helper is used. > >> > >> Patches > >> --- > >>1 ~ 5: fix IRQ priority issue, clean up RTC/RTT fixup code and etc. > > > > As explained in my review, those irq fixup are essential, and cannot > > remove them. > > My apologies for this regression. I should check your log carefully. > Thanks for pointing this out. > I'm just thinking about boot code modification for this. How about > supporting RTC/RTT fixup code in at91bootstrap? Nope, because at91bootstrap is not mandatory, you can use u-boot's or barebox's SPL, or even develop your own bootstrap code. Not to mention that kexeced kernels can also experience some bugs. It should not happen if all drivers implement a ->shutdown() function disabling theie interrupt, but I'm pretty sure that's not currently the case. Anyway, we have to support existing systems, so removing those fixup is simply not an option. > > > > >>6 ~ 19: create unified IRQ chip operation with aic_reg_offset data. > > > > I started to review those patches, but honestly I don't see the point of > > this rework, since you're trying to merge drivers for 2 IPs that are > > completely different from a functional POV (except for a few tiny things > > like priority or irq type definition). > > > > Before reviewing the remaining patches, I'd like to know more about your > > real motivations for pushing those changes? > > Yeap, thanks for your time. My idea is simple. > > "Different IRQ chip operation can be consolidated if simple data > structure is used." As pointed, I don't think that's a good idea, but let's see what others say. Thomas, Jason, any comments? > > If AIC and AIC5 must be separate, then I'll try to rework > irq-atmel-common part. What would you like to rework? Could you describe in more details what's bothering you in this code? Also, you can join #at91 on IRC (freenode server) if you want to discuss that in a more interactive way. Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
Hey Milo, On Wed, Jan 06, 2016 at 10:07:55AM +0100, Boris Brezillon wrote: > On Wed, 6 Jan 2016 16:48:23 +0900 Milo Kimwrote: > > On 01/04/2016 06:02 PM, Boris Brezillon wrote: > > > On Mon, 4 Jan 2016 13:28:24 +0900 Milo Kim wrote: > > > > > >> This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) > > >> driver. Currently, there are two AIC drivers, AIC and AIC5. > > >> Each driver consists of chip specific part (irq-atmel-aic.o or > > >> irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). > > >> But consolidated AIC driver is just one file driver which supports both > > >> IRQ chip systems. > > > > > > Sorry, but what's the real motivation behind this rework? > > > > During my driver development on Atmel boards, I just found major > > difference between two IRQ chips is how to select HW IRQ number. Other > > parts could be merged into single driver like OMAP. > > Except that this major difference is a central aspect, and if you look > at your changes, you'll see that you're introducing > 'if (aic_is_ssr_used())' statements in pretty much all irqchip > callbacks. > > As I said, I'm not against code factorization, but it's not really > one to me, because you're adding extra conditional path all over the > code to differentiate the two chips, which means those are not so > similar ... > > > Before reviewing the remaining patches, I'd like to know more about your > > > real motivations for pushing those changes? > > > > Yeap, thanks for your time. My idea is simple. > > > > "Different IRQ chip operation can be consolidated if simple data > > structure is used." > > As pointed, I don't think that's a good idea, but let's see what others > say. > Thomas, Jason, any comments? I'm with Nicolas on this one. I appreciate the effort, but it's best to discuss the proposal with at91/irqchip maintainers prior to investing so much effort. sorry, Jason. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
Hi Nicolas, On 01/04/2016 06:37 PM, Nicolas Ferre wrote: Le 04/01/2016 10:02, Boris Brezillon a écrit : Hi Milo, On Mon, 4 Jan 2016 13:28:24 +0900 Milo Kim wrote: This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) driver. Currently, there are two AIC drivers, AIC and AIC5. Each driver consists of chip specific part (irq-atmel-aic.o or irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). But consolidated AIC driver is just one file driver which supports both IRQ chip systems. Sorry, but what's the real motivation behind this rework? I was about to ask the same question. I'm really sorry that you spent so much time and effort for something that I'm absolutely against: reworking stable code that had been maturing for years and that is now nicely stable... for no obvious reason... That's fine. It's not a problem. I enjoyed the time :) I was also concerning about a regression. Let me try to rework common part then. So unless there is a very strong benefit, it's a pretty firm NACK for this series. We will certainly take some time to review the bits that can be taken further to enhance our current drivers. Sure, I totally agree. I also advice you to talk to us before starting such a big project and you'll notice that we are open to changes and have many aspect that you can work on with AT91. I'll keep in mind. Thanks for your advice. Best regards, Milo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
Hi Boris, Thanks a lot for your comments. On 01/04/2016 06:02 PM, Boris Brezillon wrote: Hi Milo, On Mon, 4 Jan 2016 13:28:24 +0900 Milo Kim wrote: This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) driver. Currently, there are two AIC drivers, AIC and AIC5. Each driver consists of chip specific part (irq-atmel-aic.o or irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). But consolidated AIC driver is just one file driver which supports both IRQ chip systems. Sorry, but what's the real motivation behind this rework? During my driver development on Atmel boards, I just found major difference between two IRQ chips is how to select HW IRQ number. Other parts could be merged into single driver like OMAP. How to handle two IRQ chips in one driver - Structure aic_reg_offset is used for device configuration. AIC5 IRQ chip uses SSR (Source Select Register) to select IRQ number. On the other hand, AIC IRQ chip has simple register access. To support both IRQ chips, aic_is_ssr_used() helper is used. Patches --- 1 ~ 5: fix IRQ priority issue, clean up RTC/RTT fixup code and etc. As explained in my review, those irq fixup are essential, and cannot remove them. My apologies for this regression. I should check your log carefully. Thanks for pointing this out. I'm just thinking about boot code modification for this. How about supporting RTC/RTT fixup code in at91bootstrap? 6 ~ 19: create unified IRQ chip operation with aic_reg_offset data. I started to review those patches, but honestly I don't see the point of this rework, since you're trying to merge drivers for 2 IPs that are completely different from a functional POV (except for a few tiny things like priority or irq type definition). Before reviewing the remaining patches, I'd like to know more about your real motivations for pushing those changes? Yeap, thanks for your time. My idea is simple. "Different IRQ chip operation can be consolidated if simple data structure is used." If AIC and AIC5 must be separate, then I'll try to rework irq-atmel-common part. Target boards - Tested with two boards. * Arietta G25 (SoC: AT91SAM9G25) * Xplained board (SoC: SAMA5D3) Number of driver files -- AIC: 3 (irq-atmel-aic.c, irq-atmel-aic-common.c and h) AIC5: 3 (irq-atmel-aic5.c, irq-atmel-aic-common.c and h) Consolidated AIC: 1 (irq-aic.c) Code size - AIC (irq-atmel-aic.o and irq-atmel-aic-common.o) text data bss dec hex filename 5137 196 4533714d9 drivers/irqchip/built-in.o AIC5 (irq-atmel-aic5.o and irq-atmel-aic-common.o) text data bss dec hex filename 5548 196 457481674 drivers/irqchip/built-in.o Consolidated AIC (irq-aic.o) text data bss dec hex filename 4841 196 8504513b5 drivers/irqchip/built-in.o Lines of code - AIC: 597 AIC5: 688 Consolidated AIC: 609 Please, redo the same thing, but after keeping the IRQ fixup stuff, and I'm pretty sure the text section of the AIC/AIC5 and the consolidated version will be much closer. Let me check it later if I could have a chance to create the 2nd patch ;) Best regards, Milo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
Hi Boris, Thanks a lot for your comments. On 01/04/2016 06:02 PM, Boris Brezillon wrote: Hi Milo, On Mon, 4 Jan 2016 13:28:24 +0900 Milo Kimwrote: This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) driver. Currently, there are two AIC drivers, AIC and AIC5. Each driver consists of chip specific part (irq-atmel-aic.o or irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). But consolidated AIC driver is just one file driver which supports both IRQ chip systems. Sorry, but what's the real motivation behind this rework? During my driver development on Atmel boards, I just found major difference between two IRQ chips is how to select HW IRQ number. Other parts could be merged into single driver like OMAP. How to handle two IRQ chips in one driver - Structure aic_reg_offset is used for device configuration. AIC5 IRQ chip uses SSR (Source Select Register) to select IRQ number. On the other hand, AIC IRQ chip has simple register access. To support both IRQ chips, aic_is_ssr_used() helper is used. Patches --- 1 ~ 5: fix IRQ priority issue, clean up RTC/RTT fixup code and etc. As explained in my review, those irq fixup are essential, and cannot remove them. My apologies for this regression. I should check your log carefully. Thanks for pointing this out. I'm just thinking about boot code modification for this. How about supporting RTC/RTT fixup code in at91bootstrap? 6 ~ 19: create unified IRQ chip operation with aic_reg_offset data. I started to review those patches, but honestly I don't see the point of this rework, since you're trying to merge drivers for 2 IPs that are completely different from a functional POV (except for a few tiny things like priority or irq type definition). Before reviewing the remaining patches, I'd like to know more about your real motivations for pushing those changes? Yeap, thanks for your time. My idea is simple. "Different IRQ chip operation can be consolidated if simple data structure is used." If AIC and AIC5 must be separate, then I'll try to rework irq-atmel-common part. Target boards - Tested with two boards. * Arietta G25 (SoC: AT91SAM9G25) * Xplained board (SoC: SAMA5D3) Number of driver files -- AIC: 3 (irq-atmel-aic.c, irq-atmel-aic-common.c and h) AIC5: 3 (irq-atmel-aic5.c, irq-atmel-aic-common.c and h) Consolidated AIC: 1 (irq-aic.c) Code size - AIC (irq-atmel-aic.o and irq-atmel-aic-common.o) text data bss dec hex filename 5137 196 4533714d9 drivers/irqchip/built-in.o AIC5 (irq-atmel-aic5.o and irq-atmel-aic-common.o) text data bss dec hex filename 5548 196 457481674 drivers/irqchip/built-in.o Consolidated AIC (irq-aic.o) text data bss dec hex filename 4841 196 8504513b5 drivers/irqchip/built-in.o Lines of code - AIC: 597 AIC5: 688 Consolidated AIC: 609 Please, redo the same thing, but after keeping the IRQ fixup stuff, and I'm pretty sure the text section of the AIC/AIC5 and the consolidated version will be much closer. Let me check it later if I could have a chance to create the 2nd patch ;) Best regards, Milo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
Hi Nicolas, On 01/04/2016 06:37 PM, Nicolas Ferre wrote: Le 04/01/2016 10:02, Boris Brezillon a écrit : Hi Milo, On Mon, 4 Jan 2016 13:28:24 +0900 Milo Kimwrote: This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) driver. Currently, there are two AIC drivers, AIC and AIC5. Each driver consists of chip specific part (irq-atmel-aic.o or irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). But consolidated AIC driver is just one file driver which supports both IRQ chip systems. Sorry, but what's the real motivation behind this rework? I was about to ask the same question. I'm really sorry that you spent so much time and effort for something that I'm absolutely against: reworking stable code that had been maturing for years and that is now nicely stable... for no obvious reason... That's fine. It's not a problem. I enjoyed the time :) I was also concerning about a regression. Let me try to rework common part then. So unless there is a very strong benefit, it's a pretty firm NACK for this series. We will certainly take some time to review the bits that can be taken further to enhance our current drivers. Sure, I totally agree. I also advice you to talk to us before starting such a big project and you'll notice that we are open to changes and have many aspect that you can work on with AT91. I'll keep in mind. Thanks for your advice. Best regards, Milo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
Le 04/01/2016 10:02, Boris Brezillon a écrit : > Hi Milo, > > On Mon, 4 Jan 2016 13:28:24 +0900 > Milo Kim wrote: > >> This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) >> driver. Currently, there are two AIC drivers, AIC and AIC5. >> Each driver consists of chip specific part (irq-atmel-aic.o or >> irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). >> But consolidated AIC driver is just one file driver which supports both >> IRQ chip systems. > > Sorry, but what's the real motivation behind this rework? I was about to ask the same question. I'm really sorry that you spent so much time and effort for something that I'm absolutely against: reworking stable code that had been maturing for years and that is now nicely stable... for no obvious reason... So unless there is a very strong benefit, it's a pretty firm NACK for this series. We will certainly take some time to review the bits that can be taken further to enhance our current drivers. I also advice you to talk to us before starting such a big project and you'll notice that we are open to changes and have many aspect that you can work on with AT91. Bye, >> How to handle two IRQ chips in one driver >> - >> Structure aic_reg_offset is used for device configuration. >> AIC5 IRQ chip uses SSR (Source Select Register) to select IRQ number. >> On the other hand, AIC IRQ chip has simple register access. >> To support both IRQ chips, aic_is_ssr_used() helper is used. >> >> Patches >> --- >> 1 ~ 5: fix IRQ priority issue, clean up RTC/RTT fixup code and etc. > > As explained in my review, those irq fixup are essential, and cannot > remove them. > >> 6 ~ 19: create unified IRQ chip operation with aic_reg_offset data. > > I started to review those patches, but honestly I don't see the point of > this rework, since you're trying to merge drivers for 2 IPs that are > completely different from a functional POV (except for a few tiny things > like priority or irq type definition). > > Before reviewing the remaining patches, I'd like to know more about your > real motivations for pushing those changes? > >> >> Target boards >> - >> Tested with two boards. >> * Arietta G25 (SoC: AT91SAM9G25) >> * Xplained board (SoC: SAMA5D3) >> >> Number of driver files >> -- >> AIC: 3 (irq-atmel-aic.c, irq-atmel-aic-common.c and h) >> AIC5: 3 (irq-atmel-aic5.c, irq-atmel-aic-common.c and h) >> Consolidated AIC: 1 (irq-aic.c) >> >> Code size >> - >> AIC (irq-atmel-aic.o and irq-atmel-aic-common.o) >> textdata bss dec hex filename >> 5137 196 4533714d9 drivers/irqchip/built-in.o >> >> AIC5 (irq-atmel-aic5.o and irq-atmel-aic-common.o) >> textdata bss dec hex filename >> 5548 196 457481674 drivers/irqchip/built-in.o >> >> Consolidated AIC (irq-aic.o) >> textdata bss dec hex filename >> 4841 196 8504513b5 drivers/irqchip/built-in.o >> >> Lines of code >> - >> AIC: 597 >> AIC5: 688 >> Consolidated AIC: 609 > > > Please, redo the same thing, but after keeping the IRQ fixup stuff, and > I'm pretty sure the text section of the AIC/AIC5 and the consolidated > version will be much closer. > > Not to mention that you're adding a bunch of if () statements in the > critical IRQ path, which is never a good think for latency concern. > > Best Regards, > > Boris > >> >> Milo Kim (19): >> irqchip: atmel-aic: fix wrong bit operation for IRQ priority >> irqchip: atmel-aic: clean up RTC interrupt code >> irqchip: atmel-aic: clean up RTT interrupt code >> irqchip: atmel-aic: replace magic numbers with named constant >> irqchip: atmel-aic: use simple constant to get number of interrupts >> per chip >> irqchip: atmel-aic: introduce register data structure >> irqchip: atmel-aic: make common IRQ domain translate function >> irqchip: atmel-aic: add common mask and unmask functions >> irqchip: atmel-aic: add common retrigger function >> irqchip: atmel-aic: add common set_type function >> irqchip: atmel-aic: add common PM IRQ chip operation >> irqchip: atmel-aic: use EOI register data in aic_reg_data >> irqchip: atmel-aic: clean up irq_chip_generic >> irqchip: atmel-aic: add common HW init function >> irqchip: atmel-aic: add common interrupt handler >> irqchip: atmel-aic: get total number of IRQs from device node >> irqchip: atmel-aic: use unified IRQ chip initialization function >> irqchip: atmel-aic: use unified AIC driver >> irqchip: atmel-aic: rename AIC driver and fix Kconfig >> >> arch/arm/mach-at91/Kconfig | 2 +- >> drivers/irqchip/Kconfig| 7 - >> drivers/irqchip/Makefile | 3 +- >> drivers/irqchip/irq-aic.c | 609 >>
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
Hi Milo, On Mon, 4 Jan 2016 13:28:24 +0900 Milo Kim wrote: > This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) > driver. Currently, there are two AIC drivers, AIC and AIC5. > Each driver consists of chip specific part (irq-atmel-aic.o or > irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). > But consolidated AIC driver is just one file driver which supports both > IRQ chip systems. Sorry, but what's the real motivation behind this rework? > > How to handle two IRQ chips in one driver > - > Structure aic_reg_offset is used for device configuration. > AIC5 IRQ chip uses SSR (Source Select Register) to select IRQ number. > On the other hand, AIC IRQ chip has simple register access. > To support both IRQ chips, aic_is_ssr_used() helper is used. > > Patches > --- > 1 ~ 5: fix IRQ priority issue, clean up RTC/RTT fixup code and etc. As explained in my review, those irq fixup are essential, and cannot remove them. > 6 ~ 19: create unified IRQ chip operation with aic_reg_offset data. I started to review those patches, but honestly I don't see the point of this rework, since you're trying to merge drivers for 2 IPs that are completely different from a functional POV (except for a few tiny things like priority or irq type definition). Before reviewing the remaining patches, I'd like to know more about your real motivations for pushing those changes? > > Target boards > - > Tested with two boards. > * Arietta G25 (SoC: AT91SAM9G25) > * Xplained board (SoC: SAMA5D3) > > Number of driver files > -- > AIC: 3 (irq-atmel-aic.c, irq-atmel-aic-common.c and h) > AIC5: 3 (irq-atmel-aic5.c, irq-atmel-aic-common.c and h) > Consolidated AIC: 1 (irq-aic.c) > > Code size > - > AIC (irq-atmel-aic.o and irq-atmel-aic-common.o) > text data bss dec hex filename > 5137 196 4533714d9 drivers/irqchip/built-in.o > > AIC5 (irq-atmel-aic5.o and irq-atmel-aic-common.o) > text data bss dec hex filename > 5548 196 457481674 drivers/irqchip/built-in.o > > Consolidated AIC (irq-aic.o) > text data bss dec hex filename > 4841 196 8504513b5 drivers/irqchip/built-in.o > > Lines of code > - > AIC: 597 > AIC5: 688 > Consolidated AIC: 609 Please, redo the same thing, but after keeping the IRQ fixup stuff, and I'm pretty sure the text section of the AIC/AIC5 and the consolidated version will be much closer. Not to mention that you're adding a bunch of if () statements in the critical IRQ path, which is never a good think for latency concern. Best Regards, Boris > > Milo Kim (19): > irqchip: atmel-aic: fix wrong bit operation for IRQ priority > irqchip: atmel-aic: clean up RTC interrupt code > irqchip: atmel-aic: clean up RTT interrupt code > irqchip: atmel-aic: replace magic numbers with named constant > irqchip: atmel-aic: use simple constant to get number of interrupts > per chip > irqchip: atmel-aic: introduce register data structure > irqchip: atmel-aic: make common IRQ domain translate function > irqchip: atmel-aic: add common mask and unmask functions > irqchip: atmel-aic: add common retrigger function > irqchip: atmel-aic: add common set_type function > irqchip: atmel-aic: add common PM IRQ chip operation > irqchip: atmel-aic: use EOI register data in aic_reg_data > irqchip: atmel-aic: clean up irq_chip_generic > irqchip: atmel-aic: add common HW init function > irqchip: atmel-aic: add common interrupt handler > irqchip: atmel-aic: get total number of IRQs from device node > irqchip: atmel-aic: use unified IRQ chip initialization function > irqchip: atmel-aic: use unified AIC driver > irqchip: atmel-aic: rename AIC driver and fix Kconfig > > arch/arm/mach-at91/Kconfig | 2 +- > drivers/irqchip/Kconfig| 7 - > drivers/irqchip/Makefile | 3 +- > drivers/irqchip/irq-aic.c | 609 > + > drivers/irqchip/irq-atmel-aic-common.c | 280 --- > drivers/irqchip/irq-atmel-aic-common.h | 41 --- > drivers/irqchip/irq-atmel-aic.c| 276 --- > drivers/irqchip/irq-atmel-aic5.c | 367 > 8 files changed, 611 insertions(+), 974 deletions(-) > create mode 100644 drivers/irqchip/irq-aic.c > delete mode 100644 drivers/irqchip/irq-atmel-aic-common.c > delete mode 100644 drivers/irqchip/irq-atmel-aic-common.h > delete mode 100644 drivers/irqchip/irq-atmel-aic.c > delete mode 100644 drivers/irqchip/irq-atmel-aic5.c > -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
Hi Milo, On Mon, 4 Jan 2016 13:28:24 +0900 Milo Kimwrote: > This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) > driver. Currently, there are two AIC drivers, AIC and AIC5. > Each driver consists of chip specific part (irq-atmel-aic.o or > irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). > But consolidated AIC driver is just one file driver which supports both > IRQ chip systems. Sorry, but what's the real motivation behind this rework? > > How to handle two IRQ chips in one driver > - > Structure aic_reg_offset is used for device configuration. > AIC5 IRQ chip uses SSR (Source Select Register) to select IRQ number. > On the other hand, AIC IRQ chip has simple register access. > To support both IRQ chips, aic_is_ssr_used() helper is used. > > Patches > --- > 1 ~ 5: fix IRQ priority issue, clean up RTC/RTT fixup code and etc. As explained in my review, those irq fixup are essential, and cannot remove them. > 6 ~ 19: create unified IRQ chip operation with aic_reg_offset data. I started to review those patches, but honestly I don't see the point of this rework, since you're trying to merge drivers for 2 IPs that are completely different from a functional POV (except for a few tiny things like priority or irq type definition). Before reviewing the remaining patches, I'd like to know more about your real motivations for pushing those changes? > > Target boards > - > Tested with two boards. > * Arietta G25 (SoC: AT91SAM9G25) > * Xplained board (SoC: SAMA5D3) > > Number of driver files > -- > AIC: 3 (irq-atmel-aic.c, irq-atmel-aic-common.c and h) > AIC5: 3 (irq-atmel-aic5.c, irq-atmel-aic-common.c and h) > Consolidated AIC: 1 (irq-aic.c) > > Code size > - > AIC (irq-atmel-aic.o and irq-atmel-aic-common.o) > text data bss dec hex filename > 5137 196 4533714d9 drivers/irqchip/built-in.o > > AIC5 (irq-atmel-aic5.o and irq-atmel-aic-common.o) > text data bss dec hex filename > 5548 196 457481674 drivers/irqchip/built-in.o > > Consolidated AIC (irq-aic.o) > text data bss dec hex filename > 4841 196 8504513b5 drivers/irqchip/built-in.o > > Lines of code > - > AIC: 597 > AIC5: 688 > Consolidated AIC: 609 Please, redo the same thing, but after keeping the IRQ fixup stuff, and I'm pretty sure the text section of the AIC/AIC5 and the consolidated version will be much closer. Not to mention that you're adding a bunch of if () statements in the critical IRQ path, which is never a good think for latency concern. Best Regards, Boris > > Milo Kim (19): > irqchip: atmel-aic: fix wrong bit operation for IRQ priority > irqchip: atmel-aic: clean up RTC interrupt code > irqchip: atmel-aic: clean up RTT interrupt code > irqchip: atmel-aic: replace magic numbers with named constant > irqchip: atmel-aic: use simple constant to get number of interrupts > per chip > irqchip: atmel-aic: introduce register data structure > irqchip: atmel-aic: make common IRQ domain translate function > irqchip: atmel-aic: add common mask and unmask functions > irqchip: atmel-aic: add common retrigger function > irqchip: atmel-aic: add common set_type function > irqchip: atmel-aic: add common PM IRQ chip operation > irqchip: atmel-aic: use EOI register data in aic_reg_data > irqchip: atmel-aic: clean up irq_chip_generic > irqchip: atmel-aic: add common HW init function > irqchip: atmel-aic: add common interrupt handler > irqchip: atmel-aic: get total number of IRQs from device node > irqchip: atmel-aic: use unified IRQ chip initialization function > irqchip: atmel-aic: use unified AIC driver > irqchip: atmel-aic: rename AIC driver and fix Kconfig > > arch/arm/mach-at91/Kconfig | 2 +- > drivers/irqchip/Kconfig| 7 - > drivers/irqchip/Makefile | 3 +- > drivers/irqchip/irq-aic.c | 609 > + > drivers/irqchip/irq-atmel-aic-common.c | 280 --- > drivers/irqchip/irq-atmel-aic-common.h | 41 --- > drivers/irqchip/irq-atmel-aic.c| 276 --- > drivers/irqchip/irq-atmel-aic5.c | 367 > 8 files changed, 611 insertions(+), 974 deletions(-) > create mode 100644 drivers/irqchip/irq-aic.c > delete mode 100644 drivers/irqchip/irq-atmel-aic-common.c > delete mode 100644 drivers/irqchip/irq-atmel-aic-common.h > delete mode 100644 drivers/irqchip/irq-atmel-aic.c > delete mode 100644 drivers/irqchip/irq-atmel-aic5.c > -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: send the line
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
Le 04/01/2016 10:02, Boris Brezillon a écrit : > Hi Milo, > > On Mon, 4 Jan 2016 13:28:24 +0900 > Milo Kimwrote: > >> This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) >> driver. Currently, there are two AIC drivers, AIC and AIC5. >> Each driver consists of chip specific part (irq-atmel-aic.o or >> irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). >> But consolidated AIC driver is just one file driver which supports both >> IRQ chip systems. > > Sorry, but what's the real motivation behind this rework? I was about to ask the same question. I'm really sorry that you spent so much time and effort for something that I'm absolutely against: reworking stable code that had been maturing for years and that is now nicely stable... for no obvious reason... So unless there is a very strong benefit, it's a pretty firm NACK for this series. We will certainly take some time to review the bits that can be taken further to enhance our current drivers. I also advice you to talk to us before starting such a big project and you'll notice that we are open to changes and have many aspect that you can work on with AT91. Bye, >> How to handle two IRQ chips in one driver >> - >> Structure aic_reg_offset is used for device configuration. >> AIC5 IRQ chip uses SSR (Source Select Register) to select IRQ number. >> On the other hand, AIC IRQ chip has simple register access. >> To support both IRQ chips, aic_is_ssr_used() helper is used. >> >> Patches >> --- >> 1 ~ 5: fix IRQ priority issue, clean up RTC/RTT fixup code and etc. > > As explained in my review, those irq fixup are essential, and cannot > remove them. > >> 6 ~ 19: create unified IRQ chip operation with aic_reg_offset data. > > I started to review those patches, but honestly I don't see the point of > this rework, since you're trying to merge drivers for 2 IPs that are > completely different from a functional POV (except for a few tiny things > like priority or irq type definition). > > Before reviewing the remaining patches, I'd like to know more about your > real motivations for pushing those changes? > >> >> Target boards >> - >> Tested with two boards. >> * Arietta G25 (SoC: AT91SAM9G25) >> * Xplained board (SoC: SAMA5D3) >> >> Number of driver files >> -- >> AIC: 3 (irq-atmel-aic.c, irq-atmel-aic-common.c and h) >> AIC5: 3 (irq-atmel-aic5.c, irq-atmel-aic-common.c and h) >> Consolidated AIC: 1 (irq-aic.c) >> >> Code size >> - >> AIC (irq-atmel-aic.o and irq-atmel-aic-common.o) >> textdata bss dec hex filename >> 5137 196 4533714d9 drivers/irqchip/built-in.o >> >> AIC5 (irq-atmel-aic5.o and irq-atmel-aic-common.o) >> textdata bss dec hex filename >> 5548 196 457481674 drivers/irqchip/built-in.o >> >> Consolidated AIC (irq-aic.o) >> textdata bss dec hex filename >> 4841 196 8504513b5 drivers/irqchip/built-in.o >> >> Lines of code >> - >> AIC: 597 >> AIC5: 688 >> Consolidated AIC: 609 > > > Please, redo the same thing, but after keeping the IRQ fixup stuff, and > I'm pretty sure the text section of the AIC/AIC5 and the consolidated > version will be much closer. > > Not to mention that you're adding a bunch of if () statements in the > critical IRQ path, which is never a good think for latency concern. > > Best Regards, > > Boris > >> >> Milo Kim (19): >> irqchip: atmel-aic: fix wrong bit operation for IRQ priority >> irqchip: atmel-aic: clean up RTC interrupt code >> irqchip: atmel-aic: clean up RTT interrupt code >> irqchip: atmel-aic: replace magic numbers with named constant >> irqchip: atmel-aic: use simple constant to get number of interrupts >> per chip >> irqchip: atmel-aic: introduce register data structure >> irqchip: atmel-aic: make common IRQ domain translate function >> irqchip: atmel-aic: add common mask and unmask functions >> irqchip: atmel-aic: add common retrigger function >> irqchip: atmel-aic: add common set_type function >> irqchip: atmel-aic: add common PM IRQ chip operation >> irqchip: atmel-aic: use EOI register data in aic_reg_data >> irqchip: atmel-aic: clean up irq_chip_generic >> irqchip: atmel-aic: add common HW init function >> irqchip: atmel-aic: add common interrupt handler >> irqchip: atmel-aic: get total number of IRQs from device node >> irqchip: atmel-aic: use unified IRQ chip initialization function >> irqchip: atmel-aic: use unified AIC driver >> irqchip: atmel-aic: rename AIC driver and fix Kconfig >> >> arch/arm/mach-at91/Kconfig | 2 +- >> drivers/irqchip/Kconfig| 7 - >> drivers/irqchip/Makefile | 3 +- >> drivers/irqchip/irq-aic.c
[PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) driver. Currently, there are two AIC drivers, AIC and AIC5. Each driver consists of chip specific part (irq-atmel-aic.o or irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). But consolidated AIC driver is just one file driver which supports both IRQ chip systems. How to handle two IRQ chips in one driver - Structure aic_reg_offset is used for device configuration. AIC5 IRQ chip uses SSR (Source Select Register) to select IRQ number. On the other hand, AIC IRQ chip has simple register access. To support both IRQ chips, aic_is_ssr_used() helper is used. Patches --- 1 ~ 5: fix IRQ priority issue, clean up RTC/RTT fixup code and etc. 6 ~ 19: create unified IRQ chip operation with aic_reg_offset data. Target boards - Tested with two boards. * Arietta G25 (SoC: AT91SAM9G25) * Xplained board (SoC: SAMA5D3) Number of driver files -- AIC: 3 (irq-atmel-aic.c, irq-atmel-aic-common.c and h) AIC5: 3 (irq-atmel-aic5.c, irq-atmel-aic-common.c and h) Consolidated AIC: 1 (irq-aic.c) Code size - AIC (irq-atmel-aic.o and irq-atmel-aic-common.o) text data bss dec hex filename 5137196 4533714d9 drivers/irqchip/built-in.o AIC5 (irq-atmel-aic5.o and irq-atmel-aic-common.o) text data bss dec hex filename 5548196 457481674 drivers/irqchip/built-in.o Consolidated AIC (irq-aic.o) text data bss dec hex filename 4841196 8504513b5 drivers/irqchip/built-in.o Lines of code - AIC: 597 AIC5: 688 Consolidated AIC: 609 Milo Kim (19): irqchip: atmel-aic: fix wrong bit operation for IRQ priority irqchip: atmel-aic: clean up RTC interrupt code irqchip: atmel-aic: clean up RTT interrupt code irqchip: atmel-aic: replace magic numbers with named constant irqchip: atmel-aic: use simple constant to get number of interrupts per chip irqchip: atmel-aic: introduce register data structure irqchip: atmel-aic: make common IRQ domain translate function irqchip: atmel-aic: add common mask and unmask functions irqchip: atmel-aic: add common retrigger function irqchip: atmel-aic: add common set_type function irqchip: atmel-aic: add common PM IRQ chip operation irqchip: atmel-aic: use EOI register data in aic_reg_data irqchip: atmel-aic: clean up irq_chip_generic irqchip: atmel-aic: add common HW init function irqchip: atmel-aic: add common interrupt handler irqchip: atmel-aic: get total number of IRQs from device node irqchip: atmel-aic: use unified IRQ chip initialization function irqchip: atmel-aic: use unified AIC driver irqchip: atmel-aic: rename AIC driver and fix Kconfig arch/arm/mach-at91/Kconfig | 2 +- drivers/irqchip/Kconfig| 7 - drivers/irqchip/Makefile | 3 +- drivers/irqchip/irq-aic.c | 609 + drivers/irqchip/irq-atmel-aic-common.c | 280 --- drivers/irqchip/irq-atmel-aic-common.h | 41 --- drivers/irqchip/irq-atmel-aic.c| 276 --- drivers/irqchip/irq-atmel-aic5.c | 367 8 files changed, 611 insertions(+), 974 deletions(-) create mode 100644 drivers/irqchip/irq-aic.c delete mode 100644 drivers/irqchip/irq-atmel-aic-common.c delete mode 100644 drivers/irqchip/irq-atmel-aic-common.h delete mode 100644 drivers/irqchip/irq-atmel-aic.c delete mode 100644 drivers/irqchip/irq-atmel-aic5.c -- 2.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 00/19] irqchip: atmel-aic: make unified AIC driver
This patch-set provides unified Atmel AIC (Advanced Interrupt Controller) driver. Currently, there are two AIC drivers, AIC and AIC5. Each driver consists of chip specific part (irq-atmel-aic.o or irq-atmel-aic5.o) and shared code (irq-atmel-aic-common.o). But consolidated AIC driver is just one file driver which supports both IRQ chip systems. How to handle two IRQ chips in one driver - Structure aic_reg_offset is used for device configuration. AIC5 IRQ chip uses SSR (Source Select Register) to select IRQ number. On the other hand, AIC IRQ chip has simple register access. To support both IRQ chips, aic_is_ssr_used() helper is used. Patches --- 1 ~ 5: fix IRQ priority issue, clean up RTC/RTT fixup code and etc. 6 ~ 19: create unified IRQ chip operation with aic_reg_offset data. Target boards - Tested with two boards. * Arietta G25 (SoC: AT91SAM9G25) * Xplained board (SoC: SAMA5D3) Number of driver files -- AIC: 3 (irq-atmel-aic.c, irq-atmel-aic-common.c and h) AIC5: 3 (irq-atmel-aic5.c, irq-atmel-aic-common.c and h) Consolidated AIC: 1 (irq-aic.c) Code size - AIC (irq-atmel-aic.o and irq-atmel-aic-common.o) text data bss dec hex filename 5137196 4533714d9 drivers/irqchip/built-in.o AIC5 (irq-atmel-aic5.o and irq-atmel-aic-common.o) text data bss dec hex filename 5548196 457481674 drivers/irqchip/built-in.o Consolidated AIC (irq-aic.o) text data bss dec hex filename 4841196 8504513b5 drivers/irqchip/built-in.o Lines of code - AIC: 597 AIC5: 688 Consolidated AIC: 609 Milo Kim (19): irqchip: atmel-aic: fix wrong bit operation for IRQ priority irqchip: atmel-aic: clean up RTC interrupt code irqchip: atmel-aic: clean up RTT interrupt code irqchip: atmel-aic: replace magic numbers with named constant irqchip: atmel-aic: use simple constant to get number of interrupts per chip irqchip: atmel-aic: introduce register data structure irqchip: atmel-aic: make common IRQ domain translate function irqchip: atmel-aic: add common mask and unmask functions irqchip: atmel-aic: add common retrigger function irqchip: atmel-aic: add common set_type function irqchip: atmel-aic: add common PM IRQ chip operation irqchip: atmel-aic: use EOI register data in aic_reg_data irqchip: atmel-aic: clean up irq_chip_generic irqchip: atmel-aic: add common HW init function irqchip: atmel-aic: add common interrupt handler irqchip: atmel-aic: get total number of IRQs from device node irqchip: atmel-aic: use unified IRQ chip initialization function irqchip: atmel-aic: use unified AIC driver irqchip: atmel-aic: rename AIC driver and fix Kconfig arch/arm/mach-at91/Kconfig | 2 +- drivers/irqchip/Kconfig| 7 - drivers/irqchip/Makefile | 3 +- drivers/irqchip/irq-aic.c | 609 + drivers/irqchip/irq-atmel-aic-common.c | 280 --- drivers/irqchip/irq-atmel-aic-common.h | 41 --- drivers/irqchip/irq-atmel-aic.c| 276 --- drivers/irqchip/irq-atmel-aic5.c | 367 8 files changed, 611 insertions(+), 974 deletions(-) create mode 100644 drivers/irqchip/irq-aic.c delete mode 100644 drivers/irqchip/irq-atmel-aic-common.c delete mode 100644 drivers/irqchip/irq-atmel-aic-common.h delete mode 100644 drivers/irqchip/irq-atmel-aic.c delete mode 100644 drivers/irqchip/irq-atmel-aic5.c -- 2.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/