diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-07-12 00:36:09 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-14 03:14:00 -0400 |
commit | 95f72d1ed41a66f1c1c29c24d479de81a0bea36f (patch) | |
tree | bd92b3804ff0bea083d69af0ede52f99ab34c0af /arch/sparc/kernel/mdesc.c | |
parent | 1c5474a65bf15a4cb162dfff86d6d0b5a08a740c (diff) |
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>
Diffstat (limited to 'arch/sparc/kernel/mdesc.c')
-rw-r--r-- | arch/sparc/kernel/mdesc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c index cdc91d919e93..83e85c2e802a 100644 --- a/arch/sparc/kernel/mdesc.c +++ b/arch/sparc/kernel/mdesc.c | |||
@@ -4,7 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/lmb.h> | 7 | #include <linux/memblock.h> |
8 | #include <linux/log2.h> | 8 | #include <linux/log2.h> |
9 | #include <linux/list.h> | 9 | #include <linux/list.h> |
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
@@ -86,7 +86,7 @@ static void mdesc_handle_init(struct mdesc_handle *hp, | |||
86 | hp->handle_size = handle_size; | 86 | hp->handle_size = handle_size; |
87 | } | 87 | } |
88 | 88 | ||
89 | static struct mdesc_handle * __init mdesc_lmb_alloc(unsigned int mdesc_size) | 89 | static struct mdesc_handle * __init mdesc_memblock_alloc(unsigned int mdesc_size) |
90 | { | 90 | { |
91 | unsigned int handle_size, alloc_size; | 91 | unsigned int handle_size, alloc_size; |
92 | struct mdesc_handle *hp; | 92 | struct mdesc_handle *hp; |
@@ -97,7 +97,7 @@ static struct mdesc_handle * __init mdesc_lmb_alloc(unsigned int mdesc_size) | |||
97 | mdesc_size); | 97 | mdesc_size); |
98 | alloc_size = PAGE_ALIGN(handle_size); | 98 | alloc_size = PAGE_ALIGN(handle_size); |
99 | 99 | ||
100 | paddr = lmb_alloc(alloc_size, PAGE_SIZE); | 100 | paddr = memblock_alloc(alloc_size, PAGE_SIZE); |
101 | 101 | ||
102 | hp = NULL; | 102 | hp = NULL; |
103 | if (paddr) { | 103 | if (paddr) { |
@@ -107,7 +107,7 @@ static struct mdesc_handle * __init mdesc_lmb_alloc(unsigned int mdesc_size) | |||
107 | return hp; | 107 | return hp; |
108 | } | 108 | } |
109 | 109 | ||
110 | static void mdesc_lmb_free(struct mdesc_handle *hp) | 110 | static void mdesc_memblock_free(struct mdesc_handle *hp) |
111 | { | 111 | { |
112 | unsigned int alloc_size; | 112 | unsigned int alloc_size; |
113 | unsigned long start; | 113 | unsigned long start; |
@@ -120,9 +120,9 @@ static void mdesc_lmb_free(struct mdesc_handle *hp) | |||
120 | free_bootmem_late(start, alloc_size); | 120 | free_bootmem_late(start, alloc_size); |
121 | } | 121 | } |
122 | 122 | ||
123 | static struct mdesc_mem_ops lmb_mdesc_ops = { | 123 | static struct mdesc_mem_ops memblock_mdesc_ops = { |
124 | .alloc = mdesc_lmb_alloc, | 124 | .alloc = mdesc_memblock_alloc, |
125 | .free = mdesc_lmb_free, | 125 | .free = mdesc_memblock_free, |
126 | }; | 126 | }; |
127 | 127 | ||
128 | static struct mdesc_handle *mdesc_kmalloc(unsigned int mdesc_size) | 128 | static struct mdesc_handle *mdesc_kmalloc(unsigned int mdesc_size) |
@@ -914,7 +914,7 @@ void __init sun4v_mdesc_init(void) | |||
914 | 914 | ||
915 | printk("MDESC: Size is %lu bytes.\n", len); | 915 | printk("MDESC: Size is %lu bytes.\n", len); |
916 | 916 | ||
917 | hp = mdesc_alloc(len, &lmb_mdesc_ops); | 917 | hp = mdesc_alloc(len, &memblock_mdesc_ops); |
918 | if (hp == NULL) { | 918 | if (hp == NULL) { |
919 | prom_printf("MDESC: alloc of %lu bytes failed.\n", len); | 919 | prom_printf("MDESC: alloc of %lu bytes failed.\n", len); |
920 | prom_halt(); | 920 | prom_halt(); |