Remove unused or not needed stuff from arch/x86/time.c.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
arch/x86/time.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/arch/x86/time.c b/arch/x86/time.c
index a473a9e1..7fd7abef 100644
--- a/arch/x86/time.c
+++ b/arch/x86/time.c
@@ -48,7 +48,6 @@ struct shadow_time_info {
uint64_t tsc_timestamp; /* TSC at last update of time vals. */
uint64_t system_timestamp; /* Time, in nanosecs, since boot. */
uint32_t tsc_to_nsec_mul;
- uint32_t tsc_to_usec_mul;
int tsc_shift;
uint32_t version;
};
@@ -57,19 +56,6 @@ static uint32_t shadow_ts_version;
static struct shadow_time_info shadow;
-#ifndef rmb
-#define rmb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory")
-#endif
-
-#define HANDLE_USEC_OVERFLOW(_tv) \
- do { \
- while ( (_tv)->tv_usec >= 1000000 ) \
- { \
- (_tv)->tv_usec -= 1000000; \
- (_tv)->tv_sec++; \
- } \
- } while ( 0 )
-
static inline int time_values_up_to_date(void)
{
struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_info[0].time;
@@ -143,8 +129,6 @@ static void get_time_values_from_xen(void)
shadow.tsc_shift = src->tsc_shift;
rmb();
} while ( (src->version & 1) | (shadow.version ^ src->version) );
-
- shadow.tsc_to_usec_mul = shadow.tsc_to_nsec_mul / 1000;
}
/*
--
2.43.0
Juergen Gross, le lun. 22 juil. 2024 14:16:42 +0200, a ecrit: > Remove unused or not needed stuff from arch/x86/time.c. > > Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > --- > arch/x86/time.c | 16 ---------------- > 1 file changed, 16 deletions(-) > > diff --git a/arch/x86/time.c b/arch/x86/time.c > index a473a9e1..7fd7abef 100644 > --- a/arch/x86/time.c > +++ b/arch/x86/time.c > @@ -48,7 +48,6 @@ struct shadow_time_info { > uint64_t tsc_timestamp; /* TSC at last update of time vals. */ > uint64_t system_timestamp; /* Time, in nanosecs, since boot. */ > uint32_t tsc_to_nsec_mul; > - uint32_t tsc_to_usec_mul; > int tsc_shift; > uint32_t version; > }; > @@ -57,19 +56,6 @@ static uint32_t shadow_ts_version; > > static struct shadow_time_info shadow; > > -#ifndef rmb > -#define rmb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory") > -#endif > - > -#define HANDLE_USEC_OVERFLOW(_tv) \ > - do { \ > - while ( (_tv)->tv_usec >= 1000000 ) \ > - { \ > - (_tv)->tv_usec -= 1000000; \ > - (_tv)->tv_sec++; \ > - } \ > - } while ( 0 ) > - > static inline int time_values_up_to_date(void) > { > struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_info[0].time; > @@ -143,8 +129,6 @@ static void get_time_values_from_xen(void) > shadow.tsc_shift = src->tsc_shift; > rmb(); > } while ( (src->version & 1) | (shadow.version ^ src->version) ); > - > - shadow.tsc_to_usec_mul = shadow.tsc_to_nsec_mul / 1000; > } > > /* > -- > 2.43.0 > -- Samuel "I don't know why, but first C programs tend to look a lot worse than first programs in any other language (maybe except for fortran, but then I suspect all fortran programs look like `firsts')" (By Olaf Kirch)
© 2016 - 2024 Red Hat, Inc.