Re: [PATCH 04/20] clocksource/drivers/vf_pit: Rework the base address usage

From: Ghennadi Procopciuc
Date: Fri Jul 25 2025 - 01:11:14 EST


On 7/24/2025 8:29 PM, Daniel Lezcano wrote:
> On 07/07/2025 14:03, Ghennadi Procopciuc wrote:
>> On 7/5/2025 7:01 PM, Daniel Lezcano wrote:
>> [...]
>>
>>> -static int __init pit_clockevent_init(struct pit_timer *pit, unsigned long rate, int irq)
>>> +static int __init pit_clockevent_init(struct pit_timer *pit, void __iomem *base,
>>> +                      unsigned long rate, int irq)
>>>   {
>>> +    /*
>>> +     * PIT0 and PIT1 can be chained to build a 64-bit timer, so
>>> +     * choose PIT3 as clockevent and leave PIT0 and PIT1 unused
>>> +     * for anyone else who needs them.
>>> +     */
>>> +    pit->clkevt_base = base + PIT_CH(3);
>>> +
>>
>> This description is somewhat misleading, as it refers to PIT instances, whereas the code actually operates on PIT channels 0 and 1.
>>
> Actually it is what we have already in the driver, it is just moved around. I'll take the opportunity to change the content if it matters. What about:
>
> "The channels 0 and 1 can be chained to build a 64-bit timer. Let's use the channel 3 as a clockevent and leave the channels 0 and 1 unused for anyone else who needs them."
>
> ?

Sounds more accurate. Thx.

--
Regards,
Ghennadi