Permalink
Browse files

tsc_read() renamed tsc_read_ns() to avoid misunderstandings.

Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  • Loading branch information...
claudioscordino authored and jan-kiszka committed Oct 9, 2018
1 parent e20fe89 commit 6f119f396d1bbe87c8ccccd66e8fd4c0669f53b5
Showing with 5 additions and 5 deletions.
  1. +3 −3 inmates/demos/x86/apic-demo.c
  2. +1 −1 inmates/lib/x86/include/inmate.h
  3. +1 −1 inmates/lib/x86/timing.c
@@ -55,7 +55,7 @@ static void irq_handler(void)
unsigned long delta;
u32 smis;

delta = tsc_read() - expected_time;
delta = tsc_read_ns() - expected_time;
if (delta < min)
min = delta;
if (delta > max)
@@ -70,7 +70,7 @@ static void irq_handler(void)
printk("\n");

expected_time += 100 * NS_PER_MSEC;
apic_timer_set(expected_time - tsc_read());
apic_timer_set(expected_time - tsc_read_ns());
}

static void init_apic(void)
@@ -83,7 +83,7 @@ static void init_apic(void)
apic_freq_khz = apic_timer_init(APIC_TIMER_VECTOR);
printk("Calibrated APIC frequency: %lu kHz\n", apic_freq_khz);

expected_time = tsc_read() + NS_PER_MSEC;
expected_time = tsc_read_ns() + NS_PER_MSEC;
apic_timer_set(NS_PER_MSEC);

asm volatile("sti");
@@ -239,7 +239,7 @@ void hypercall_init(void);

unsigned long pm_timer_read(void);

unsigned long tsc_read(void);
unsigned long tsc_read_ns(void);
unsigned long tsc_init(void);

void delay_us(unsigned long microsecs);
@@ -72,7 +72,7 @@ static u64 rdtsc(void)
#endif
}

unsigned long tsc_read(void)
unsigned long tsc_read_ns(void)
{
unsigned int cpu = cpu_id();
unsigned long tmr;

0 comments on commit 6f119f3

Please sign in to comment.