x86: don't need to go to chunksize to 4G
authorYinghai Lu <yhlu.kernel@gmail.com>
Sat, 27 Sep 2008 07:30:07 +0000 (00:30 -0700)
committerIngo Molnar <mingo@elte.hu>
Sat, 27 Sep 2008 16:09:33 +0000 (18:09 +0200)
change back chunksize max to 2g
   otherwise will get strange layout in 2G ram system like
     0 - 4g WB, 2040M - 2048M UC, 2048M -  4G NC
   instead of
     0 - 2g WB, 2040M - 2048M UC

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/mtrr/main.c

index b117d7f8a5640fe51091f46247671dff5d61524e..cc135572882ad8d22dfa0eef6e77ac22beb21d93 100644 (file)
@@ -1155,10 +1155,10 @@ struct mtrr_cleanup_result {
 
 /*
  * gran_size: 1M, 2M, ..., 2G
- * chunk size: gran_size, ..., 4G
- * so we need (2+13)*6
+ * chunk size: gran_size, ..., 2G
+ * so we need (1+12)*6
  */
-#define NUM_RESULT     90
+#define NUM_RESULT     78
 #define PSHIFT         (PAGE_SHIFT - 10)
 
 static struct mtrr_cleanup_result __initdata result[NUM_RESULT];
@@ -1276,7 +1276,7 @@ static int __init mtrr_cleanup(unsigned address_bits)
        memset(min_loss_pfn, 0xff, sizeof(min_loss_pfn));
        memset(result, 0, sizeof(result));
        for (gran_size = (1ULL<<20); gran_size < (1ULL<<32); gran_size <<= 1) {
-               for (chunk_size = gran_size; chunk_size < (1ULL<<33);
+               for (chunk_size = gran_size; chunk_size < (1ULL<<32);
                     chunk_size <<= 1) {
                        int num_reg;
 
This page took 0.029747 seconds and 5 git commands to generate.