From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH 04/14] bus: mvebu-mbus: Add static window allocation to the DT binding Date: Wed, 12 Jun 2013 16:02:50 -0600 Message-ID: <20130612220250.GA14852@obsidianresearch.com> References: <1370623671-7748-1-git-send-email-ezequiel.garcia@free-electrons.com> <20130612212641.GB8625@obsidianresearch.com> <20130612213620.GC23012@localhost> <201306122352.32749.arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <201306122352.32749.arnd-r2nGTMty4D4@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Arnd Bergmann Cc: Lior Amsalem , Andrew Lunn , Jason Cooper , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Maen Suleiman , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Sebastian Hesselbarth List-Id: devicetree@vger.kernel.org On Wed, Jun 12, 2013 at 11:52:32PM +0200, Arnd Bergmann wrote: > Whether that results in an optimum mapping or not depends on the actual > sizes for the child nodes. Since everything is a power-of-two size, > a first-fit algorithm actually isn't bad at all. The windows must be aligned to their size. eg 1M size window must be aligned to a 1M boundary. First fit only works if you allocate from largest alignment requirement to smallest, otherwise the worst case is something like nearly double the largest alignment wasted in alignment padding. Jason