linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* RE: [PATCH] powerpc: Fix assmption of end_of_DRAM() returns end address
       [not found]   ` <20120605.152058.828742127223799137.davem@davemloft.net>
@ 2012-06-06  0:46     ` Bhushan Bharat-R65777
  2012-06-06  5:30       ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Bhushan Bharat-R65777 @ 2012-06-06  0:46 UTC (permalink / raw)
  To: David Miller, benh@kernel.crashing.org, Andrea Arcangeli
  Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	galak@kernel.crashing.org, linux-mm@kvack.org



> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Wednesday, June 06, 2012 3:51 AM
> To: benh@kernel.crashing.org
> Cc: Bhushan Bharat-R65777; linuxppc-dev@lists.ozlabs.org; linux-
> kernel@vger.kernel.org; galak@kernel.crashing.org; Bhushan Bharat-R65777
> Subject: Re: [PATCH] powerpc: Fix assmption of end_of_DRAM() returns end address
> 
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Date: Wed, 06 Jun 2012 08:17:39 +1000
> 
> > On Tue, 2012-06-05 at 19:25 +0530, Bharat Bhushan 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 :)
"

Thanks
-Bharat

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] powerpc: Fix assmption of end_of_DRAM() returns end address
  2012-06-06  0:46     ` [PATCH] powerpc: Fix assmption of end_of_DRAM() returns end address Bhushan Bharat-R65777
@ 2012-06-06  5:30       ` Benjamin Herrenschmidt
  2012-06-06 13:14         ` Andrea Arcangeli
  2012-06-06 16:03         ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2012-06-06  5:30 UTC (permalink / raw)
  To: Bhushan Bharat-R65777
  Cc: David Miller, Andrea Arcangeli, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, galak@kernel.crashing.org,
	linux-mm@kvack.org

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
unless Dave has more stamina than I have today, I'm ok with the patch.

Cheers,
Ben.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc: Fix assmption of end_of_DRAM() returns end address
  2012-06-06  5:30       ` Benjamin Herrenschmidt
@ 2012-06-06 13:14         ` Andrea Arcangeli
  2012-06-06 16:03         ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: Andrea Arcangeli @ 2012-06-06 13:14 UTC (permalink / raw)
  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

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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc: Fix assmption of end_of_DRAM() returns end address
  2012-06-06  5:30       ` Benjamin Herrenschmidt
  2012-06-06 13:14         ` Andrea Arcangeli
@ 2012-06-06 16:03         ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2012-06-06 16:03 UTC (permalink / raw)
  To: benh; +Cc: R65777, aarcange, linuxppc-dev, linux-kernel, galak, linux-mm

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: Wed, 06 Jun 2012 15:30:17 +1000

> 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
> unless Dave has more stamina than I have today, I'm ok with the patch.

I'm definitely without the samina to fight something like this right now :)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-06 16:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1338904504-2750-1-git-send-email-bharat.bhushan@freescale.com>
     [not found] ` <1338934659.7150.113.camel@pasglop>
     [not found]   ` <20120605.152058.828742127223799137.davem@davemloft.net>
2012-06-06  0:46     ` [PATCH] powerpc: Fix assmption of end_of_DRAM() returns end address Bhushan Bharat-R65777
2012-06-06  5:30       ` Benjamin Herrenschmidt
2012-06-06 13:14         ` Andrea Arcangeli
2012-06-06 16:03         ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).