Hi Russell, > -----Original Message----- > From: Russell King - ARM Linux [mailto:linux@xxxxxxxxxxxxxxxx] > Sent: Wednesday, September 09, 2009 12:47 PM > To: Syed Mohammed, Khasim > Cc: Aguirre Rodriguez, Sergio Alberto; Rabin Vincent; linux-arm- > kernel@xxxxxxxxxxxxxxxxxxxxxx; linux-omap@xxxxxxxxxxxxxxx > Subject: Re: Exception while handling MEM Hole on OMAP3 / ARM Cortex A8 > > On Wed, Sep 09, 2009 at 10:12:48AM +0530, Syed Mohammed, Khasim wrote: > > Hello all, > > > > > -----Original Message----- > > > From: Aguirre Rodriguez, Sergio Alberto > > > Sent: Wednesday, September 09, 2009 7:35 AM > > > To: Russell King - ARM Linux; Rabin Vincent > > > Cc: Syed Mohammed, Khasim; linux-arm-kernel@xxxxxxxxxxxxxxxxxxxxxx; > linux- > > > omap@xxxxxxxxxxxxxxx > > > Subject: RE: Exception while handling MEM Hole on OMAP3 / ARM Cortex A8 > > > > > > From: Russell King - ARM Linux [linux@xxxxxxxxxxxxxxxx] > > > Sent: Tuesday, September 08, 2009 11:23 PM > > > > > > > > > > Acks and tested-bys would be useful please. > > > > > > > > Haven't heard anything, so I've committed it as is. It is my intention > > > > to push it to Linus as is in the next couple of days. > > > > > > Russell, > > > > > > I don't have ways of testing this, but I think Khasim's testing will make > > > more sense, > > > since he reported the bug... anyways, it's probably too late. > > > > > I am really sorry, wanted to try this out when RMK returns from vacation > meanwhile forgot :( > > > > The below logic from Rabin works great !!! no issues with this as well. > > And how about my revised version, which is the version which is going > to be merged? Sorry for missing this out. This works, no issues reported. +int pfn_valid(unsigned long pfn) +{ + struct meminfo *mi = &meminfo; + unsigned int left = 0, right = mi->nr_banks; + + do { + unsigned int mid = (right + left) / 2; + struct membank *bank = &mi->bank[mid]; + + if (pfn < bank_pfn_start(bank)) + right = mid; + else if (pfn >= bank_pfn_end(bank)) + left = mid + 1; + else + return 1; + } while (left < right); + return 0; +} Thanks. Regards, Khasim -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html