Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab27f62002f4dc8f759c1ec069024d8173e5dea0
Commit:     ab27f62002f4dc8f759c1ec069024d8173e5dea0
Parent:     8328a8ba92819792f37e3db002d404554e7a6f79
Author:     Paul Mundt <[EMAIL PROTECTED]>
AuthorDate: Mon Sep 24 17:00:45 2007 +0900
Committer:  Paul Mundt <[EMAIL PROTECTED]>
CommitDate: Mon Sep 24 17:00:45 2007 +0900

    sh: Calculate cache aliases on L2 caches.
    
    Calculate the number of cache aliases on probed L2 caches, and while
    we're at it, print out the detected statistics at boot time for these
    also.
    
    Signed-off-by: Paul Mundt <[EMAIL PROTECTED]>
---
 arch/sh/mm/cache-sh4.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c
index 6c36c2f..226b190 100644
--- a/arch/sh/mm/cache-sh4.c
+++ b/arch/sh/mm/cache-sh4.c
@@ -70,6 +70,20 @@ static void __init emit_cache_params(void)
                boot_cpu_data.dcache.alias_mask,
                boot_cpu_data.dcache.n_aliases);
 
+       /*
+        * Emit Secondary Cache parameters if the CPU has a probed L2.
+        */
+       if (boot_cpu_data.flags & CPU_HAS_L2_CACHE) {
+               printk("S-cache : n_ways=%d n_sets=%d way_incr=%d\n",
+                       boot_cpu_data.scache.ways,
+                       boot_cpu_data.scache.sets,
+                       boot_cpu_data.scache.way_incr);
+               printk("S-cache : entry_mask=0x%08x alias_mask=0x%08x 
n_aliases=%d\n",
+                       boot_cpu_data.scache.entry_mask,
+                       boot_cpu_data.scache.alias_mask,
+                       boot_cpu_data.scache.n_aliases);
+       }
+
        if (!__flush_dcache_segment_fn)
                panic("unknown number of cache ways\n");
 }
@@ -81,6 +95,7 @@ void __init p3_cache_init(void)
 {
        compute_alias(&boot_cpu_data.icache);
        compute_alias(&boot_cpu_data.dcache);
+       compute_alias(&boot_cpu_data.scache);
 
        switch (boot_cpu_data.dcache.ways) {
        case 1:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to