Re: [PATCH][2.5] notsc option needs some attention/TLC

From: Mikael Pettersson (mikpe@csd.uu.se)
Date: Sat Nov 09 2002 - 07:00:10 EST


Zwane Mwaikambo writes:
> notsc doesn't work on a box with a TSC, when we need need the option the
> most...
>
> Index: linux-2.5.46-bochs/arch/i386/kernel/cpu/common.c
> ===================================================================
> RCS file: /build/cvsroot/linux-2.5.46/arch/i386/kernel/cpu/common.c,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 common.c
> --- linux-2.5.46-bochs/arch/i386/kernel/cpu/common.c 5 Nov 2002 01:47:31 -0000 1.1.1.1
> +++ linux-2.5.46-bochs/arch/i386/kernel/cpu/common.c 9 Nov 2002 03:10:45 -0000
> @@ -12,6 +12,11 @@
>
> static int cachesize_override __initdata = -1;
> static int disable_x86_fxsr __initdata = 0;
> +#ifdef CONFIG_X86_TSC
> +static int tsc_disable __initdata = 0;
> +#else
> +#define tsc_disable 1
> +#endif

CONFIG_X86_TSC means "I have a TSC, period" not "I may have a TSC".
It's an optimisation option, not a "try this" option.

If we configure for "I have a TSC, period" you add the option
to disable it, which nullifies any benefit of the config option
in the first place since we can't assume TSC presence any more.
If we don't configure for TSC, you force tsc_disable, which means
that a generic kernel _can't_ use the TSC.

People with broken TSCs need to run non-TSC-assuming kernels.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 15 2002 - 22:00:17 EST