Commit e9849659 authored by Russell King's avatar Russell King

[ARM] Eliminate meminfo 'end' element

Some machines decided to initialise this element.  It's not necessary
since find_memend_and_nodes() initialises this itself.  However,
'end' is not required if we initialise high_memory in this function
rather than waiting until mem_init() is called.
parent 67475a9f
......@@ -31,7 +31,6 @@ fixup_clep7312(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
mi->nr_banks=1;
mi->end = 0xc0FFFFFF;
mi->bank[0].start = 0xc0000000;
mi->bank[0].size = 0x01000000;
mi->bank[0].node = 0;
......
......@@ -34,7 +34,16 @@
extern void clps711x_map_io(void);
extern void clps711x_init_irq(void);
struct meminfo memmap = { 1, 0xC1000000, {{0xC0000000,0x01000000,0}}};
struct meminfo memmap = {
.nr_banks = 1,
.bank = {
{
.start = 0xC0000000,
.size = 0x01000000,
.node = 0
},
},
};
typedef struct tag_IMAGE_PARAMS
{
......@@ -53,9 +62,8 @@ static void __init
fortunet_fixup(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
IMAGE_PARAMS *ip;
ip = (IMAGE_PARAMS *)__phys_to_virt(IMAGE_PARAMS_PHYS);
*cmdline = (char *)__phys_to_virt(ip->command_line);
IMAGE_PARAMS *ip = phys_to_virt(IMAGE_PARAMS_PHYS);
*cmdline = phys_to_virt(ip->command_line);
#ifdef CONFIG_BLK_DEV_INITRD
if(ip->ramdisk_ok)
{
......@@ -64,7 +72,6 @@ fortunet_fixup(struct machine_desc *desc, struct tag *tags,
}
#endif
memmap.bank[0].size = ip->ram_size;
memmap.end = ip->ram_size+0xC0000000;
*mi = memmap;
}
......
......@@ -225,6 +225,8 @@ find_memend_and_nodes(struct meminfo *mi, struct node_info *np)
bootmem_pages += np[i].bootmap_pages;
}
high_memory = __va(memend_pfn << PAGE_SHIFT);
/*
* This doesn't seem to be used by the Linux memory
* manager any more. If we can get rid of it, we
......@@ -232,7 +234,6 @@ find_memend_and_nodes(struct meminfo *mi, struct node_info *np)
*/
max_low_pfn = memend_pfn - O_PFN_DOWN(PHYS_OFFSET);
max_pfn = memend_pfn - O_PFN_DOWN(PHYS_OFFSET);
mi->end = memend_pfn << PAGE_SHIFT;
return bootmem_pages;
}
......@@ -546,7 +547,6 @@ void __init mem_init(void)
datapages = &_end - &_etext;
initpages = &__init_end - &__init_begin;
high_memory = (void *)__va(meminfo.end);
#ifndef CONFIG_DISCONTIGMEM
max_mapnr = virt_to_page(high_memory) - mem_map;
#endif
......
......@@ -196,7 +196,6 @@ static struct tagtable __tagtable_##fn __tag = { tag, fn }
struct meminfo {
int nr_banks;
unsigned long end;
struct {
unsigned long start;
unsigned long size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment