Browse Source

fix the rdtsc namimg

tags/v0.9.4
Alexey Zaytsev 16 years ago
parent
commit
1935439f86
4 changed files with 11 additions and 11 deletions
  1. 7
    7
      src/arch/i386/drivers/timer_rdtsc.c
  2. 1
    1
      src/arch/i386/include/bits/errfile.h
  3. 1
    1
      src/config.h
  4. 2
    2
      src/core/config.c

src/arch/i386/drivers/timer_rtdsc.c → src/arch/i386/drivers/timer_rdtsc.c View File

48
 }
48
 }
49
 static uint32_t clocks_per_second = 0;
49
 static uint32_t clocks_per_second = 0;
50
 
50
 
51
-static tick_t rtdsc_currticks(void)
51
+static tick_t rdtsc_currticks(void)
52
 {
52
 {
53
 	uint32_t clocks_high, clocks_low;
53
 	uint32_t clocks_high, clocks_low;
54
 	uint32_t currticks;
54
 	uint32_t currticks;
64
 	return currticks;
64
 	return currticks;
65
 }
65
 }
66
 
66
 
67
-static int rtdsc_ts_init(void)
67
+static int rdtsc_ts_init(void)
68
 {
68
 {
69
 
69
 
70
 	struct cpuinfo_x86 cpu_info;
70
 	struct cpuinfo_x86 cpu_info;
73
 	if (cpu_info.features & X86_FEATURE_TSC) {
73
 	if (cpu_info.features & X86_FEATURE_TSC) {
74
 		clocks_per_second = calibrate_tsc();
74
 		clocks_per_second = calibrate_tsc();
75
 		if (clocks_per_second) {
75
 		if (clocks_per_second) {
76
-			DBG("RTDSC Ticksource installed. CPU running at %ld Mhz\n",
76
+			DBG("RDTSC ticksource installed. CPU running at %ld Mhz\n",
77
 				clocks_per_second/(1000*1000));
77
 				clocks_per_second/(1000*1000));
78
 			return 0;
78
 			return 0;
79
 		}
79
 		}
80
 	}
80
 	}
81
 
81
 
82
-	DBG("RTDSC timer not available on this machine.\n");
82
+	DBG("RDTSC ticksource not available on this machine.\n");
83
 	return -ENODEV;
83
 	return -ENODEV;
84
 }
84
 }
85
 
85
 
86
-struct timer rtdsc_ts __timer (01) = {
87
-	.init = rtdsc_ts_init,
86
+struct timer rdtsc_ts __timer (01) = {
87
+	.init = rdtsc_ts_init,
88
 	.udelay = generic_currticks_udelay,
88
 	.udelay = generic_currticks_udelay,
89
-	.currticks = rtdsc_currticks,
89
+	.currticks = rdtsc_currticks,
90
 };
90
 };
91
 
91
 

+ 1
- 1
src/arch/i386/include/bits/errfile.h View File

26
 #define ERRFILE_undionly	 ( ERRFILE_ARCH | ERRFILE_NET | 0x00030000 )
26
 #define ERRFILE_undionly	 ( ERRFILE_ARCH | ERRFILE_NET | 0x00030000 )
27
 #define ERRFILE_undirom		 ( ERRFILE_ARCH | ERRFILE_NET | 0x00040000 )
27
 #define ERRFILE_undirom		 ( ERRFILE_ARCH | ERRFILE_NET | 0x00040000 )
28
 
28
 
29
-#define ERRFILE_timer_rtdsc    ( ERRFILE_ARCH | ERRFILE_DRIVER | 0x00000000 )
29
+#define ERRFILE_timer_rdtsc    ( ERRFILE_ARCH | ERRFILE_DRIVER | 0x00000000 )
30
 #define ERRFILE_timer_bios     ( ERRFILE_ARCH | ERRFILE_DRIVER | 0x00010000 )
30
 #define ERRFILE_timer_bios     ( ERRFILE_ARCH | ERRFILE_DRIVER | 0x00010000 )
31
 
31
 
32
 /** @} */
32
 /** @} */

+ 1
- 1
src/config.h View File

24
 #undef	CONSOLE_PC_KBD		/* Direct access to PC keyboard */
24
 #undef	CONSOLE_PC_KBD		/* Direct access to PC keyboard */
25
 
25
 
26
 #define TIMER_BIOS
26
 #define TIMER_BIOS
27
-#define TIMER_RTDSC
27
+#define TIMER_RDTSC
28
 
28
 
29
 /* @END general.h */
29
 /* @END general.h */
30
 
30
 

+ 2
- 2
src/core/config.c View File

82
 REQUIRE_OBJECT ( timer_bios );
82
 REQUIRE_OBJECT ( timer_bios );
83
 #endif
83
 #endif
84
 
84
 
85
-#ifdef TIMER_RTDSC
86
-REQUIRE_OBJECT ( timer_rtdsc );
85
+#ifdef TIMER_RDTSC
86
+REQUIRE_OBJECT ( timer_rdtsc );
87
 #endif
87
 #endif
88
 /*
88
 /*
89
  * Drag in all requested protocols
89
  * Drag in all requested protocols

Loading…
Cancel
Save