- Fixed bug that had been introduced with the previous commit

This commit is contained in:
Philipp Kupferschmied 2008-08-05 14:02:31 +02:00
parent 30132e9248
commit ffe30a6506
1 changed files with 19 additions and 14 deletions

View File

@ -115,24 +115,29 @@ INLINE tracebuffer_t * get_tracebuffer (void)
/*
* Access to performance monitoring counters
*/
# if defined(CONFIG_TBUF_PERFMON)
# if defined(CONFIG_CPU_X86_I686) || defined(CONFIG_CPU_X86_K8)
# define TBUF_PMC_SEL_0 " xor %1, %1 \n"
# define TBUF_PMC_SEL_1 " mov $1, %1 \n"
# elif defined(CONFIG_CPU_X86_P4)
/* PMC_MSR_IQ_COUNTER 0 and 2 */
# define TBUF_PMC_SEL_0 " mov $12, %1 \n"
# define TBUF_PMC_SEL_1 " add $ 2, %1 \n"
# else
# define TBUF_PMC_SEL_0
# define TBUF_PMC_SEL_1
# endif
# else
# define TBUF_PMC_SEL_0
# define TBUF_PMC_SEL_1
# define TBUF_RDPMC_0
# define TBUF_RDPMC_1
#if defined(CONFIG_TBUF_PERFMON)
# if defined(CONFIG_CPU_X86_I686) || defined(CONFIG_CPU_X86_K8)
# define TBUF_PMC_SEL_0 " xor %1, %1 \n"
# define TBUF_PMC_SEL_1 " mov $1, %1 \n"
# elif defined(CONFIG_CPU_X86_P4)
/* PMC_MSR_IQ_COUNTER 0 and 2 */
# define TBUF_PMC_SEL_0 " mov $12, %1 \n"
# define TBUF_PMC_SEL_1 " add $ 2, %1 \n"
# endif
#endif /* defined(CONFIG_TBUF_PERFMON) */
# endif /* defined(CONFIG_TBUF_PERFMON) */
/*
@ -181,7 +186,7 @@ INLINE tracebuffer_t * get_tracebuffer (void)
" shl $16, %%edx \n" \
" lea __idle_tcb, %3 \n" \
" movw "MKSTR(OFS_TCB_CPU)"(%3), %%dx \n" \
" movl %%edx, %%fs:1*%c9(%0) \n" \
" movl %%edx, %%fs:1*%c9(%0) \n" \
TBUF_PMC_SEL_0 \
TBUF_RDPMC_0 \
TBUF_PMC_SEL_1 \