Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753563Ab2FFNO4 (ORCPT ); Wed, 6 Jun 2012 09:14:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44378 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752304Ab2FFNOz (ORCPT ); Wed, 6 Jun 2012 09:14:55 -0400 Date: Wed, 6 Jun 2012 15:14:42 +0200 From: Andrea Arcangeli To: Benjamin Herrenschmidt Cc: Bhushan Bharat-R65777 , David Miller , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "galak@kernel.crashing.org" , "linux-mm@kvack.org" Subject: Re: [PATCH] powerpc: Fix assmption of end_of_DRAM() returns end address Message-ID: <20120606131442.GN21339@redhat.com> References: <1338904504-2750-1-git-send-email-bharat.bhushan@freescale.com> <1338934659.7150.113.camel@pasglop> <20120605.152058.828742127223799137.davem@davemloft.net> <6A3DF150A5B70D4F9B66A25E3F7C888D03D68F08@039-SN2MPN1-022.039d.mgd.msft.net> <1338960617.7150.163.camel@pasglop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1338960617.7150.163.camel@pasglop> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1651 Lines: 42 Hi, On Wed, Jun 06, 2012 at 03:30:17PM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2012-06-06 at 00:46 +0000, Bhushan Bharat-R65777 wrote: > > > > >> memblock_end_of_DRAM() returns end_address + 1, not end address. > > > >> While some code assumes that it returns end address. > > > > > > > > Shouldn't we instead fix it the other way around ? IE, make > > > > memblock_end_of_DRAM() does what the name implies, which is to > > return > > > > the last byte of DRAM, and fix the -other- callers not to make bad > > > > assumptions ? > > > > > > That was my impression too when I saw this patch. > > > > Initially I also intended to do so. I initiated a email on linux-mm@ > > subject "memblock_end_of_DRAM() return end address + 1" and the only > > response I received from Andrea was: > > > > " > > It's normal that "end" means "first byte offset out of the range". End > > = not ok. > > end = start+size. > > This is true for vm_end too. So it's better to keep it that way. > > My suggestion is to just fix point 1 below and audit the rest :) > > " > > Oh well, I don't care enough to fight this battle in my current state so I wish you to get well soon Ben! > unless Dave has more stamina than I have today, I'm ok with the patch. Well it doesn't really matter in the end what is decided as long as something is decided :). I was asked through a forward so I only expressed my preference... -- 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/