Re: RFC: [2.6 patch] better i386 CPU selection

From: Adrian Bunk
Date: Sat Sep 13 2003 - 16:54:01 EST


On Sat, Sep 13, 2003 at 07:35:29PM +0100, Dave Jones wrote:
> On Sat, Sep 13, 2003 at 08:22:12PM +0200, Adrian Bunk wrote:
>
> > What does a user think on which machines a kernel will run after he
> > enabled the following options?
> > - "Athlon/Duron/K7"
> > - "Generic x86 support"
>
> Currently, as you can only choose one of them, it should be obvious.
> With your 'you can choose n number of options' patch, it becomes
> confusing why there is a generic option at all.

No, currently you first choose the CPU. This CPU selection selects most
settings like the CPU features (e.g. enables X86_F00F_BUG) and the gcc
optimization flags.

The "Generic x86 support" question is asked later.

My patch removes the generic option since it's no longer needed.

>...
> > > Incidentally, looking closer you broke this option.
> > >
> > > +ifdef CONFIG_CPU_VIAC3_2
> > > + cpuflags-y := $(call check_gcc,-march=c3,-march=i686)
> > > +endif
> > >
> > > Its C3_2 becauase it needs -march=c3-2 to use SSE instead of 3dnow
> > > prefetches. One thing that just occured to me, it may be possible
> > >...
> >
> > Which gcc does support -march=c3-2 ? gcc 3.3.1 doesn't support it.
>
> the 3.3.2 and 3.4 branches have it.

Ah I didn't know that. The 20030831 snapshot of the 3.3 branch in Debian
unstable was the latest gcc I checked.

> > > And "You can select 486/586/686 too" is not an answer. These kernels
> > > need to be small, and errata workarounds should NEVER be compiled out
> > > for exactly this reason.
> > >...
> > Why is a kernel compiled with support for all CPUs necessarily much
> > bigger than a current M386 kernel?
>
> Adding in stuff like cpu specific memory copy routines for example.
> There have been several cases where vendors haven't been able to squeeze a
> boot kernel onto a CD by 40 or so bytes in the past, leading to a last
> minute scavenge to try and reclaim that space. Every little helps.
>
> > OTOH, why waste space on a 486 for 3DNow! support?
>
> I'm arguing for errata workarounds, not extended support.

I'll send the cpu selection patch with the arch/i386/kernel/cpu/ and
arch/i386/kernel/cpu/mtrr/ stuff as separate patches.

> Dave

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

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