]> git.karo-electronics.de Git - linux-beck.git/blobdiff - arch/ia64/kernel/setup.c
[PATCH] scheduler cache-hot-autodetect
[linux-beck.git] / arch / ia64 / kernel / setup.c
index d91c8ff2c0d7d3fe732b49fad5b6177fe1bc5e87..0daa8fa9ef32c8582f4bea7f5fa4183260686df2 100644 (file)
@@ -696,6 +696,7 @@ static void
 get_max_cacheline_size (void)
 {
        unsigned long line_size, max = 1;
+       unsigned int cache_size = 0;
        u64 l, levels, unique_caches;
         pal_cache_config_info_t cci;
         s64 status;
@@ -725,6 +726,8 @@ get_max_cacheline_size (void)
                line_size = 1 << cci.pcci_line_size;
                if (line_size > max)
                        max = line_size;
+               if (cache_size < cci.pcci_cache_size)
+                       cache_size = cci.pcci_cache_size;
                if (!cci.pcci_unified) {
                        status = ia64_pal_cache_config_info(l,
                                                    /* cache_type (instruction)= */ 1,
@@ -741,6 +744,9 @@ get_max_cacheline_size (void)
                        ia64_i_cache_stride_shift = cci.pcci_stride;
        }
   out:
+#ifdef CONFIG_SMP
+       max_cache_size = max(max_cache_size, cache_size);
+#endif
        if (max > ia64_max_cacheline_size)
                ia64_max_cacheline_size = max;
 }