* [PATCH] adjust size calculation for get_vm_area() in ioremap() context
@ 2008-01-10 16:39 Jan Beulich
0 siblings, 0 replies; 2+ messages in thread
From: Jan Beulich @ 2008-01-10 16:39 UTC (permalink / raw)
To: linux-kernel; +Cc: James.Bottomley
Short of getting a reply on the query why the argument of fls() here is
missing the decrement, here's a patch to add it (reducing the resulting
size when the incoming size is an exact power of two).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
---
mm/vmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.24-rc7/mm/vmalloc.c 2008-01-10 16:50:54.000000000 +0100
+++ 2.6.24-rc7-vm-ioremap-size/mm/vmalloc.c 2008-01-08 12:35:11.000000000 +0100
@@ -176,7 +176,7 @@ static struct vm_struct *__get_vm_area_n
BUG_ON(in_interrupt());
if (flags & VM_IOREMAP) {
- int bit = fls(size);
+ int bit = fls(size - 1);
if (bit > IOREMAP_MAX_ORDER)
bit = IOREMAP_MAX_ORDER;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] adjust size calculation for get_vm_area() in ioremap() context
@ 2008-04-22 15:15 Jan Beulich
0 siblings, 0 replies; 2+ messages in thread
From: Jan Beulich @ 2008-04-22 15:15 UTC (permalink / raw)
To: linux-kernel; +Cc: James.Bottomley
Short of getting a reply on the query why the argument of fls() here is
missing the decrement, here's a patch to add it (reducing the resulting
size when the incoming size is an exact power of two).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
---
mm/vmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.25/mm/vmalloc.c 2008-04-17 04:49:44.000000000 +0200
+++ 2.6.25-vm-ioremap-size/mm/vmalloc.c 2008-04-15 10:49:20.000000000 +0200
@@ -214,7 +214,7 @@ static struct vm_struct *__get_vm_area_n
BUG_ON(in_interrupt());
if (flags & VM_IOREMAP) {
- int bit = fls(size);
+ int bit = fls(size - 1);
if (bit > IOREMAP_MAX_ORDER)
bit = IOREMAP_MAX_ORDER;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-22 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-10 16:39 [PATCH] adjust size calculation for get_vm_area() in ioremap() context Jan Beulich
2008-04-22 15:15 Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome