]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - mm/memory_hotplug.c
x86/cpu: Make alternative_msr_write work for 32-bit code
[mirror_ubuntu-artful-kernel.git] / mm / memory_hotplug.c
index a4724e7c4b20f4e714932cd8b7fe6e703641b8b1..c1f9677af3bc6290d4d5c11b8040950f31cf5474 100644 (file)
@@ -883,23 +883,6 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages,
        return 0;
 }
 
-#ifdef CONFIG_MOVABLE_NODE
-/*
- * When CONFIG_MOVABLE_NODE, we permit onlining of a node which doesn't have
- * normal memory.
- */
-static bool can_online_high_movable(int nid)
-{
-       return true;
-}
-#else /* CONFIG_MOVABLE_NODE */
-/* ensure every online node has NORMAL memory */
-static bool can_online_high_movable(int nid)
-{
-       return node_state(nid, N_NORMAL_MEMORY);
-}
-#endif /* CONFIG_MOVABLE_NODE */
-
 /* check which state of node_states will be changed when online memory */
 static void node_states_check_changes_online(unsigned long nr_pages,
        struct zone *zone, struct memory_notify *arg)
@@ -1021,18 +1004,6 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ
        struct memory_notify arg;
        int zone_shift = 0;
 
-       /*
-        * This doesn't need a lock to do pfn_to_page().
-        * The section can't be removed here because of the
-        * memory_block->state_mutex.
-        */
-       zone = page_zone(pfn_to_page(pfn));
-
-       if ((zone_idx(zone) > ZONE_NORMAL ||
-           online_type == MMOP_ONLINE_MOVABLE) &&
-           !can_online_high_movable(pfn_to_nid(pfn)))
-               return -EINVAL;
-
        if (online_type == MMOP_ONLINE_KERNEL) {
                if (!zone_can_shift(pfn, nr_pages, ZONE_NORMAL, &zone_shift))
                        return -EINVAL;
@@ -1323,7 +1294,7 @@ int __ref add_memory_resource(int nid, struct resource *res, bool online)
        }
 
        /* call arch's memory hotadd */
-       ret = arch_add_memory(nid, start, size, true);
+       ret = arch_add_memory(nid, start, size, false);
 
        if (ret < 0)
                goto error;