Even the get_cycles case is easily fixed up during runtime.
Currently, when get_cycles is used only once in the kernel, it can be done
e.g. with:
static inline cycles_t get_cycles (void)
{
unsigned long eax, edx;
__asm__(".global patch_rdtsc; patch_rdtsc: rdtsc":"=a" (eax), "=d" (edx));
return eax;
}
...
static void have_no_tsc(void)
{
extern unsigned char patch_rdtsc[];
/* Alans hacks as above go here... */
patch_rdtsc[0] = 0x31; patch_rdtsc[1] = 0xc0; /* xorl %eax,%eax */
}
but btfixup is able to do such games more generically.
I've it almost done for the PAGE_OFFSET case, just need to give it some
testing.
Generally, I think it is much better to have as few kernels as possible.
And currently, if one compiles CONFIG_I386 (shouldn't it be
named Generic instead of i386?), it won't use rdtsc eventhough your machine
has it. So poor distribution makers should ship at least 10 different
kernels? Bleech.
Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
UltraLinux | http://ultra.linux.cz/ | http://ultra.penguin.cz/
Linux version 2.1.130 on a sparc64 machine (3958.37 BogoMips)
___________________________________________________________________
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/