linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [POWERPC] More useful cputable defaults
@ 2008-05-05  5:22 Benjamin Herrenschmidt
  2008-05-12  1:33 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2008-05-05  5:22 UTC (permalink / raw)
  To: linuxppc-dev

Changes the cputable so that various CPU families that have an exclusive
CONFIG_ option have a more sensible default entry to patch if the specific
processor hasn't been identified.

This makes the kernel more generally useful when booted on an unknown
PVR for things like new 4xx variants.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

 arch/powerpc/kernel/cputable.c |   53 +++++++++++++++++++++++++++++++++--------
 1 file changed, 43 insertions(+), 10 deletions(-)

--- linux-work.orig/arch/powerpc/kernel/cputable.c	2008-05-05 13:43:02.000000000 +1000
+++ linux-work/arch/powerpc/kernel/cputable.c	2008-05-05 13:47:52.000000000 +1000
@@ -1207,6 +1207,18 @@ static struct cpu_spec __initdata cpu_sp
 		.machine_check		= machine_check_4xx,
 		.platform		= "ppc405",
 	},
+	{	/* default match */
+		.pvr_mask		= 0x00000000,
+		.pvr_value		= 0x00000000,
+		.cpu_name		= "(generic 40x PPC)",
+		.cpu_features		= CPU_FTRS_40X,
+		.cpu_user_features	= PPC_FEATURE_32 |
+			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
+		.icache_bsize		= 32,
+		.dcache_bsize		= 32,
+		.machine_check		= machine_check_4xx,
+		.platform		= "ppc405",
+	}
 
 #endif /* CONFIG_40x */
 #ifdef CONFIG_44x
@@ -1397,8 +1409,18 @@ static struct cpu_spec __initdata cpu_sp
 		.machine_check		= machine_check_440A,
 		.platform		= "ppc440",
 	},
+	{	/* default match */
+		.pvr_mask		= 0x00000000,
+		.pvr_value		= 0x00000000,
+		.cpu_name		= "(generic 44x PPC)",
+		.cpu_features		= CPU_FTRS_44X,
+		.cpu_user_features	= COMMON_USER_BOOKE,
+		.icache_bsize		= 32,
+		.dcache_bsize		= 32,
+		.machine_check		= machine_check_4xx,
+		.platform		= "ppc440",
+	}
 #endif /* CONFIG_44x */
-#ifdef CONFIG_FSL_BOOKE
 #ifdef CONFIG_E200
 	{	/* e200z5 */
 		.pvr_mask		= 0xfff00000,
@@ -1427,7 +1449,19 @@ static struct cpu_spec __initdata cpu_sp
 		.machine_check		= machine_check_e200,
 		.platform		= "ppc5554",
 	},
-#elif defined(CONFIG_E500)
+	{	/* default match */
+		.pvr_mask		= 0x00000000,
+		.pvr_value		= 0x00000000,
+		.cpu_name		= "(generic E200 PPC)",
+		.cpu_features		= CPU_FTRS_E200,
+		.cpu_user_features	= COMMON_USER_BOOKE |
+			PPC_FEATURE_HAS_EFP_SINGLE |
+			PPC_FEATURE_UNIFIED_CACHE,
+		.dcache_bsize		= 32,
+		.machine_check		= machine_check_e200,
+		.platform		= "ppc5554",
+#endif /* CONFIG_E200 */
+#ifdef CONFIG_E500
 	{	/* e500 */
 		.pvr_mask		= 0xffff0000,
 		.pvr_value		= 0x80200000,
@@ -1463,20 +1497,19 @@ static struct cpu_spec __initdata cpu_sp
 		.machine_check		= machine_check_e500,
 		.platform		= "ppc8548",
 	},
-#endif
-#endif
-#if !CLASSIC_PPC
 	{	/* default match */
 		.pvr_mask		= 0x00000000,
 		.pvr_value		= 0x00000000,
-		.cpu_name		= "(generic PPC)",
-		.cpu_features		= CPU_FTRS_GENERIC_32,
-		.cpu_user_features	= PPC_FEATURE_32,
+		.cpu_name		= "(generic E500 PPC)",
+		.cpu_features		= CPU_FTRS_E500,
+		.cpu_user_features	= COMMON_USER_BOOKE |
+			PPC_FEATURE_HAS_SPE_COMP |
+			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
 		.icache_bsize		= 32,
 		.dcache_bsize		= 32,
+		.machine_check		= machine_check_e500,
 		.platform		= "powerpc",
-	}
-#endif /* !CLASSIC_PPC */
+#endif /* CONFIG_E500 */
 #endif /* CONFIG_PPC32 */
 };
 

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

* Re: [PATCH] [POWERPC] More useful cputable defaults
  2008-05-05  5:22 [PATCH] [POWERPC] More useful cputable defaults Benjamin Herrenschmidt
@ 2008-05-12  1:33 ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2008-05-12  1:33 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

On Mon, May 05, 2008 at 03:22:27PM +1000, Benjamin Herrenschmidt wrote:
> Changes the cputable so that various CPU families that have an exclusive
> CONFIG_ option have a more sensible default entry to patch if the specific
> processor hasn't been identified.
> 
> This makes the kernel more generally useful when booted on an unknown
> PVR for things like new 4xx variants.

This patch (as commit 76bc080ef5a34aedb63e1691f28c6b42f3468e4e) leaves
the last cputable entry for E200 and E500 without a closing brace.

[...]
> -#elif defined(CONFIG_E500)
> +	{	/* default match */
> +		.pvr_mask		= 0x00000000,
> +		.pvr_value		= 0x00000000,
> +		.cpu_name		= "(generic E200 PPC)",
> +		.cpu_features		= CPU_FTRS_E200,
> +		.cpu_user_features	= COMMON_USER_BOOKE |
> +			PPC_FEATURE_HAS_EFP_SINGLE |
> +			PPC_FEATURE_UNIFIED_CACHE,
> +		.dcache_bsize		= 32,
> +		.machine_check		= machine_check_e200,
> +		.platform		= "ppc5554",

-> here

> +#endif /* CONFIG_E200 */
> +#ifdef CONFIG_E500

[snip]
> -#if !CLASSIC_PPC
>  	{	/* default match */
>  		.pvr_mask		= 0x00000000,
>  		.pvr_value		= 0x00000000,
> -		.cpu_name		= "(generic PPC)",
> -		.cpu_features		= CPU_FTRS_GENERIC_32,
> -		.cpu_user_features	= PPC_FEATURE_32,
> +		.cpu_name		= "(generic E500 PPC)",
> +		.cpu_features		= CPU_FTRS_E500,
> +		.cpu_user_features	= COMMON_USER_BOOKE |
> +			PPC_FEATURE_HAS_SPE_COMP |
> +			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
>  		.icache_bsize		= 32,
>  		.dcache_bsize		= 32,
> +		.machine_check		= machine_check_e500,
>  		.platform		= "powerpc",
> -	}

-> and here.

> -#endif /* !CLASSIC_PPC */
> +#endif /* CONFIG_E500 */
>  #endif /* CONFIG_PPC32 */
>  };

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

end of thread, other threads:[~2008-05-12  1:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-05  5:22 [PATCH] [POWERPC] More useful cputable defaults Benjamin Herrenschmidt
2008-05-12  1:33 ` David Gibson

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).