git: 02ab915ae014 - main - lapic_init: Reduce LOOPS
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 13 Aug 2022 22:28:41 UTC
The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=02ab915ae014a07da8243120d231919eb5633c95 commit 02ab915ae014a07da8243120d231919eb5633c95 Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2022-08-12 23:51:34 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2022-08-13 22:28:09 +0000 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 --- sys/x86/x86/local_apic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index ec4f821f99ed..42a5a9fd4c8c 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -434,6 +434,8 @@ lapic_init(vm_paddr_t addr) int i; bool arat; + TSENTER(); + /* * Enable x2APIC mode if possible. Map the local APIC * registers page. @@ -531,7 +533,7 @@ lapic_init(vm_paddr_t addr) } #ifdef SMP -#define LOOPS 100000 +#define LOOPS 1000 /* * Calibrate the busy loop waiting for IPI ack in xAPIC mode. * lapic_ipi_wait_mult contains the number of iterations which @@ -563,6 +565,8 @@ lapic_init(vm_paddr_t addr) } #undef LOOPS #endif /* SMP */ + + TSEXIT(); } /*