# Processor type is not in the kernel

## Windmill

Hi, in the kernel config there isn't my processor type. The option that would be for my kernel is core2/newer xeon, but isn't this too much "generic"? Is there a way to select my processor or even compile with native option?

----------

## John R. Graham

The kernel has always included only broad architecture types like that. If you're feeling adventurous, though, see Kernel patch for additional CPU for GCC optimizations.

- John

----------

## Windmill

Thank you, could you tell me also how to apply that patch. Excuse me but I'm still a noob

----------

## John R. Graham

This is well documented elsewhere. (As you might imagine, you're not the first one to want to learn how to apply a kernel patch.) Google around and, if you have a specific question about what you find, let me know.   :Wink: 

- John

----------

## Windmill

I copied the content of the patch in a text file then applied it with patch p1 < filename but I have these errors

```
patching file arch/x86/include/asm/module.h

patching file arch/x86/Kconfig.cpu

Hunk #1 FAILED at 139.

Hunk #2 FAILED at 147.

Hunk #3 FAILED at 155.

Hunk #4 FAILED at 251.

Hunk #5 FAILED at 260.

Hunk #6 succeeded at 276 with fuzz 2.

Hunk #7 FAILED at 313.

Hunk #8 FAILED at 344.

Hunk #9 FAILED at 376.

8 out of 9 hunks FAILED -- saving rejects to file arch/x86/Kconfig.cpu.rej

patching file arch/x86/Makefile

Hunk #1 FAILED at 61.

1 out of 1 hunk FAILED -- saving rejects to file arch/x86/Makefile.rej

patching file arch/x86/Makefile_32.cpu

Hunk #1 FAILED at 23.

Hunk #2 FAILED at 32.

2 out of 2 hunks FAILED -- saving rejects to file arch/x86/Makefile_32.cpu.rej
```

----------

## emc

just:

```
cd /usr/src/linux

wget https://raw.github.com/graysky2/kernel_gcc_patch/master/enable_additional_cpu_optimizations_for_gcc.patch

patch -p1 < enable_additional_cpu_optimizations_for_gcc.patch
```

I suggest choose in kernel config:

Processor type and features -->

   Processor family -->

      Native optimizations autodetected by GCC

CONFIG_MNATIVE=Y

for best results, most of times GCC is smarter then you  :Wink: 

----------

## SirRobin2318

You should use gentoo-sources with the experimental flag, it'll patch the kernel for you.

----------

