Skip to content

Commit

Permalink
[PATCH] x86-64: Use -mtune=generic for generic kernels
Browse files Browse the repository at this point in the history
The upcomming gcc 4.2 got a new option -mtune=generic to tune
code for both common AMD and Intel CPUs. Use this option
when available for generic kernels.

On x86-64 it is used with CONFIG_GENERIC_CPU. On i386 it is
enabled with CONFIG_X86_GENERIC.  It won't affect the base
line CPU support in any ways and also not the minimum supported CPU.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Mar 25, 2006
1 parent c7ea1a9 commit dca99a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/i386/Makefile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ cflags-$(CONFIG_X86_ELAN) += -march=i486
# Geode GX1 support
cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx

# add at the end to overwrite eventual tuning options from earlier
# cpu entries
cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic)

1 change: 1 addition & 0 deletions arch/x86_64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ CHECKFLAGS += -D__x86_64__ -m64

cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
CFLAGS += $(cflags-y)

CFLAGS += -m64
Expand Down

0 comments on commit dca99a3

Please sign in to comment.