summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/hotplug-memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/pseries/hotplug-memory.c')
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-memory.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
index 01e7b5b..bc88036 100644
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
+++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -10,14 +10,14 @@
*/
#include <linux/of.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
#include <linux/vmalloc.h>
#include <asm/firmware.h>
#include <asm/machdep.h>
#include <asm/pSeries_reconfig.h>
#include <asm/sparsemem.h>
-static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size)
+static int pseries_remove_memblock(unsigned long base, unsigned int memblock_size)
{
unsigned long start, start_pfn;
struct zone *zone;
@@ -26,7 +26,7 @@ static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size)
start_pfn = base >> PAGE_SHIFT;
if (!pfn_valid(start_pfn)) {
- lmb_remove(base, lmb_size);
+ memblock_remove(base, memblock_size);
return 0;
}
@@ -41,20 +41,20 @@ static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size)
* to sysfs "state" file and we can't remove sysfs entries
* while writing to it. So we have to defer it to here.
*/
- ret = __remove_pages(zone, start_pfn, lmb_size >> PAGE_SHIFT);
+ ret = __remove_pages(zone, start_pfn, memblock_size >> PAGE_SHIFT);
if (ret)
return ret;
/*
* Update memory regions for memory remove
*/
- lmb_remove(base, lmb_size);
+ memblock_remove(base, memblock_size);
/*
* Remove htab bolted mappings for this section of memory
*/
start = (unsigned long)__va(base);
- ret = remove_section_mapping(start, start + lmb_size);
+ ret = remove_section_mapping(start, start + memblock_size);
/* Ensure all vmalloc mappings are flushed in case they also
* hit that section of memory
@@ -80,7 +80,7 @@ static int pseries_remove_memory(struct device_node *np)
return 0;
/*
- * Find the bae address and size of the lmb
+ * Find the bae address and size of the memblock
*/
regs = of_get_property(np, "reg", NULL);
if (!regs)
@@ -89,7 +89,7 @@ static int pseries_remove_memory(struct device_node *np)
base = *(unsigned long *)regs;
lmb_size = regs[3];
- ret = pseries_remove_lmb(base, lmb_size);
+ ret = pseries_remove_memblock(base, lmb_size);
return ret;
}
@@ -109,7 +109,7 @@ static int pseries_add_memory(struct device_node *np)
return 0;
/*
- * Find the base and size of the lmb
+ * Find the base and size of the memblock
*/
regs = of_get_property(np, "reg", NULL);
if (!regs)
@@ -121,7 +121,7 @@ static int pseries_add_memory(struct device_node *np)
/*
* Update memory region to represent the memory add
*/
- ret = lmb_add(base, lmb_size);
+ ret = memblock_add(base, lmb_size);
return (ret < 0) ? -EINVAL : 0;
}
@@ -142,10 +142,10 @@ static int pseries_drconf_memory(unsigned long *base, unsigned int action)
}
if (action == PSERIES_DRCONF_MEM_ADD) {
- rc = lmb_add(*base, *lmb_size);
+ rc = memblock_add(*base, *lmb_size);
rc = (rc < 0) ? -EINVAL : 0;
} else if (action == PSERIES_DRCONF_MEM_REMOVE) {
- rc = pseries_remove_lmb(*base, *lmb_size);
+ rc = pseries_remove_memblock(*base, *lmb_size);
} else {
rc = -EINVAL;
}
OpenPOWER on IntegriCloud