lkml.org 
[lkml]   [2023]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v3 2/2] Add GPIO support for Realtek DHC(Digital Home Center) RTD SoCs.
Date
Hi Andy,

>> >> >> + if (irq == data->irqs[0])
>> >> >> + get_reg_offset = &rtd_gpio_gpa_offset;
>> >> >> + else if (irq == data->irqs[1])
>> >> >> + get_reg_offset = &rtd_gpio_gpda_offset;
>> >> >
>> >> >Can't it be done before entering into chained IRQ handler?
>> >>
>> >> I will revise it.
>> >
>> >Thinking about this more, perhaps you can register two IRQ chips with
>> >different functions, so this won't be part of the very critical
>> >interrupt handler (as we all want to reduce overhead in it as much as
>possible).
>> >Anyway, think about this and try different options, choose the one
>> >you think the best.
>>
>> In the previous patch (v1), I had registered two IRQ chips with
>> different handlers. However, these two handlers appeared quite similar
>> and the gpio_irq_chip only allows the registration of a single
>> handler. Therefore, I ended up registering one handler for both IRQs
>> and included conditional checks within the handler to differentiate between
>the two.
>
>What is the performance impact that you have that condition in the interrupt
>handler?
>

I believe the performance impact is minimal since this conditional check is
a simple operation aimed at retrieving the corresponding offset of the
interrupt status registers.
Or is there something I might not have considered?

Thanks,
Tzuyi Chang

\
 
 \ /
  Last update: 2023-12-15 04:31    [W:0.116 / U:1.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site