Re: [PATCH v6 15/29] x86/hpet: Add helper function hpet_set_comparator_periodic()

From
Ricardo Neri <hidden>
Date
2022-05-17 22:51:16
Also in
linux-iommu, lkml
Reply to
Thomas Gleixner, 2022-05-14
On Sat, May 14, 2022 at 10:17:38AM +0200, Thomas Gleixner wrote:
On Fri, May 13 2022 at 14:19, Ricardo Neri wrote:
quoted
On Fri, May 06, 2022 at 11:41:13PM +0200, Thomas Gleixner wrote:
quoted
The argument about not bloating the code
with an "obvious???" function which is quite small is slightly beyond my
comprehension level.
That obvious function would look like this:

void hpet_set_comparator_one_shot(int channel, u32 delta)
{
	u32 count;

	count = hpet_readl(HPET_COUNTER);
	count += delta;
	hpet_writel(count, HPET_Tn_CMP(channel));
}
This function only works reliably when the delta is large. See
hpet_clkevt_set_next_event().
That is a good point. One more reason to not have a
hpet_set_comparator_one_shot(), IMO.

Thanks and BR,
Ricardo
Thread (69 messages) 69 messages, 3 authors, last reply 2022-05-20
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help