This patch replaces CONFIG_POWER4_ONLY by (CONFIG_OPT_EXCLUSIVE
CONFIG_TUNE_POWER4). This gets overwritten in the next patch.
It also introduces integer values of CPU generations. This is useful to enable
features available only since a certain CPU gen (see last hunk).
Unfortunately, kbuild system can't (yet) compare int values, so MIN_POWERn is
also defined (but not used yet).
Subject: [PATCH] replace CONFIG_POWER4_ONLY by new tuning mechanism
---
arch/powerpc/Kconfig|2 +-
arch/powerpc/Makefile |5 -
arch/powerpc/configs/cell_defconfig |1 -
arch/powerpc/configs/celleb_defconfig |1 -
arch/powerpc/configs/g5_defconfig |3 ++-
arch/powerpc/configs/iseries_defconfig |1 -
arch/powerpc/configs/maple_defconfig|3 ++-
arch/powerpc/configs/pasemi_defconfig |3 ++-
arch/powerpc/configs/ppc64_defconfig|1 -
arch/powerpc/configs/ps3_defconfig |1 -
arch/powerpc/configs/pseries_defconfig |1 -
arch/powerpc/platforms/Kconfig.cputype | 31
---
arch/powerpc/platforms/powermac/Kconfig |2 +-
include/asm-powerpc/asm-compat.h|2 +-
14 files changed, 37 insertions(+), 20 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index de88972..9b2aaf5 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -528,7 +528,7 @@ config ZONE_DMA
config GENERIC_ISA_DMA
bool
- depends on PPC64 || POWER4 || 6xx !CPM2
+ depends on PPC64 || 6xx !CPM2
default y
config PPC_INDIRECT_PCI
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 624a896..9629c5e 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -77,7 +77,8 @@ CHECKFLAGS
+= -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)
ifeq ($(CONFIG_PPC64),y)
GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo y;
fi)
-ifeq ($(CONFIG_POWER4_ONLY),y)
+ifeq ($(CONFIG_TUNE_POWER4),y)
+ifeq ($(CONFIG_OPT_EXCLUSIVE),y)
ifeq ($(CONFIG_ALTIVEC),y)
ifeq ($(GCC_BROKEN_VEC),y)
KBUILD_CFLAGS += $(call cc-option,-mcpu=970)
@@ -90,6 +91,8 @@ endif
else
KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
endif
+ KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
+endif
else
LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
endif
diff --git a/arch/powerpc/configs/cell_defconfig
b/arch/powerpc/configs/cell_defconfig
index 42290e8..7e8e581 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -8,7 +8,6 @@ CONFIG_PPC64=y
#
# Processor support
#
-# CONFIG_POWER4_ONLY is not set
CONFIG_BATS64=y
CONFIG_TUNE_CELL=y
CONFIG_PPC_FPU=y
diff --git a/arch/powerpc/configs/celleb_defconfig
b/arch/powerpc/configs/celleb_defconfig
index a405836..e11e991 100644
--- a/arch/powerpc/configs/celleb_defconfig
+++ b/arch/powerpc/configs/celleb_defconfig
@@ -8,7 +8,6 @@ CONFIG_PPC64=y
#
# Processor support
#
-# CONFIG_POWER4_ONLY is not set
CONFIG_BATS64=y
CONFIG_TUNE_CELL=y
CONFIG_PPC_FPU=y
diff --git a/arch/powerpc/configs/g5_defconfig
b/arch/powerpc/configs/g5_defconfig
index 747088a..e2c92ed 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_defconfig
@@ -8,7 +8,8 @@ CONFIG_PPC64=y
#
# Processor support
#
-CONFIG_POWER4_ONLY=y
+CONFIG_TUNE_POWER4=y
+CONFIG_OPT_EXCLUSIVE=y
# CONFIG_TUNE_CELL is not set
CONFIG_PPC_FPU=y
CONFIG_ALTIVEC=y
diff --git a/arch/powerpc/configs/iseries_defconfig
b/arch/powerpc/configs/iseries_defconfig
index 1b46033..abe72fd 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_defconfig
@@ -8,7 +8,6 @@ CONFIG_PPC64=y
#
# Processor support
#
-# CONFIG_POWER4_ONLY is not set
CONFIG_BATS64=y
# CONFIG_TUNE_CELL is not set
CONFIG_PPC_FPU=y
diff --git a/arch/powerpc/configs/maple_defconfig
b/arch/powerpc/configs/maple_defconfig
index 4becb7b..6dee9f2 100644
--- a/arch/powerpc/configs/maple_defconfig
+++ b/arch/powerpc/configs/maple_defconfig
@@ -8,7 +8,8 @@ CONFIG_PPC64=y
#
# Processor support
#
-CONFIG_POWER4_ONLY=y
+CONFIG_TUNE_POWER4=y
+CONFIG_OPT_EXCLUSIVE=y
# CONFIG_TUNE_CELL is not set
CONFIG_PPC_FPU=y
# CONFIG_ALTIVEC is not set
diff --git a/arch/powerpc/configs/pasemi_defconfig
b/arch/powerpc/configs/pasemi_defconfig
index d816a3a..adef0fe 100644
--- a/arch/powerpc/configs/pasemi_defconfig
+++ b/arch/powerpc/configs/pasemi_defconfig
@@ -8,7 +8,8 @@ CONFIG_PPC64=y
#
# Processor support
#
-CONFIG_POWER4_ONLY=y
+CONFIG_TUNE_POWER4=y
+CONFIG_OPT_EXCLUSIVE=y
# CONFIG_TUNE_CELL is not set
CONFIG_PPC_FPU=y
CONFIG_ALTIVEC=y
diff --git a/arch/powerpc/configs/ppc64_defconfig
b/arch/powerpc/configs/ppc64_defconfig
index 22276d2..7f14276 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -8,7 +8,6 @@ CONFIG_PPC64=y
#
# Processor support
#
-# CONFIG_POWER4_ONLY is not set
CONFIG_BATS64=y
#