]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-boot: don't export ticks_read() and ticks_freq()
authorLennart Poettering <lennart@poettering.net>
Tue, 8 Feb 2022 10:25:07 +0000 (11:25 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 8 Feb 2022 12:46:17 +0000 (13:46 +0100)
They only have a single user in time_usec(), hence don't expose them.

src/boot/efi/ticks.c
src/boot/efi/ticks.h

index fd0e2b234840d787d663e680db6e531831538b0e..ec6a6fd13eda27fc7e9604c6f22c9fce19ba433e 100644 (file)
@@ -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();
index 389c7051b1f93c3f70c294154d3b0018d1fea401..ba259a6cc93b4078f6271c88cf4155d80b9b32fc 100644 (file)
@@ -4,6 +4,4 @@
 #include <efi.h>
 #include <efilib.h>
 
-UINT64 ticks_read(void);
-UINT64 ticks_freq(void);
 UINT64 time_usec(void);