Skip to contentSkip to conversation

arch/x86/kernel/head_32.S Warning: shift count out of range (32 is not between 0 and 31)

PATCH In review René Bolldorf 2 participants 4 messages Mar 18, 2010 – Mar 19, 2010 x86

lore
Share & tools
lore
#0 lore raw

PATCH 2/5 arch/x86/kernel/head_32.S Warning: shift count out of range (32 is not between 0 and 31)

arch/x86/kernel/head_32.S +1 -1
index 37c3d4b..8bfba5e 100644
@@ -62,7 +62,7 @@
 
 /* Enough space to fit pagetables for the low memory linear map */
 MAPPING_BEYOND_END = \
-	PAGE_TABLE_SIZE(((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT) << PAGE_SHIFT
+	PAGE_TABLE_SIZE(((1<<31) - __PAGE_OFFSET) >> PAGE_SHIFT) << PAGE_SHIFT
 
 /*
  * Worst-case size of the kernel mapping we need to make:
#1 lore raw
Quoted 7 lines · René Bolldorf
arch/x86/kernel/head_32.S +0 -0
index 37c3d4b..8bfba5e 100644

arch/x86/kernel/head_32.S line 68

Quoted 8 lines
arch/x86/kernel/head_32.S +1 -1
@@ -62,7 +62,7 @@
 
  /* Enough space to fit pagetables for the low memory linear map */
  MAPPING_BEYOND_END = \
-	PAGE_TABLE_SIZE(((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT) << PAGE_SHIFT
+	PAGE_TABLE_SIZE(((1<<31) - __PAGE_OFFSET) >> PAGE_SHIFT) << PAGE_SHIFT
 
  /*
   * Worst-case size of the kernel mapping we need to make:

NAK... this is in fact doubly wrong... the assembler handles this case just fine -- it's a .S file after all -- and the result is wrong.

If you want to change it change it to 0x100000000.

-hpa

#2 lore raw
Quoted 20 lines · H. Peter Anvin
Quoted 7 lines · Ren� Bolldorf
arch/x86/kernel/head_32.S +0 -0
index 37c3d4b..8bfba5e 100644

arch/x86/kernel/head_32.S line 68

Quoted 8 lines
arch/x86/kernel/head_32.S +1 -1
@@ -62,7 +62,7 @@
 
   /* Enough space to fit pagetables for the low memory linear map */
   MAPPING_BEYOND_END = \
-	PAGE_TABLE_SIZE(((1<<32) - __PAGE_OFFSET)>>  PAGE_SHIFT)<<  PAGE_SHIFT
+	PAGE_TABLE_SIZE(((1<<31) - __PAGE_OFFSET)>>  PAGE_SHIFT)<<  PAGE_SHIFT
 
   /*
    * Worst-case size of the kernel mapping we need to make:

NAK... this is in fact doubly wrong... the assembler handles this case just fine -- it's a .S file after all -- and the result is wrong.

Quoted 3 lines

If you want to change it change it to 0x100000000.

-hpa

Thank you, i try it out.

#3 lore raw
In reply to H. Peter Anvin
Quoted 20 lines · H. Peter Anvin
Quoted 7 lines · Ren� Bolldorf
arch/x86/kernel/head_32.S +0 -0
index 37c3d4b..8bfba5e 100644

arch/x86/kernel/head_32.S line 68

Quoted 8 lines
arch/x86/kernel/head_32.S +1 -1
@@ -62,7 +62,7 @@
 
   /* Enough space to fit pagetables for the low memory linear map */
   MAPPING_BEYOND_END = \
-	PAGE_TABLE_SIZE(((1<<32) - __PAGE_OFFSET)>>  PAGE_SHIFT)<<  PAGE_SHIFT
+	PAGE_TABLE_SIZE(((1<<31) - __PAGE_OFFSET)>>  PAGE_SHIFT)<<  PAGE_SHIFT
 
   /*
    * Worst-case size of the kernel mapping we need to make:

NAK... this is in fact doubly wrong... the assembler handles this case just fine -- it's a .S file after all -- and the result is wrong.

Quoted 3 lines

If you want to change it change it to 0x100000000.

-hpa

The funny thing is even if i change to 0x100000000 or 0 etc., the compiler warns me. Is this normal or a compiler issue?