Merge branch 'akpm' (patches from Andrew)
[linux-2.6-microblaze.git] / arch / powerpc / platforms / pseries / hotplug-memory.c
index ef5c24b..91cf234 100644 (file)
@@ -180,6 +180,8 @@ static int update_lmb_associativity_index(struct drmem_lmb *lmb)
                return -ENODEV;
        }
 
+       update_numa_distance(lmb_node);
+
        dr_node = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");
        if (!dr_node) {
                dlpar_free_cc_nodes(lmb_node);
@@ -211,13 +213,11 @@ static int update_lmb_associativity_index(struct drmem_lmb *lmb)
 static struct memory_block *lmb_to_memblock(struct drmem_lmb *lmb)
 {
        unsigned long section_nr;
-       struct mem_section *mem_sect;
        struct memory_block *mem_block;
 
        section_nr = pfn_to_section_nr(PFN_DOWN(lmb->base_addr));
-       mem_sect = __nr_to_section(section_nr);
 
-       mem_block = find_memory_block(mem_sect);
+       mem_block = find_memory_block(section_nr);
        return mem_block;
 }
 
@@ -978,6 +978,10 @@ static int pseries_memory_notifier(struct notifier_block *nb,
        case OF_RECONFIG_DETACH_NODE:
                err = pseries_remove_mem_node(rd->dn);
                break;
+       case OF_RECONFIG_UPDATE_PROPERTY:
+               if (!strcmp(rd->dn->name,
+                           "ibm,dynamic-reconfiguration-memory"))
+                       drmem_update_lmbs(rd->prop);
        }
        return notifier_from_errno(err);
 }