Yes, we can. I didn't find existing code in pit.c to deconfigure the periodic 
interrupt. So I left the comment.

Damien

Sent from Proton Mail Android


-------- Original Message --------
On 1/3/26 10:01 pm, Samuel Thibault <[email protected]> wrote:

>  Hello,
>  
>  Damien Zammit, le sam. 28 févr. 2026 06:14:08 +0000, a ecrit:
>  > There were problems resuming the lapic timer, causing lockups on -smp 2.
>  > We used to use the PIT on cpu0 for clock interrupts and lapic timer
>  > for periodic interrupts on other cpus.  Now the PIT is only used to
>  > calibrate the lapic timer to unify the clock sources to be lapic based.
>  > Re-enable the lapic timer on all cpus for clock sources of periodic intrs.
>  
>  Ok, why not, that can simplify things, so applied. But
>  
>  > @@ -631,11 +636,15 @@ void
>  >  startrtclock(void)
>  >  {
>  >  #ifdef APIC
>  > -  unmask_irq(timer_pin);
>  > -  calibrate_lapic_timer();
>  > -  if (cpu_number() != 0) {
>  > -          lapic_enable_timer();
>  > +  if (cpu_number() == 0) {
>  > +          /* cpu0 calls this before other cpus do
>  > +           * to calibrate the lapic timer once for all cpus. */
>  > +          unmask_irq(timer_pin);
>  > +          calibrate_lapic_timer();
>  > +          mask_irq(timer_pin);
>  > +          /* The PIT is no longer required past here */
>  
>  Can't we deconfigure the PIT rather than leaving it clock-tick and keep
>  the irq masked?
>  
>  Samuel
>

Reply via email to