From: Will Deacon Date: Mon, 16 Feb 2015 18:38:20 +0000 (+0000) Subject: iommu/io-pgtable-arm: Fix self-test WARNs on i386 X-Git-Tag: omap-for-v4.1/wl12xx-dt~30^2~5 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=367bd978b81c2c7bcdcacdd3156645a27fab0676;p=pandora-kernel.git iommu/io-pgtable-arm: Fix self-test WARNs on i386 Various build/boot bots have reported WARNs being triggered by the ARM iopgtable LPAE self-tests on i386 machines. This boils down to two instances of right-shifting a 32-bit unsigned long (i.e. an iova) by more than the size of the type. On 32-bit ARM, this happens to give us zero, hence my testing didn't catch this earlier. This patch fixes the issue by using DIV_ROUND_UP and explicit case to to avoid the erroneous shifts. Reported-by: Fengguang Wu Reported-by: Huang Ying Signed-off-by: Will Deacon Signed-off-by: Joerg Roedel --- Reading git-diff-tree failed