Changeset 134877d in mainline


Ignore:
Timestamp:
2006-12-11T17:40:10Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
319e60e
Parents:
8cd140f2
Message:

rename rdtsc() to get_cycle()

Location:
kernel
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/cpuid.h

    r8cd140f2 r134877d  
    5858extern void cpuid(uint32_t cmd, cpu_info_t *info);
    5959
    60 
    61 extern uint64_t rdtsc(void);
    62 
    6360#endif /* !def __ASM__ */
    6461#endif
  • kernel/arch/amd64/src/asm_utils.S

    r8cd140f2 r134877d  
    6363.global cpuid
    6464.global has_cpuid
    65 .global rdtsc
     65.global get_cycle
    6666.global read_efer_flag
    6767.global set_efer_flag
     
    147147        ret
    148148
    149 rdtsc:
     149get_cycle:
    150150        xorq %rax,%rax
    151151        rdtsc
  • kernel/arch/ia32/include/asm.h

    r8cd140f2 r134877d  
    229229}
    230230
    231 static inline uint64_t rdtsc(void)
    232 {
    233         uint64_t v;
    234        
    235         __asm__ volatile("rdtsc\n" : "=A" (v));
    236        
    237         return v;
    238 }
    239 
    240231/** Return current IP address */
    241232static inline uintptr_t * get_ip()
  • kernel/arch/ia32/src/drivers/i8254.c

    r8cd140f2 r134877d  
    4040#include <time/clock.h>
    4141#include <time/delay.h>
     42#include <arch/cycle.h>
    4243#include <arch/interrupt.h>
    4344#include <arch/drivers/i8259.h>
     
    138139        CPU->delay_loop_const = ((MAGIC_NUMBER*LOOPS)/1000) / ((t1-t2)-(o1-o2)) + (((MAGIC_NUMBER*LOOPS)/1000) % ((t1-t2)-(o1-o2)) ? 1 : 0);
    139140
    140         clk1 = rdtsc();
    141         delay(1<<SHIFT);
    142         clk2 = rdtsc();
     141        clk1 = get_cycle();
     142        delay(1 << SHIFT);
     143        clk2 = get_cycle();
    143144       
    144         CPU->frequency_mhz = (clk2-clk1)>>SHIFT;
     145        CPU->frequency_mhz = (clk2 - clk1) >> SHIFT;
    145146
    146147        return;
  • kernel/arch/ia32xen/include/asm.h

    r8cd140f2 r134877d  
    219219}
    220220
    221 static inline uint64_t rdtsc(void)
    222 {
    223         uint64_t v;
    224        
    225         __asm__ volatile("rdtsc\n" : "=A" (v));
    226        
    227         return v;
    228 }
    229 
    230221/** Return current IP address */
    231222static inline uintptr_t * get_ip()
  • kernel/kernel.config

    r8cd140f2 r134877d  
    147147
    148148# Benchmark test
    149 ! [CONFIG_TEST!=] CONFIG_BENCH (y/n)
     149! [CONFIG_TEST!=] CONFIG_BENCH (n/y)
Note: See TracChangeset for help on using the changeset viewer.