lkml.org 
[lkml]   [2011]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[112/262] iommu/amd: Fix wrong shift direction
    3.0-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Joerg Roedel <joerg.roedel@amd.com>

    commit fcd0861db1cf4e6ed99f60a815b7b72c2ed36ea4 upstream.

    The shift direction was wrong because the function takes a
    page number and i is the address is the loop.

    Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    arch/x86/kernel/amd_iommu.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/arch/x86/kernel/amd_iommu.c
    +++ b/arch/x86/kernel/amd_iommu.c
    @@ -1203,7 +1203,7 @@ static int alloc_new_range(struct dma_op
    if (!pte || !IOMMU_PTE_PRESENT(*pte))
    continue;

    - dma_ops_reserve_addresses(dma_dom, i << PAGE_SHIFT, 1);
    + dma_ops_reserve_addresses(dma_dom, i >> PAGE_SHIFT, 1);
    }

    update_domain(&dma_dom->domain);



    \
     
     \ /
      Last update: 2011-11-10 04:37    [W:4.079 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site