Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c55d92d1 authored by Andi Kleen's avatar Andi Kleen Committed by Andi Kleen
Browse files

[PATCH] i386: Add support for compilation for Core2



gcc doesn't support -mtune=core2 yet, but will be soon. Use -mtune=generic or -mtune=i686
as fallback

TBD need benchmarking for INTEL_USERCOPY etc. So far I used the same defaults as MPENTIUMM

Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 71381998
Loading
Loading
Loading
Loading
+13 −6
Original line number Original line Diff line number Diff line
@@ -103,8 +103,15 @@ config MPENTIUMM
	  Select this for Intel Pentium M (not Pentium-4 M)
	  Select this for Intel Pentium M (not Pentium-4 M)
	  notebook chips.
	  notebook chips.


config MCORE2
	bool "Core 2/newer Xeon"
	help
	  Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and 53xx)
	  CPUs. You can distingush newer from older Xeons by the CPU family
	  in /proc/cpuinfo. Newer ones have 6.

config MPENTIUM4
config MPENTIUM4
	bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/Xeon"
	bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon"
	help
	help
	  Select this for Intel Pentium 4 chips.  This includes the
	  Select this for Intel Pentium 4 chips.  This includes the
	  Pentium 4, P4-based Celeron and Xeon, and Pentium-4 M
	  Pentium 4, P4-based Celeron and Xeon, and Pentium-4 M
@@ -229,7 +236,7 @@ config X86_L1_CACHE_SHIFT
	default "7" if MPENTIUM4 || X86_GENERIC
	default "7" if MPENTIUM4 || X86_GENERIC
	default "4" if X86_ELAN || M486 || M386 || MGEODEGX1
	default "4" if X86_ELAN || M486 || M386 || MGEODEGX1
	default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
	default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
	default "6" if MK7 || MK8 || MPENTIUMM
	default "6" if MK7 || MK8 || MPENTIUMM || MCORE2


config RWSEM_GENERIC_SPINLOCK
config RWSEM_GENERIC_SPINLOCK
	bool
	bool
@@ -287,17 +294,17 @@ config X86_ALIGNMENT_16


config X86_GOOD_APIC
config X86_GOOD_APIC
	bool
	bool
	depends on MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8 || MEFFICEON
	depends on MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8 || MEFFICEON || MCORE2
	default y
	default y


config X86_INTEL_USERCOPY
config X86_INTEL_USERCOPY
	bool
	bool
	depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON
	depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2
	default y
	default y


config X86_USE_PPRO_CHECKSUM
config X86_USE_PPRO_CHECKSUM
	bool
	bool
	depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MEFFICEON || MGEODE_LX
	depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MEFFICEON || MGEODE_LX || MCORE2
	default y
	default y


config X86_USE_3DNOW
config X86_USE_3DNOW
@@ -312,5 +319,5 @@ config X86_OOSTORE


config X86_TSC
config X86_TSC
	bool
	bool
	depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1 || MGEODE_LX) && !X86_NUMAQ
	depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1 || MGEODE_LX || MCORE2) && !X86_NUMAQ
	default y
	default y
+1 −0
Original line number Original line Diff line number Diff line
@@ -32,6 +32,7 @@ cflags-$(CONFIG_MWINCHIP2) += $(call cc-option,-march=winchip2,-march=i586)
cflags-$(CONFIG_MWINCHIP3D)	+= $(call cc-option,-march=winchip2,-march=i586)
cflags-$(CONFIG_MWINCHIP3D)	+= $(call cc-option,-march=winchip2,-march=i586)
cflags-$(CONFIG_MCYRIXIII)	+= $(call cc-option,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
cflags-$(CONFIG_MCYRIXIII)	+= $(call cc-option,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
cflags-$(CONFIG_MVIAC3_2)	+= $(call cc-option,-march=c3-2,-march=i686)
cflags-$(CONFIG_MVIAC3_2)	+= $(call cc-option,-march=c3-2,-march=i686)
cflags-$(CONFIG_MCORE2)		+= -march=i686 $(call cc-option,-mtune=core2,$(call cc-option,-mtune=generic,-mtune=i686))


# AMD Elan support
# AMD Elan support
cflags-$(CONFIG_X86_ELAN)	+= -march=i486
cflags-$(CONFIG_X86_ELAN)	+= -march=i486
+2 −0
Original line number Original line Diff line number Diff line
@@ -20,6 +20,8 @@ struct mod_arch_specific
#define MODULE_PROC_FAMILY "586TSC "
#define MODULE_PROC_FAMILY "586TSC "
#elif defined CONFIG_M586MMX
#elif defined CONFIG_M586MMX
#define MODULE_PROC_FAMILY "586MMX "
#define MODULE_PROC_FAMILY "586MMX "
#elif defined CONFIG_MCORE2
#define MODULE_PROC_FAMILY "CORE2 "
#elif defined CONFIG_M686
#elif defined CONFIG_M686
#define MODULE_PROC_FAMILY "686 "
#define MODULE_PROC_FAMILY "686 "
#elif defined CONFIG_MPENTIUMII
#elif defined CONFIG_MPENTIUMII