pandora-kernel.git
15 years agoARM: OMAP: Convert OMAPFB and VRAM SDRAM reservation to LMB
Russell King [Mon, 5 Jul 2010 14:05:02 +0000 (17:05 +0300)]
ARM: OMAP: Convert OMAPFB and VRAM SDRAM reservation to LMB

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoARM: Convert platform reservations to use LMB rather than bootmem
Russell King [Mon, 5 Jul 2010 14:05:02 +0000 (17:05 +0300)]
ARM: Convert platform reservations to use LMB rather than bootmem

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoARM: initial LMB trial
Russell King [Mon, 5 Jul 2010 14:05:01 +0000 (17:05 +0300)]
ARM: initial LMB trial

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoARM: OMAP: Convert to use ->reserve method to reserve boot time memory
Russell King [Mon, 5 Jul 2010 14:05:01 +0000 (17:05 +0300)]
ARM: OMAP: Convert to use ->reserve method to reserve boot time memory

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoARM: OMAP: Cleanup OMAP FB SDRAM reservation
Russell King [Mon, 5 Jul 2010 14:05:01 +0000 (17:05 +0300)]
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>
15 years agoARM: Move platform memory reservations out of generic code
Russell King [Mon, 5 Jul 2010 14:05:01 +0000 (17:05 +0300)]
ARM: Move platform memory reservations out of generic code

Move the platform specific bootmem memory reservations out of
arch/arm/mm/mmu.c into their respective platform files.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoARM: Remove 'node' argument form arch_adjust_zones()
Russell King [Mon, 5 Jul 2010 14:05:00 +0000 (17:05 +0300)]
ARM: Remove 'node' argument form arch_adjust_zones()

Since we no longer support discontigmem, node is always zero, so
remove this argument.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoARM: Remove DISCONTIGMEM support
Russell King [Mon, 5 Jul 2010 14:05:00 +0000 (17:05 +0300)]
ARM: Remove DISCONTIGMEM support

Everything should now be using sparsemem rather than discontigmem, so
remove the code supporting discontigmem from ARM.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>