status of the G4 l2 cache flush and MSR errate patch
Sven & Ben,
what's the status of the patch below (forward-port to 2.6.10 by me)?
#! /bin/sh -e
##
## All lines beginning with `## DP:' are a description of the patch. ## DP: Description: Fixes g4 l2 cache flush and MSR erratas. ## DP: Patch author: Sven Luther <[email protected]>
## DP: Upstream status: under review by benh.
. $(dirname $0)/DPATCH
@DPATCH@
arch/ppc/kernel/cputable.c +16 -10
@@ -380,7 +380,7 @@ struct cpu_spec cpu_specs[] = {CPU_FTR_SPLIT_ID_CACHE |CPU_FTR_USE_TB |CPU_FTR_L2CR |CPU_FTR_ALTIVEC_COMP |CPU_FTR_L3CR |CPU_FTR_HPTE_TABLE |CPU_FTR_SPEC7450 | - CPU_FTR_NEED_COHERENT, + CPU_FTR_NEED_COHERENT | CPU_FTR_HWFLUSH_L2_CACHE, .cpu_user_features = COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32,
@@ -397,7 +397,7 @@ struct cpu_spec cpu_specs[] = {CPU_FTR_ALTIVEC_COMP |CPU_FTR_L3CR |CPU_FTR_HPTE_TABLE |CPU_FTR_SPEC7450 |CPU_FTR_NAP_DISABLE_L2_PR |CPU_FTR_L3_DISABLE_NAP | - CPU_FTR_NEED_COHERENT, + CPU_FTR_NEED_COHERENT | CPU_FTR_HWFLUSH_L2_CACHE, .cpu_user_features = COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32,
@@ -413,7 +413,8 @@ struct cpu_spec cpu_specs[] = {CPU_FTR_MAYBE_CAN_NAP |CPU_FTR_L2CR |CPU_FTR_ALTIVEC_COMP |CPU_FTR_L3CR |CPU_FTR_HPTE_TABLE |CPU_FTR_SPEC7450 | - CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_NEED_COHERENT, +CPU_FTR_NAP_DISABLE_L2_PR |CPU_FTR_NEED_COHERENT | + CPU_FTR_HWFLUSH_L2_CACHE, .cpu_user_features = COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32,
@@ -428,7 +429,8 @@ struct cpu_spec cpu_specs[] = {CPU_FTR_SPLIT_ID_CACHE |CPU_FTR_USE_TB |CPU_FTR_L2CR |CPU_FTR_ALTIVEC_COMP |CPU_FTR_L3CR |CPU_FTR_HPTE_TABLE |CPU_FTR_SPEC7450 | - CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT, +CPU_FTR_HAS_HIGH_BATS |CPU_FTR_NEED_COHERENT | + CPU_FTR_HWFLUSH_L2_CACHE, .cpu_user_features = COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32,
@@ -445,7 +447,8 @@ struct cpu_spec cpu_specs[] = {CPU_FTR_ALTIVEC_COMP |CPU_FTR_L3CR |CPU_FTR_HPTE_TABLE |CPU_FTR_SPEC7450 |CPU_FTR_NAP_DISABLE_L2_PR |CPU_FTR_L3_DISABLE_NAP | - CPU_FTR_NEED_COHERENT | CPU_FTR_HAS_HIGH_BATS, +CPU_FTR_NEED_COHERENT |CPU_FTR_HAS_HIGH_BATS | + CPU_FTR_HWFLUSH_L2_CACHE, .cpu_user_features = COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32,
@@ -462,7 +465,7 @@ struct cpu_spec cpu_specs[] = {CPU_FTR_ALTIVEC_COMP |CPU_FTR_L3CR |CPU_FTR_HPTE_TABLE |CPU_FTR_SPEC7450 |CPU_FTR_NAP_DISABLE_L2_PR |CPU_FTR_HAS_HIGH_BATS | - CPU_FTR_NEED_COHERENT, + CPU_FTR_NEED_COHERENT | CPU_FTR_HWFLUSH_L2_CACHE, .cpu_user_features = COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32,
@@ -479,7 +482,8 @@ struct cpu_spec cpu_specs[] = {CPU_FTR_ALTIVEC_COMP |CPU_FTR_L3CR |CPU_FTR_HPTE_TABLE |CPU_FTR_SPEC7450 |CPU_FTR_NAP_DISABLE_L2_PR |CPU_FTR_HAS_HIGH_BATS | - CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC, +CPU_FTR_NEED_COHERENT |CPU_FTR_NO_BTIC | + CPU_FTR_HWFLUSH_L2_CACHE, .cpu_user_features = COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32,
@@ -496,7 +500,8 @@ struct cpu_spec cpu_specs[] = {CPU_FTR_ALTIVEC_COMP |CPU_FTR_L3CR |CPU_FTR_HPTE_TABLE |CPU_FTR_SPEC7450 |CPU_FTR_NAP_DISABLE_L2_PR |CPU_FTR_HAS_HIGH_BATS | - CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC, +CPU_FTR_NEED_COHERENT |CPU_FTR_NO_BTIC | + CPU_FTR_HWFLUSH_L2_CACHE, .cpu_user_features = COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32,
@@ -513,7 +518,7 @@ struct cpu_spec cpu_specs[] = {CPU_FTR_ALTIVEC_COMP |CPU_FTR_L3CR |CPU_FTR_HPTE_TABLE |CPU_FTR_SPEC7450 |CPU_FTR_NAP_DISABLE_L2_PR |CPU_FTR_HAS_HIGH_BATS | - CPU_FTR_NEED_COHERENT, + CPU_FTR_NEED_COHERENT | CPU_FTR_HWFLUSH_L2_CACHE, .cpu_user_features = COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32,
@@ -529,7 +534,8 @@ struct cpu_spec cpu_specs[] = {CPU_FTR_MAYBE_CAN_NAP |CPU_FTR_L2CR |CPU_FTR_ALTIVEC_COMP |CPU_FTR_HPTE_TABLE |CPU_FTR_SPEC7450 |CPU_FTR_NAP_DISABLE_L2_PR | - CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT, +CPU_FTR_HAS_HIGH_BATS |CPU_FTR_NEED_COHERENT | + CPU_FTR_HWFLUSH_L2_CACHE, .cpu_user_features = COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32,
arch/ppc/kernel/l2cr.S +46 -19
116 lines not on this page · raw message
arch/ppc/kernel/traps.c +3 -1
@@ -298,7 +298,9 @@ void MachineCheckException(struct pt_regcase 0x80000 :printk ("Machine check signal\n" );break ; -case 0 :/* for 601 */ +case 0 :/* for 601 and 744x */ +printk ("Transfer error ack signal if 601, or MCP if 744x \n" ); +break ;case 0x40000 :case 0x140000 :/* 7450 MSS error and TEA */ printk ("Transfer error ack signal\n" );
include/asm-ppc/cputable.h +1 -0
@@ -83,6 +83,7 @@ extern struct cpu_spec *cur_cpu_spec[];#define CPU_FTR_HAS_HIGH_BATS 0x00010000#define CPU_FTR_NEED_COHERENT 0x00020000#define CPU_FTR_NO_BTIC 0x00040000 +#define CPU_FTR_HWFLUSH_L2_CACHE 0x00080000#ifdef __ASSEMBLY__
Quoted 11 lines · Christoph Hellwig
Sven & Ben,
what's the status of the patch below (forward-port to 2.6.10 by me)?
#!
/bin/sh-e
##
## All lines beginning with `## DP:' are a description of the patch. ## DP: Description: Fixes g4 l2 cache flush and MSR erratas. ## DP: Patch author: Sven Luther <[email protected]>
Mmm, well, i am not really the author of this one. Jacob Pan from freescale is the author, so we should change this, will do. So this should show :
## DP: Patch author: Pan Jacob-r7aahq <[email protected]>
Quoted 1 line
## DP: Upstream status: under review by benh.
The patch does two things. Use hardware assist for cache flush, which seems to be ok on 744x processors, but broken on earlier G4s and G3s. And add a printk in case of some exception, so the user knows about it instead of it being silently discarded.
I was under the impression that benh said that the patch was ok, but not really relevant, since it applies to code travel cases which either are not really used in the common case, or result in a dying of the kernel anyway. Don't remember all the details though. They do respond to some G4 processor errata's though.
Friendly,
Sven Luther
Quoted 11 lines
Mmm, well, i am not really the author of this one. Jacob Pan from freescale is the author, so we should change this, will do. So this should show :
## DP: Patch author: Pan Jacob-r7aahq <[email protected]>
Quoted 1 line
## DP: Upstream status: under review by benh.
The patch does two things. Use hardware assist for cache flush, which seems to be ok on 744x processors, but broken on earlier G4s and G3s. And add a printk in case of some exception, so the user knows about it instead of it being silently discarded.
The HW assist isn't completely ok neither... it should be enough for enabling the cache at boot though. I've been banging my head lately trying to get a properly working & reliable cache flush mecanism for use on the Mac laptops since we need that for cpufreq and sleep on various models, but what I have right now is just a "works most of the time" kind of implementation.
Quoted 5 lines
I was under the impression that benh said that the patch was ok, but not really relevant, since it applies to code travel cases which either are not really used in the common case, or result in a dying of the kernel anyway. Don't remember all the details though. They do respond to some G4 processor errata's though.
I'll have a look again. Just back from vacation, leave me a coupe of days to catch up with everything and I'll take care of those.
Ben.