lkml.org 
[lkml]   [2011]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[081/101] iommu/amd: Fix wrong shift direction
    2.6.33-longterm review patch.  If anyone has any objections, please let us 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
    @@ -1066,7 +1066,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-03 02:53    [W:0.029 / U:58.724 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site