linux/arch/powerpc/platforms/ps3
Michael Ellerman e39f223fc9 powerpc: Remove more traces of bootmem
Although we are now selecting NO_BOOTMEM, we still have some traces of
bootmem lying around. That is because even with NO_BOOTMEM there is
still a shim that converts bootmem calls into memblock calls, but
ultimately we want to remove all traces of bootmem.

Most of the patch is conversions from alloc_bootmem() to
memblock_virt_alloc(). In general a call such as:

  p = (struct foo *)alloc_bootmem(x);

Becomes:

  p = memblock_virt_alloc(x, 0);

We don't need the cast because memblock_virt_alloc() returns a void *.
The alignment value of zero tells memblock to use the default alignment,
which is SMP_CACHE_BYTES, the same value alloc_bootmem() uses.

We remove a number of NULL checks on the result of
memblock_virt_alloc(). That is because memblock_virt_alloc() will panic
if it can't allocate, in exactly the same way as alloc_bootmem(), so the
NULL checks are and always have been redundant.

The memory returned by memblock_virt_alloc() is already zeroed, so we
remove several memsets of the result of memblock_virt_alloc().

Finally we convert a few uses of __alloc_bootmem(x, y, MAX_DMA_ADDRESS)
to just plain memblock_virt_alloc(). We don't use memblock_alloc_base()
because MAX_DMA_ADDRESS is ~0ul on powerpc, so limiting the allocation
to that is pointless, 16XB ought to be enough for anyone.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-11-19 21:41:51 +11:00
..
device-init.c powerpc/irq: Remove IRQF_DISABLED 2011-11-08 14:51:46 +11:00
exports.c powerpc: remove non-required uses of include <linux/module.h> 2011-10-31 19:30:44 -04:00
gelic_udbg.c powerpc/ps3: Add gelic udbg driver 2011-09-20 09:20:05 +10:00
htab.c powerpc/mm: handle hugepage size correctly when invalidating hpte entries 2013-06-21 16:01:52 +10:00
hvcall.S
interrupt.c powerpc: Replace __get_cpu_var uses 2014-11-03 12:12:32 +11:00
Kconfig usb: host: remove selects of USB_ARCH_HAS_?HCI 2014-02-18 12:36:38 -08:00
Makefile powerpc/ps3: Add gelic udbg driver 2011-09-20 09:20:05 +10:00
mm.c powerpc/ps3: Add highmem region memory early 2012-04-24 15:34:18 -07:00
os-area.c powerpc+of: Rename the drivers/of prom_* functions to of_* 2012-11-15 12:56:52 +11:00
platform.h powerpc/ps3: Add highmem repository read routines 2012-04-24 15:34:17 -07:00
repository.c POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
setup.c powerpc: Remove more traces of bootmem 2014-11-19 21:41:51 +11:00
smp.c powerpc: Implement tick broadcast IPI as a fixed IPI message 2014-03-05 15:55:04 +11:00
spu.c powerpc/ps3: Remove inline marking of EXPORT_SYMBOL functions 2013-12-02 14:06:53 +11:00
system-bus.c PowerPC: adapt for dma_map_ops changes 2012-03-28 16:36:33 +02:00
time.c PTR_RET is now PTR_ERR_OR_ZERO(): Replace most. 2013-07-15 11:25:01 +09:30