lapic_init: Reduce LOOPS

While I'm here, instrument lapic_init with TSLOG so it shows up (or
typically not, after this change) on flamecharts.

Reviewed by:	kib
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D36186
This commit is contained in:
Colin Percival 2022-08-12 16:51:34 -07:00
parent 2c6ff1d632
commit 02ab915ae0

View File

@ -434,6 +434,8 @@ lapic_init(vm_paddr_t addr)
int i; int i;
bool arat; bool arat;
TSENTER();
/* /*
* Enable x2APIC mode if possible. Map the local APIC * Enable x2APIC mode if possible. Map the local APIC
* registers page. * registers page.
@ -531,7 +533,7 @@ lapic_init(vm_paddr_t addr)
} }
#ifdef SMP #ifdef SMP
#define LOOPS 100000 #define LOOPS 1000
/* /*
* Calibrate the busy loop waiting for IPI ack in xAPIC mode. * Calibrate the busy loop waiting for IPI ack in xAPIC mode.
* lapic_ipi_wait_mult contains the number of iterations which * lapic_ipi_wait_mult contains the number of iterations which
@ -563,6 +565,8 @@ lapic_init(vm_paddr_t addr)
} }
#undef LOOPS #undef LOOPS
#endif /* SMP */ #endif /* SMP */
TSEXIT();
} }
/* /*