aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2005-12-08 20:40:17 -0500
committerPaul Mackerras <paulus@samba.org>2005-12-08 23:42:52 -0500
commitdabcafd3f363bacd6b89f537af27dc79128e4806 (patch)
tree92e9ff42b77b76609668fb7c8b262678a1f8bbef /arch
parent326743ead7d0c08e0da715832386660ff3823170 (diff)
[PATCH] powerpc: Set cache info defaults
Cache info is setup by walking the device tree in initialize_cache_info(). However, icache_flush_range might be called before that, in slb_initialize()->patch_slb_encoding, which modifies the load immediate instructions used with SLB fault code. Not only that, but depending on memory layout, we might take SLB faults during unflatten_device_tree. So that fault will load an SLB entry that might not contain the right LLP flags for the segment. Either we can walk the flattened device tree to setup cache info, or we can pick the known defaults that are known to work. Doing it in the flattened device tree is hairier since we need to know the machine type to know what property to look for, etc, etc. For now, it's just easier to go with the defaults. Worst thing that happens from it is that we might waste a few cycles doing too small dcbst/icbi increments. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/setup_64.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 608fee7c7e20..e3fb78397dc6 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -102,7 +102,15 @@ int boot_cpuid_phys = 0;
102dev_t boot_dev; 102dev_t boot_dev;
103u64 ppc64_pft_size; 103u64 ppc64_pft_size;
104 104
105struct ppc64_caches ppc64_caches; 105/* Pick defaults since we might want to patch instructions
106 * before we've read this from the device tree.
107 */
108struct ppc64_caches ppc64_caches = {
109 .dline_size = 0x80,
110 .log_dline_size = 7,
111 .iline_size = 0x80,
112 .log_iline_size = 7
113};
106EXPORT_SYMBOL_GPL(ppc64_caches); 114EXPORT_SYMBOL_GPL(ppc64_caches);
107 115
108/* 116/*