diff options
Diffstat (limited to 'mm/page_alloc.c')
| -rw-r--r-- | mm/page_alloc.c | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index fe753ecf2aa5..474c7e9dd51a 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
| @@ -149,10 +149,6 @@ static unsigned long __meminitdata dma_reserve; | |||
| 149 | static int __meminitdata nr_nodemap_entries; | 149 | static int __meminitdata nr_nodemap_entries; |
| 150 | static unsigned long __meminitdata arch_zone_lowest_possible_pfn[MAX_NR_ZONES]; | 150 | static unsigned long __meminitdata arch_zone_lowest_possible_pfn[MAX_NR_ZONES]; |
| 151 | static unsigned long __meminitdata arch_zone_highest_possible_pfn[MAX_NR_ZONES]; | 151 | static unsigned long __meminitdata arch_zone_highest_possible_pfn[MAX_NR_ZONES]; |
| 152 | #ifdef CONFIG_MEMORY_HOTPLUG_RESERVE | ||
| 153 | static unsigned long __meminitdata node_boundary_start_pfn[MAX_NUMNODES]; | ||
| 154 | static unsigned long __meminitdata node_boundary_end_pfn[MAX_NUMNODES]; | ||
| 155 | #endif /* CONFIG_MEMORY_HOTPLUG_RESERVE */ | ||
| 156 | static unsigned long __initdata required_kernelcore; | 152 | static unsigned long __initdata required_kernelcore; |
| 157 | static unsigned long __initdata required_movablecore; | 153 | static unsigned long __initdata required_movablecore; |
| 158 | static unsigned long __meminitdata zone_movable_pfn[MAX_NUMNODES]; | 154 | static unsigned long __meminitdata zone_movable_pfn[MAX_NUMNODES]; |
| @@ -3103,64 +3099,6 @@ void __init sparse_memory_present_with_active_regions(int nid) | |||
| 3103 | } | 3099 | } |
| 3104 | 3100 | ||
| 3105 | /** | 3101 | /** |
| 3106 | * push_node_boundaries - Push node boundaries to at least the requested boundary | ||
| 3107 | * @nid: The nid of the node to push the boundary for | ||
| 3108 | * @start_pfn: The start pfn of the node | ||
| 3109 | * @end_pfn: The end pfn of the node | ||
| 3110 | * | ||
| 3111 | * In reserve-based hot-add, mem_map is allocated that is unused until hotadd | ||
| 3112 | * time. Specifically, on x86_64, SRAT will report ranges that can potentially | ||
| 3113 | * be hotplugged even though no physical memory exists. This function allows | ||
| 3114 | * an arch to push out the node boundaries so mem_map is allocated that can | ||
| 3115 | * be used later. | ||
| 3116 | */ | ||
| 3117 | #ifdef CONFIG_MEMORY_HOTPLUG_RESERVE | ||
| 3118 | void __init push_node_boundaries(unsigned int nid, | ||
| 3119 | unsigned long start_pfn, unsigned long end_pfn) | ||
| 3120 | { | ||
| 3121 | mminit_dprintk(MMINIT_TRACE, "zoneboundary", | ||
| 3122 | "Entering push_node_boundaries(%u, %lu, %lu)\n", | ||
| 3123 | nid, start_pfn, end_pfn); | ||
| 3124 | |||
| 3125 | /* Initialise the boundary for this node if necessary */ | ||
| 3126 | if (node_boundary_end_pfn[nid] == 0) | ||
| 3127 | node_boundary_start_pfn[nid] = -1UL; | ||
| 3128 | |||
| 3129 | /* Update the boundaries */ | ||
| 3130 | if (node_boundary_start_pfn[nid] > start_pfn) | ||
| 3131 | node_boundary_start_pfn[nid] = start_pfn; | ||
| 3132 | if (node_boundary_end_pfn[nid] < end_pfn) | ||
| 3133 | node_boundary_end_pfn[nid] = end_pfn; | ||
| 3134 | } | ||
| 3135 | |||
| 3136 | /* If necessary, push the node boundary out for reserve hotadd */ | ||
| 3137 | static void __meminit account_node_boundary(unsigned int nid, | ||
| 3138 | unsigned long *start_pfn, unsigned long *end_pfn) | ||
| 3139 | { | ||
| 3140 | mminit_dprintk(MMINIT_TRACE, "zoneboundary", | ||
| 3141 | "Entering account_node_boundary(%u, %lu, %lu)\n", | ||
| 3142 | nid, *start_pfn, *end_pfn); | ||
| 3143 | |||
| 3144 | /* Return if boundary information has not been provided */ | ||
| 3145 | if (node_boundary_end_pfn[nid] == 0) | ||
| 3146 | return; | ||
| 3147 | |||
| 3148 | /* Check the boundaries and update if necessary */ | ||
| 3149 | if (node_boundary_start_pfn[nid] < *start_pfn) | ||
| 3150 | *start_pfn = node_boundary_start_pfn[nid]; | ||
| 3151 | if (node_boundary_end_pfn[nid] > *end_pfn) | ||
| 3152 | *end_pfn = node_boundary_end_pfn[nid]; | ||
| 3153 | } | ||
| 3154 | #else | ||
| 3155 | void __init push_node_boundaries(unsigned int nid, | ||
| 3156 | unsigned long start_pfn, unsigned long end_pfn) {} | ||
| 3157 | |||
| 3158 | static void __meminit account_node_boundary(unsigned int nid, | ||
| 3159 | unsigned long *start_pfn, unsigned long *end_pfn) {} | ||
| 3160 | #endif | ||
| 3161 | |||
| 3162 | |||
| 3163 | /** | ||
| 3164 | * get_pfn_range_for_nid - Return the start and end page frames for a node | 3102 | * get_pfn_range_for_nid - Return the start and end page frames for a node |
| 3165 | * @nid: The nid to return the range for. If MAX_NUMNODES, the min and max PFN are returned. | 3103 | * @nid: The nid to return the range for. If MAX_NUMNODES, the min and max PFN are returned. |
| 3166 | * @start_pfn: Passed by reference. On return, it will have the node start_pfn. | 3104 | * @start_pfn: Passed by reference. On return, it will have the node start_pfn. |
| @@ -3185,9 +3123,6 @@ void __meminit get_pfn_range_for_nid(unsigned int nid, | |||
| 3185 | 3123 | ||
| 3186 | if (*start_pfn == -1UL) | 3124 | if (*start_pfn == -1UL) |
| 3187 | *start_pfn = 0; | 3125 | *start_pfn = 0; |
| 3188 | |||
| 3189 | /* Push the node boundaries out if requested */ | ||
| 3190 | account_node_boundary(nid, start_pfn, end_pfn); | ||
| 3191 | } | 3126 | } |
| 3192 | 3127 | ||
| 3193 | /* | 3128 | /* |
| @@ -3793,10 +3728,6 @@ void __init remove_all_active_ranges(void) | |||
| 3793 | { | 3728 | { |
| 3794 | memset(early_node_map, 0, sizeof(early_node_map)); | 3729 | memset(early_node_map, 0, sizeof(early_node_map)); |
| 3795 | nr_nodemap_entries = 0; | 3730 | nr_nodemap_entries = 0; |
| 3796 | #ifdef CONFIG_MEMORY_HOTPLUG_RESERVE | ||
| 3797 | memset(node_boundary_start_pfn, 0, sizeof(node_boundary_start_pfn)); | ||
| 3798 | memset(node_boundary_end_pfn, 0, sizeof(node_boundary_end_pfn)); | ||
| 3799 | #endif /* CONFIG_MEMORY_HOTPLUG_RESERVE */ | ||
| 3800 | } | 3731 | } |
| 3801 | 3732 | ||
| 3802 | /* Compare two active node_active_regions */ | 3733 | /* Compare two active node_active_regions */ |
