From: Lennart Poettering Date: Tue, 8 Feb 2022 10:25:07 +0000 (+0100) Subject: sd-boot: don't export ticks_read() and ticks_freq() X-Git-Tag: v251-rc1~326^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=efbb86797df10ac72fe5ae29afc856d94700e2da;p=thirdparty%2Fsystemd.git sd-boot: don't export ticks_read() and ticks_freq() They only have a single user in time_usec(), hence don't expose them. --- diff --git a/src/boot/efi/ticks.c b/src/boot/efi/ticks.c index fd0e2b23484..ec6a6fd13ed 100644 --- a/src/boot/efi/ticks.c +++ b/src/boot/efi/ticks.c @@ -6,39 +6,39 @@ #include "ticks.h" #ifdef __x86_64__ -UINT64 ticks_read(void) { +static UINT64 ticks_read(void) { UINT64 a, d; __asm__ volatile ("rdtsc" : "=a" (a), "=d" (d)); return (d << 32) | a; } #elif defined(__i386__) -UINT64 ticks_read(void) { +static UINT64 ticks_read(void) { UINT64 val; __asm__ volatile ("rdtsc" : "=A" (val)); return val; } #elif defined(__aarch64__) -UINT64 ticks_read(void) { +static UINT64 ticks_read(void) { UINT64 val; __asm__ volatile ("mrs %0, cntpct_el0" : "=r" (val)); return val; } #else -UINT64 ticks_read(void) { +static UINT64 ticks_read(void) { UINT64 val = 1; return val; } #endif #if defined(__aarch64__) -UINT64 ticks_freq(void) { +static UINT64 ticks_freq(void) { UINT64 freq; __asm__ volatile ("mrs %0, cntfrq_el0": "=r" (freq)); return freq; } #else /* count TSC ticks during a millisecond delay */ -UINT64 ticks_freq(void) { +static UINT64 ticks_freq(void) { UINT64 ticks_start, ticks_end; ticks_start = ticks_read(); diff --git a/src/boot/efi/ticks.h b/src/boot/efi/ticks.h index 389c7051b1f..ba259a6cc93 100644 --- a/src/boot/efi/ticks.h +++ b/src/boot/efi/ticks.h @@ -4,6 +4,4 @@ #include #include -UINT64 ticks_read(void); -UINT64 ticks_freq(void); UINT64 time_usec(void);