linux/arch
Russell King a1af0fbbba ARM: OMAP: Cleanup OMAP FB SDRAM reservation
The logic in this file is rather convoluted, but essentially:

1. region type 0 is SDRAM
2. referring to the code fragment
                if (set_fbmem_region_type(&rg, OMAPFB_MEMTYPE_SDRAM,
                                          sdram_start, sdram_size) < 0 ||
                    (rg.type != OMAPFB_MEMTYPE_SDRAM))
                        continue;
   - if rg.type is not OMAPFB_MEMTYPE_SDRAM, set_fbmem_region_type()
     returns zero immediately (since rg.type is non-zero), and so we
     'continue'.
   - if rg.type is OMAPFB_MEMTYPE_SDRAM, and rg.paddr is zero,
     we fall through.
   - if rg.type is OMAPFB_MEMTYPE_SDRAM, and the region lies within
     SDRAM, we fall through.
   - if rg.type is OMAPFB_MEMTYPE_SDRAM, and the region is not within
     SDRAM, we 'continue'.
3. check_fbmem_region seems unnecessary.
   - we know rg.type is OMAPFB_MEMTYPE_SDRAM
   - we can check rg.size independently
   - bootmem_reserve() can check for overlapping reservations itself
   - we've already validated that the requested region lies within SDRAM.
4. avoid BUG()ing if the region entry is already set; print an error,
   and mark the configuration invalid - at least we'll continue booting
   so the error message has a chance of being logged/visible via serial
   console.

With these changes in place, it makes the code much easier to understand
and hence easier to convert to LMB.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-16 11:06:41 +01:00
..
alpha alpha: Detect Super IO chip, no IDE on Avanti, enable EPP19 2010-06-15 14:19:08 -04:00
arm ARM: OMAP: Cleanup OMAP FB SDRAM reservation 2010-07-16 11:06:41 +01:00
avr32 avr32: use asm-generic/scatterlist.h 2010-05-27 09:12:54 -07:00
blackfin blackfin: use use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
cris Merge branch 'for-linus' of git://www.jni.nu/cris 2010-06-01 08:51:25 -07:00
frv FRV: Reinstate null behaviour for the GDB remote protocol 'p' command 2010-06-09 12:42:44 -07:00
h8300 Merge branch 'for-35' of git://repo.or.cz/linux-kbuild 2010-06-01 08:55:52 -07:00
ia64 [IA64] Fix spinaphore down_spin() 2010-06-30 10:46:16 -07:00
m32r m32r: invoke oom-killer from page fault 2010-06-04 15:21:44 -07:00
m68k Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2010-05-27 10:19:19 -07:00
m68knommu Merge branch 'for-35' of git://repo.or.cz/linux-kbuild 2010-06-01 08:55:52 -07:00
microblaze lmb: rename to memblock 2010-07-14 17:14:00 +10:00
mips MIPS: Return after handling coprocessor 2 exception 2010-07-05 17:17:33 +01:00
mn10300 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2010-06-11 14:15:44 -07:00
parisc Merge branch 'for-35' of git://repo.or.cz/linux-kbuild 2010-06-01 08:55:52 -07:00
powerpc Merge branch 'lmb-to-memblock' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2010-07-14 17:27:44 -07:00
s390 [S390] Update default configuration. 2010-06-08 18:58:23 +02:00
score asm-generic: remove ISA_DMA_THRESHOLD in scatterlist.h 2010-05-27 09:12:54 -07:00
sh lmb: rename to memblock 2010-07-14 17:14:00 +10:00
sparc lmb: rename to memblock 2010-07-14 17:14:00 +10:00
um um: os-linux/mem.c needs sys/stat.h 2010-06-29 15:29:32 -07:00
x86 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-07-13 17:31:11 -07:00
xtensa xtensa: invoke oom-killer from page fault 2010-06-04 15:21:44 -07:00
.gitignore
Kconfig