From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753502AbbBYMiu (ORCPT ); Wed, 25 Feb 2015 07:38:50 -0500 Received: from 8bytes.org ([81.169.241.247]:32924 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753232AbbBYMit (ORCPT ); Wed, 25 Feb 2015 07:38:49 -0500 Date: Wed, 25 Feb 2015 13:38:46 +0100 From: Joerg Roedel To: Will Deacon Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org Subject: Re: [PATCH] iommu/io-pgtable-arm: fix self-test WARNs on i386 Message-ID: <20150225123845.GA5362@8bytes.org> References: <1424111900-23887-1-git-send-email-will.deacon@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424111900-23887-1-git-send-email-will.deacon@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 16, 2015 at 06:38:20PM +0000, Will Deacon wrote: > 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 > --- > > Joerg -- please can you apply this as a fix for 3.20? Applied to my fixes branch, thanks Will.