linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [RFC] reorganize cputypes for PPC64
@ 2008-07-12 13:16 Marvin
  2008-07-12 18:00 ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Marvin @ 2008-07-12 13:16 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

Hi,

attached patch introduces a "processor type" menu similar to ppc32. It 
_should_ not change anything upto now. 

The aim is to allow future fine graded cpu optimizations via mcpu/mtune 
compiler flags and also to clean up the arch Makefile/Kconfig.cputypes (I 
know this is a minefield).

Greetings

Marvin


[-- Attachment #2: ppc64_cputypes.patch --]
[-- Type: text/x-diff, Size: 2508 bytes --]

diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index f7efaa9..eebde6c 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -54,35 +54,65 @@ config E200
 
 endchoice
 
-config POWER4_ONLY
-	bool "Optimize for POWER4"
+choice
+	prompt "Processor Type"
 	depends on PPC64
+	default TUNE_POWER4
+	help
+	  There are serveral families of 64 bit PowerPC chips supported.
+	  These include the Power3 to Power6 series, 970, and Cell BE based
+	  CPUs made be IBM.
+
+	  If unsure, select Power4.
+
+config TUNE_POWER3
+	bool "Power3"
+
+config TUNE_POWER4
+	bool "Power4"
+
+config TUNE_970
+	bool "970/G5"
+
+config TUNE_POWER5
+	bool "Power5"
+
+config TUNE_POWER6
+	bool "Power6"
+
+config TUNE_CELL
+	bool "Cell Broadband Engine"
+	help
+	  Cause the compiler to optimize for the PPE of the Cell Broadband
+	  Engine. This will make the code run considerably faster on Cell
+	  but somewhat slower on other machines. If the resulting kernel is
+	  built to run only on Cell BE machines, select also OPT_EXCLUSIVE.
+
+endchoice
+
+config OPT_EXCLUSIVE
+	bool "Optimize to run exclusive on selected CPU"
 	default n
-	---help---
-	  Cause the compiler to optimize for POWER4/POWER5/PPC970 processors.
-	  The resulting binary will not work on POWER3 or RS64 processors
-	  when compiled with binutils 2.15 or later.
+	help
+	  Cause the compiler to optimize to run exclusive on the selected
+	  CPU. The resulting binary will probably not work on other CPUs.
+	  
+	  If the compiler/binutils combination does not support the exclusive
+	  optimization, it will try to tune only or fail.
+	  
+	  If you are unsure, select no.
 
 config POWER3
-	bool
 	depends on PPC64
-	default y if !POWER4_ONLY
+	def_bool y if !POWER4_ONLY
 
 config POWER4
 	depends on PPC64
 	def_bool y
 
-config TUNE_CELL
-	bool "Optimize for Cell Broadband Engine"
+config POWER4_ONLY
 	depends on PPC64
-	help
-	  Cause the compiler to optimize for the PPE of the Cell Broadband
-	  Engine. This will make the code run considerably faster on Cell
-	  but somewhat slower on other machines. This option only changes
-	  the scheduling of instructions, not the selection of instructions
-	  itself, so the resulting kernel will keep running on all other
-	  machines. When building a kernel that is supposed to run only
-	  on Cell, you should also select the POWER4_ONLY option.
+	def_bool y if TUNE_POWER4 && OPT_EXCLUSIVE
 
 config 6xx
 	bool

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-26  4:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-12 13:16 [RFC] reorganize cputypes for PPC64 Marvin
2008-07-12 18:00 ` Arnd Bergmann
2008-07-13 12:20   ` Marvin
2008-07-26  4:50     ` Milton Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).