|
@@ -250,7 +250,7 @@ int __init dma_declare_contiguous(struct device *dev, unsigned long size,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
/* Sanitise input arguments */
|
|
/* Sanitise input arguments */
|
|
- alignment = PAGE_SIZE << max(MAX_ORDER, pageblock_order);
|
|
|
|
|
|
+ alignment = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order);
|
|
base = ALIGN(base, alignment);
|
|
base = ALIGN(base, alignment);
|
|
size = ALIGN(size, alignment);
|
|
size = ALIGN(size, alignment);
|
|
limit &= ~(alignment - 1);
|
|
limit &= ~(alignment - 1);
|