On Sat, Aug 15, 2009 at 07:17:11PM +0100, Russell King - ARM Linux wrote: > +#ifndef CONFIG_SPARSEMEM > +int pfn_valid(unsigned long pfn) > +{ > + struct meminfo *mi = &meminfo; > + unsigned int mid, left = 0, right = mi->nr_banks; > + > + while ((mid = (right - left) / 2) > 0) { > + 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; > + } > + return 0; > +} > +EXPORT_SYMBOL(pfn_valid); > +#endif The above function will ignore the first bank. I don't think that was intended. Rabin -- 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