Skip to contentSkip to conversation

x86: parocessor.h - use PAGE_SIZE instead of numeric value v2

PATCH In review Cyrill Gorcunov 2 participants 2 messages Mar 13, 2008 – Mar 21, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: parocessor.h - use PAGE_SIZE instead of numeric value v2

This patch replaces numeric constant with an appropriate macro

Also 0x800000000000UL is changed to bit shifting which is complement to the code comment (thanks hpa for notice)

---

include/asm-x86/processor.h +1 -1
Index: linux-2.6.git/include/asm-x86/processor.h
===================================================================
@@ -786,7 +786,7 @@ extern unsigned long thread_saved_pc(str
 /*
  * User space process size. 47bits minus one guard page.
  */
-#define TASK_SIZE64	(0x800000000000UL - 4096)
+#define TASK_SIZE64	((1UL << 47) - PAGE_SIZE)
 
 /* This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
#1 lore raw

include/asm-x86/processor.h extern unsigned long thread_saved_pc(str · line 789

Quoted 7 lines · Cyrill Gorcunov

This patch replaces numeric constant with an appropriate macro

Also 0x800000000000UL is changed to bit shifting which is complement to the code comment (thanks hpa for notice)

include/asm-x86/processor.h +1 -1
-#define TASK_SIZE64	(0x800000000000UL - 4096)
+#define TASK_SIZE64	((1UL << 47) - PAGE_SIZE)

thanks Cyrill, applied.

Ingo