arm: remove support for non-standard memory tags
In older versions, there were memory tags that represented
memory which could be hotplugged, memory which could be
put into self-refresh and memory which could be reclaimed
from OSBL. The last of these was never implemented and
due to a re-architecting of the way DMM determines which
memory can be hotplugged, the other two tags are no longer necessary.
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
Conflicts:
arch/arm/mm/init.c
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index 950665d..7ef3a30 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -37,15 +37,6 @@
/* it is allowed to have multiple ATAG_MEM nodes */
#define ATAG_MEM 0x54410002
-/* it is allowed to have multiple ATAG_MEM_RESERVED nodes */
-/* these indicate places where hotpluggable memory is present */
-/* which are not active during boot */
-#define ATAG_MEM_RESERVED 0x5441000A
-/* it is allowed to have multiple ATAG_MEM_LOW_POWER nodes */
-/* these indicate memory which can be put in a low power state */
-#define ATAG_MEM_LOW_POWER 0x5441000B
-/* these indicate memory which can be reclaimed from OSBL memory after bootup */
-#define ATAG_MEM_OSBL 0x5441000C
struct tag_mem32 {
__u32 size;
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 6b1ee83..9705e8c 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -29,9 +29,6 @@
#include <linux/fs.h>
#include <linux/proc_fs.h>
#include <linux/memblock.h>
-#ifdef CONFIG_MEMORY_HOTPLUG
-#include <linux/memory_hotplug.h>
-#endif
#include <asm/unified.h>
#include <asm/cpu.h>
@@ -522,62 +519,6 @@
}
early_param("mem", early_mem);
-#ifdef CONFIG_MEMORY_HOTPLUG
-static void __init early_mem_reserved(char **p)
-{
- unsigned int start;
- unsigned int size;
- unsigned int end;
- unsigned int h_end;
-
- start = PHYS_OFFSET;
- size = memparse(*p, p);
- if (**p == '@')
- start = memparse(*p + 1, p);
-
- if (movable_reserved_start) {
- end = start + size;
- h_end = movable_reserved_start + movable_reserved_size;
- end = max(end, h_end);
- movable_reserved_start = min(movable_reserved_start,
- (unsigned long)start);
- movable_reserved_size = end - movable_reserved_start;
- } else {
- movable_reserved_start = start;
- movable_reserved_size = size;
- }
-}
-__early_param("mem_reserved=", early_mem_reserved);
-
-static void __init early_mem_low_power(char **p)
-{
- unsigned int start;
- unsigned int size;
- unsigned int end;
- unsigned int h_end;
-
- start = PHYS_OFFSET;
- size = memparse(*p, p);
- if (**p == '@')
- start = memparse(*p + 1, p);
-
- if (low_power_memory_start) {
- end = start + size;
- h_end = low_power_memory_start + low_power_memory_size;
- end = max(end, h_end);
- low_power_memory_start = min(low_power_memory_start,
- (unsigned long)start);
- low_power_memory_size = end - low_power_memory_start;
- } else {
- low_power_memory_start = start;
- low_power_memory_size = size;
- }
-
- arm_add_memory(start, size);
-}
-__early_param("mem_low_power=", early_mem_low_power);
-#endif
-
static void __init
setup_ramdisk(int doload, int prompt, int image_start, unsigned int rd_sz)
{
@@ -667,66 +608,6 @@
__tagtable(ATAG_MEM, parse_tag_mem32);
-#ifdef CONFIG_MEMORY_HOTPLUG
-static int __init parse_tag_mem32_reserved(const struct tag *tag)
-{
- unsigned int start;
- unsigned int size;
- unsigned int end;
- unsigned int h_end;
-
- start = tag->u.mem.start;
- size = tag->u.mem.size;
-
- if (movable_reserved_start) {
- end = start + size;
- h_end = movable_reserved_start + movable_reserved_size;
- end = max(end, h_end);
- movable_reserved_start = min(movable_reserved_start,
- (unsigned long)start);
- movable_reserved_size = end - movable_reserved_start;
- } else {
- movable_reserved_start = tag->u.mem.start;
- movable_reserved_size = tag->u.mem.size;
- }
- printk(KERN_ALERT "reserved %lx at %lx for hotplug\n",
- movable_reserved_size, movable_reserved_start);
-
- return 0;
-}
-
-__tagtable(ATAG_MEM_RESERVED, parse_tag_mem32_reserved);
-
-static int __init parse_tag_mem32_low_power(const struct tag *tag)
-{
- unsigned int start;
- unsigned int size;
- unsigned int end;
- unsigned int h_end;
-
- start = tag->u.mem.start;
- size = tag->u.mem.size;
-
- if (low_power_memory_start) {
- end = start + size;
- h_end = low_power_memory_start + low_power_memory_size;
- end = max(end, h_end);
- low_power_memory_start = min(low_power_memory_start,
- (unsigned long)start);
- low_power_memory_size = end - low_power_memory_start;
- } else {
- low_power_memory_start = tag->u.mem.start;
- low_power_memory_size = tag->u.mem.size;
- }
- printk(KERN_ALERT "low power memory %lx at %lx\n",
- low_power_memory_size, low_power_memory_start);
-
- return arm_add_memory(tag->u.mem.start, tag->u.mem.size);
-}
-
-__tagtable(ATAG_MEM_LOW_POWER, parse_tag_mem32_low_power);
-#endif
-
#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
struct screen_info screen_info = {
.orig_video_lines = 30,
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 9afb93a..39fa7f4 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -20,9 +20,6 @@
#include <linux/gfp.h>
#include <linux/memblock.h>
#include <linux/sort.h>
-#ifdef CONFIG_MEMORY_HOTPLUG
-#include <linux/memory_hotplug.h>
-#endif
#include <asm/mach-types.h>
#include <asm/prom.h>
@@ -387,24 +384,6 @@
EXPORT_SYMBOL(_early_pfn_valid);
#endif
-#ifdef CONFIG_MEMORY_HOTPLUG
-static void map_reserved_memory(void)
-{
- struct map_desc map;
-
- map.pfn = (movable_reserved_start >> PAGE_SHIFT);
- map.virtual = __phys_to_virt(movable_reserved_start);
- map.length = movable_reserved_size;
-#ifdef CONFIG_STRICT_MEMORY_RWX
- map.type = MT_MEMORY_RW;
-#else
- map.type = MT_MEMORY;
-#endif
-
- create_mapping(&map);
-}
-#endif
-
void __init bootmem_init(void)
{
unsigned long min, max_low, max_high;
@@ -433,13 +412,6 @@
*/
arm_bootmem_free(min, max_low, max_high);
-#ifdef CONFIG_MEMORY_HOTPLUG
- if (movable_reserved_size) {
- max_low = (movable_reserved_start + movable_reserved_size)
- >> PAGE_SHIFT;
- map_reserved_memory();
- }
-#endif
high_memory = __va(((phys_addr_t)max_low << PAGE_SHIFT) - 1) + 1;
/*