On 25 February 2011 14:50, Dmitry Eremin-Solenikov <dbarysh...@gmail.com> wrote: > On 2/25/11, andrzej zaborowski <balr...@gmail.com> wrote: >> Hi Dmitry, >> >> On 20 February 2011 14:50, Dmitry Eremin-Solenikov <dbarysh...@gmail.com> >> wrote: >>> Use qdev/sysbus framework to handle pxa2xx-pic. Instead of exposing IRQs >>> via array, reference them via qdev_get_gpio_in(). Also pxa2xx_pic >>> duplicated >>> some code from arm-pic. Drop it, replacing with references to arm-pic, >>> as all other ARM SoCs do for their PIC code. >> >> As I said earlier not using arm-pic was deliberate (and I also asked >> what the gain was from converting the pic to a separate sysbus device >> from the CPU) so I skipped this part of the patch and pushed the rest >> of it, please check that everything works. > > The primary goal was using arm-pic IRQs in pxa2xx-gpio and not having to > mess with passing CPUEnv around. Moreover all other ARM SoCs use > arm-pic w/o any references to performance gains/loses. > > I can still provide a patch that will use arm-pic only for > pxa2xx-gpio, will that > be suitable for you?
Well my take on it is that it adds an additional level indirection. More levels of indirection / abstraction are only good if they enable some new feature or make a big difference in the code and it's not the case here. Otherwise they make bloat and more levels of function calls which add up to small overheads. And I don't see using CPUEnv as a hack anyway. I pushed the remaining patches with small adjustments. Cheers