Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932073AbbGSUmB (ORCPT ); Sun, 19 Jul 2015 16:42:01 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:19858 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753390AbbGSUmA (ORCPT ); Sun, 19 Jul 2015 16:42:00 -0400 Date: Sun, 19 Jul 2015 22:41:42 +0200 From: Sowmini Varadhan To: Rasmus Villemoes Cc: Guenter Roeck , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, benh@kernel.crashing.org, davem@davemloft.net Subject: Re: [PATCH] iommu-common: Do not use 64 bit constant 0xffffffffffffffffl for computing align_mask Message-ID: <20150719204142.GA9844@oracle.com> References: <20150719121653.GA30645@oracle.com> <20150719152724.GB3729@roeck-us.net> <874mkzevz4.fsf@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874mkzevz4.fsf@rasmusvillemoes.dk> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 685 Lines: 20 On (07/19/15 22:25), Rasmus Villemoes wrote: > > Wouldn't GENMASK(align_order-1, 0) work for all cases (assuming > align_order has a sane value)? Devices with limits on DMA masks are uncommon, so I'm personally not an expert at all the variations in this space, but I was thinking that this doing align_mask = 0xffffffffffffffffull >> (64 - align_order); would be the compact answer for both 32 and 64 bit cases here? --Sowmini -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/