Re: [RFC 03/11] hte: Add tegra194 HTE kernel provider

From: Dipen Patel
Date: Sat Aug 07 2021 - 01:38:55 EST



On 8/6/21 10:35 PM, Dipen Patel wrote:
> On 8/6/21 9:51 PM, Kent Gibson wrote:
>> On Fri, Aug 06, 2021 at 09:52:54PM -0700, Dipen Patel wrote:
>>> On 8/6/21 8:07 PM, Kent Gibson wrote:
>>>> On Fri, Aug 06, 2021 at 07:41:09PM -0700, Dipen Patel wrote:
>>>>> On 7/31/21 8:43 AM, Kent Gibson wrote:
>>>>>> On Wed, Jul 28, 2021 at 04:59:08PM -0700, Dipen Patel wrote:
>>>>>>> Thanks Kent for the review comment. My responses inline.
>>>>>>>
>> <snip>
>>
>>>>> 2. Does hte handler solution create race between two handlers? i.e. edge_irq_handler and
>>>>>
>>>>> hte_handler, for the worst case scenario as below?
>>>>>
>>>> No. If hardware timestamp is selected then no irq is requested from the
>>>> irq subsystem for that line - only from the hte subsystem instead.
>>>> So there will be no edge_irq_handler call for that line, so no possible race.
>>> That is not possible for certain providers, for example the one I am dealing
>>>
>>> with which requires GPIO line to be requested as input and IRQ needs to
>>>
>>> be enabled on them.
>>>
>> So, for your hte subsystem to work, the consumer has to also request
>> a line from the irq subsystem?
> Yes
>
>> That makes sense to you?
> Its not me, its peculiarity of the hardware that I am dealing with.
>> Have hte do that, rather than the consumer.
> Sure, for cdev it would mean to duplicate (most of) the edge* or line_create
>
> code in HTE.

Ignore code duplicate comment, shouldn't be big deal.


> For such hardware, my initial doubt remains the same about
>
> the worst case scenario between two handlers, but perhaps that's
>
> implementation details for hte to handle.
>
>> And another reason it makes sense to integrate this with irq...
> Alright, will explore this route as well. I remember both Thierry[1] and
>
> Marc[2] raised some doubts (time to revive that discussion).
>
>
> [1]: https://lore.kernel.org/lkml/YFm9r%2FtFkzVlYDEp@xxxxxxxxxxxxxxx/
>
> [2]: https://lore.kernel.org/lkml/87h7l1k9yi.wl-maz@xxxxxxxxxx/
>
>> Cheers,
>> Kent.