lmb: rename to memblock

via following scripts

      FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')

      sed -i \
        -e 's/lmb/memblock/g' \
        -e 's/LMB/MEMBLOCK/g' \
        $FILES

      for N in $(find . -name lmb.[ch]); do
        M=$(echo $N | sed 's/lmb/memblock/g')
        mv $N $M
      done

and remove some wrong change like lmbench and dlmb etc.

also move memblock.c from lib/ to mm/

Suggested-by: Ingo Molnar <mingo@elte.hu>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Yinghai Lu
2010-07-12 14:36:09 +10:00
committed by Benjamin Herrenschmidt
parent 1c5474a65b
commit 95f72d1ed4
72 changed files with 1025 additions and 1025 deletions

View File

@@ -4,7 +4,7 @@
*/
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/lmb.h>
#include <linux/memblock.h>
#include <linux/log2.h>
#include <linux/list.h>
#include <linux/slab.h>
@@ -86,7 +86,7 @@ static void mdesc_handle_init(struct mdesc_handle *hp,
hp->handle_size = handle_size;
}
static struct mdesc_handle * __init mdesc_lmb_alloc(unsigned int mdesc_size)
static struct mdesc_handle * __init mdesc_memblock_alloc(unsigned int mdesc_size)
{
unsigned int handle_size, alloc_size;
struct mdesc_handle *hp;
@@ -97,7 +97,7 @@ static struct mdesc_handle * __init mdesc_lmb_alloc(unsigned int mdesc_size)
mdesc_size);
alloc_size = PAGE_ALIGN(handle_size);
paddr = lmb_alloc(alloc_size, PAGE_SIZE);
paddr = memblock_alloc(alloc_size, PAGE_SIZE);
hp = NULL;
if (paddr) {
@@ -107,7 +107,7 @@ static struct mdesc_handle * __init mdesc_lmb_alloc(unsigned int mdesc_size)
return hp;
}
static void mdesc_lmb_free(struct mdesc_handle *hp)
static void mdesc_memblock_free(struct mdesc_handle *hp)
{
unsigned int alloc_size;
unsigned long start;
@@ -120,9 +120,9 @@ static void mdesc_lmb_free(struct mdesc_handle *hp)
free_bootmem_late(start, alloc_size);
}
static struct mdesc_mem_ops lmb_mdesc_ops = {
.alloc = mdesc_lmb_alloc,
.free = mdesc_lmb_free,
static struct mdesc_mem_ops memblock_mdesc_ops = {
.alloc = mdesc_memblock_alloc,
.free = mdesc_memblock_free,
};
static struct mdesc_handle *mdesc_kmalloc(unsigned int mdesc_size)
@@ -914,7 +914,7 @@ void __init sun4v_mdesc_init(void)
printk("MDESC: Size is %lu bytes.\n", len);
hp = mdesc_alloc(len, &lmb_mdesc_ops);
hp = mdesc_alloc(len, &memblock_mdesc_ops);
if (hp == NULL) {
prom_printf("MDESC: alloc of %lu bytes failed.\n", len);
prom_halt();

View File

@@ -20,7 +20,7 @@
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/lmb.h>
#include <linux/memblock.h>
#include <linux/of_device.h>
#include <asm/prom.h>
@@ -34,7 +34,7 @@
void * __init prom_early_alloc(unsigned long size)
{
unsigned long paddr = lmb_alloc(size, SMP_CACHE_BYTES);
unsigned long paddr = memblock_alloc(size, SMP_CACHE_BYTES);
void *ret;
if (!paddr) {