projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5430f9
)
x86: cleanup - eliminate numbers in LDT allocation code
author
Cyrill Gorcunov
<
[email protected]
>
Mon, 4 Feb 2008 15:48:03 +0000
(16:48 +0100)
committer
Ingo Molnar
<
[email protected]
>
Mon, 4 Feb 2008 15:48:03 +0000
(16:48 +0100)
This patch eliminates numbers in LDT allocation code
trying to make it clear to understand from where
these numbers come.
No code changed:
text data bss dec hex filename
1896 0 0 1896 768 ldt.o.before
1896 0 0 1896 768 ldt.o.after
md5:
6cbec8705008ddb4b704aade60bceda3
ldt.o.before.asm
6cbec8705008ddb4b704aade60bceda3
ldt.o.after.asm
Signed-off-by: Cyrill Gorcunov <
[email protected]
>
Signed-off-by: Ingo Molnar <
[email protected]
>
Signed-off-by: Thomas Gleixner <
[email protected]
>
arch/x86/kernel/ldt.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/ldt.c
b/arch/x86/kernel/ldt.c
index 8a7660c8394a5a2ae2362e6d3d4ec032d5def37e..0224c3637c73e68b4566124dd5d825034bc8c07a 100644
(file)
--- a/
arch/x86/kernel/ldt.c
+++ b/
arch/x86/kernel/ldt.c
@@
-35,7
+35,8
@@
static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
if (mincount <= pc->size)
return 0;
oldsize = pc->size;
- mincount = (mincount + 511) & (~511);
+ mincount = (mincount + (PAGE_SIZE / LDT_ENTRY_SIZE - 1)) &
+ (~(PAGE_SIZE / LDT_ENTRY_SIZE - 1));
if (mincount * LDT_ENTRY_SIZE > PAGE_SIZE)
newldt = vmalloc(mincount * LDT_ENTRY_SIZE);
else