fc95ca7284bc54953165cba76c3228bd2cdb9591 claims that there is no
functional change but this is not true as it calls get_order() (which
takes bytes) where it should have called ilog2() and the kernel stops
on VM_BUG_ON().
This replaces get_order() with order_base_2() (round-up version of ilog2).
Suggested-by: Paul Mackerras <redacted>
Cc: Alexander Graf <redacted>
Cc: Aneesh Kumar K.V <redacted>
Cc: Joonsoo Kim <redacted>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alexey Kardashevskiy <redacted>
---
Changes:
v2:
* s/ilog2/order_base_2/
* removed cc: [off-list ref] as I got wrong impression that v3.16 is
broken
---
arch/powerpc/kvm/book3s_hv_builtin.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -135,12 +135,12 @@ struct page *kvm_alloc_hpt(unsigned long nr_pages){unsignedlongalign_pages=HPT_ALIGN_PAGES;-VM_BUG_ON(get_order(nr_pages)<KVM_CMA_CHUNK_ORDER-PAGE_SHIFT);+VM_BUG_ON(order_base_2(nr_pages)<KVM_CMA_CHUNK_ORDER-PAGE_SHIFT);/* Old CPUs require HPT aligned on a multiple of its size */if(!cpu_has_feature(CPU_FTR_ARCH_206))align_pages=nr_pages;-returncma_alloc(kvm_cma,nr_pages,get_order(align_pages));+returncma_alloc(kvm_cma,nr_pages,order_base_2(align_pages));}EXPORT_SYMBOL_GPL(kvm_alloc_hpt);
fc95ca7284bc54953165cba76c3228bd2cdb9591 claims that there is no
functional change but this is not true as it calls get_order() (which
takes bytes) where it should have called ilog2() and the kernel stops
on VM_BUG_ON().
This replaces get_order() with order_base_2() (round-up version of ilog2).
Suggested-by: Paul Mackerras <redacted>
Cc: Alexander Graf <redacted>
Cc: Aneesh Kumar K.V <redacted>
Cc: Joonsoo Kim <redacted>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alexey Kardashevskiy <redacted>
Reviewed-by: Aneesh Kumar K.V <redacted>
quoted hunk
---
Changes:
v2:
* s/ilog2/order_base_2/
* removed cc: [off-list ref] as I got wrong impression that v3.16 is
broken
---
arch/powerpc/kvm/book3s_hv_builtin.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -135,12 +135,12 @@ struct page *kvm_alloc_hpt(unsigned long nr_pages){unsignedlongalign_pages=HPT_ALIGN_PAGES;-VM_BUG_ON(get_order(nr_pages)<KVM_CMA_CHUNK_ORDER-PAGE_SHIFT);+VM_BUG_ON(order_base_2(nr_pages)<KVM_CMA_CHUNK_ORDER-PAGE_SHIFT);/* Old CPUs require HPT aligned on a multiple of its size */if(!cpu_has_feature(CPU_FTR_ARCH_206))align_pages=nr_pages;-returncma_alloc(kvm_cma,nr_pages,get_order(align_pages));+returncma_alloc(kvm_cma,nr_pages,order_base_2(align_pages));}EXPORT_SYMBOL_GPL(kvm_alloc_hpt);
From: Alexander Graf <hidden> Date: 2014-08-14 13:41:10
On 14.08.14 07:13, Aneesh Kumar K.V wrote:
Alexey Kardashevskiy [off-list ref] writes:
quoted
fc95ca7284bc54953165cba76c3228bd2cdb9591 claims that there is no
functional change but this is not true as it calls get_order() (which
takes bytes) where it should have called ilog2() and the kernel stops
on VM_BUG_ON().
This replaces get_order() with order_base_2() (round-up version of ilog2).
Suggested-by: Paul Mackerras <redacted>
Cc: Alexander Graf <redacted>
Cc: Aneesh Kumar K.V <redacted>
Cc: Joonsoo Kim <redacted>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alexey Kardashevskiy <redacted>
fc95ca7284bc54953165cba76c3228bd2cdb9591 claims that there is no
functional change but this is not true as it calls get_order() (which
takes bytes) where it should have called ilog2() and the kernel stops
on VM_BUG_ON().
This replaces get_order() with order_base_2() (round-up version of ilog2).
Suggested-by: Paul Mackerras <redacted>
Cc: Alexander Graf <redacted>
Cc: Aneesh Kumar K.V <redacted>
Cc: Joonsoo Kim <redacted>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alexey Kardashevskiy <redacted>
From: Joonsoo Kim <hidden> Date: 2014-08-20 02:45:02
On Thu, Aug 14, 2014 at 03:03:07PM +1000, Alexey Kardashevskiy wrote:
fc95ca7284bc54953165cba76c3228bd2cdb9591 claims that there is no
functional change but this is not true as it calls get_order() (which
takes bytes) where it should have called ilog2() and the kernel stops
on VM_BUG_ON().
This replaces get_order() with order_base_2() (round-up version of ilog2).
Suggested-by: Paul Mackerras <redacted>
Cc: Alexander Graf <redacted>
Cc: Aneesh Kumar K.V <redacted>
Cc: Joonsoo Kim <redacted>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alexey Kardashevskiy <redacted>
Sorry for my fault. :(
Acked-by: Joonsoo Kim <redacted>
Thanks.