WSL2-Linux-Kernel/arch/powerpc/platforms/powermac
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
..
Kconfig powerpc: Remove CONFIG_POWER4 2014-07-28 14:10:26 +10:00
Makefile cpufreq: powerpc: move cpufreq driver to drivers/cpufreq 2013-06-07 13:44:39 +02:00
backlight.c powerpc: add export.h to files making use of EXPORT_SYMBOL 2011-10-31 19:30:37 -04:00
bootx_init.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
cache.S
feature.c The branch contains the following device tree changes the v3.17 merge 2014-08-14 09:53:39 -06:00
low_i2c.c tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
nvram.c powerpc: Remove more traces of bootmem 2014-11-19 21:41:51 +11:00
pci.c powerpc: Remove superfluous bootmem includes 2014-11-10 09:59:26 +11:00
pfunc_base.c powerpc: add explicit OF includes 2013-10-09 20:04:11 -05:00
pfunc_core.c powerpc: Delete non-required instances of include <linux/init.h> 2014-01-15 13:46:44 +11:00
pic.c of/irq: Replace of_irq with of_phandle_args 2013-10-24 11:42:51 +01:00
pmac.h powerpc/psurge: Create a irq_host for secondary cpus 2011-05-19 15:31:51 +10:00
setup.c powerpc: Convert power off logic to pm_power_off 2014-11-03 12:12:51 +11:00
sleep.S powerpc/mm: Introduce MMU features 2008-12-21 14:21:16 +11:00
smp.c of: Migrate of_find_node_by_name() users to for_each_node_by_name() 2014-06-26 17:12:24 +01:00
time.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
udbg_adb.c of: Migrate of_find_node_by_name() users to for_each_node_by_name() 2014-06-26 17:12:24 +01:00
udbg_scc.c of: add 'of_' prefix to machine_is_compatible() 2010-02-09 08:33:00 -07:00