Add init declaration to variables/functions used for memory
initialization. I don't think they would clash with memory
hotplug. If they do, please yell.
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
/*
* We use a special marker for the end of memory and it uses the extra (+1) slot
*/
/*
* We use a special marker for the end of memory and it uses the extra (+1) slot
*/
-struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1];
-int num_rsvd_regions;
+struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1] __initdata;
+int num_rsvd_regions __initdata;
* caller-specified function is called with the memory ranges that remain after filtering.
* This routine does not assume the incoming segments are sorted.
*/
* caller-specified function is called with the memory ranges that remain after filtering.
* This routine does not assume the incoming segments are sorted.
*/
filter_rsvd_memory (unsigned long start, unsigned long end, void *arg)
{
unsigned long range_start, range_end, prev_start;
filter_rsvd_memory (unsigned long start, unsigned long end, void *arg)
{
unsigned long range_start, range_end, prev_start;
sort_regions (struct rsvd_region *rsvd_region, int max)
{
int j;
sort_regions (struct rsvd_region *rsvd_region, int max)
{
int j;
* initrd, etc. There are currently %IA64_MAX_RSVD_REGIONS defined,
* see include/asm-ia64/meminit.h if you need to define more.
*/
* initrd, etc. There are currently %IA64_MAX_RSVD_REGIONS defined,
* see include/asm-ia64/meminit.h if you need to define more.
*/
reserve_memory (void)
{
int n = 0;
reserve_memory (void)
{
int n = 0;
* Grab the initrd start and end from the boot parameter struct given us by
* the boot loader.
*/
* Grab the initrd start and end from the boot parameter struct given us by
* the boot loader.
*/
find_initrd (void)
{
#ifdef CONFIG_BLK_DEV_INITRD
find_initrd (void)
{
#ifdef CONFIG_BLK_DEV_INITRD
* Find a place to put the bootmap and return its starting address in
* bootmap_start. This address must be page-aligned.
*/
* Find a place to put the bootmap and return its starting address in
* bootmap_start. This address must be page-aligned.
*/
find_bootmap_location (unsigned long start, unsigned long end, void *arg)
{
unsigned long needed = *(unsigned long *)arg;
find_bootmap_location (unsigned long start, unsigned long end, void *arg)
{
unsigned long needed = *(unsigned long *)arg;
* Walk the EFI memory map and find usable memory for the system, taking
* into account reserved areas.
*/
* Walk the EFI memory map and find usable memory for the system, taking
* into account reserved areas.
*/
find_memory (void)
{
unsigned long bootmap_size;
find_memory (void)
{
unsigned long bootmap_size;
* Set up the page tables.
*/
* Set up the page tables.
*/
paging_init (void)
{
unsigned long max_dma;
paging_init (void)
{
unsigned long max_dma;
(__init_end - __init_begin) >> 10);
}
(__init_end - __init_begin) >> 10);
}
free_initrd_mem (unsigned long start, unsigned long end)
{
struct page *page;
free_initrd_mem (unsigned long start, unsigned long end)
{
struct page *page;
/*
* This installs a clean page in the kernel's page table.
*/
/*
* This installs a clean page in the kernel's page table.
*/
+static struct page * __init
put_kernel_page (struct page *page, unsigned long address, pgprot_t pgprot)
{
pgd_t *pgd;
put_kernel_page (struct page *page, unsigned long address, pgprot_t pgprot)
{
pgd_t *pgd;
#ifdef CONFIG_VIRTUAL_MEM_MAP
#ifdef CONFIG_VIRTUAL_MEM_MAP
create_mem_map_page_table (u64 start, u64 end, void *arg)
{
unsigned long address, start_page, end_page;
create_mem_map_page_table (u64 start, u64 end, void *arg)
{
unsigned long address, start_page, end_page;
}
EXPORT_SYMBOL(ia64_pfn_valid);
}
EXPORT_SYMBOL(ia64_pfn_valid);
find_largest_hole (u64 start, u64 end, void *arg)
{
u64 *max_gap = arg;
find_largest_hole (u64 start, u64 end, void *arg)
{
u64 *max_gap = arg;
}
#endif /* CONFIG_VIRTUAL_MEM_MAP */
}
#endif /* CONFIG_VIRTUAL_MEM_MAP */
count_reserved_pages (u64 start, u64 end, void *arg)
{
unsigned long num_reserved = 0;
count_reserved_pages (u64 start, u64 end, void *arg)
{
unsigned long num_reserved = 0;
__setup("nolwsys", nolwsys_setup);
__setup("nolwsys", nolwsys_setup);
mem_init (void)
{
long reserved_pages, codesize, datasize, initsize;
mem_init (void)
{
long reserved_pages, codesize, datasize, initsize;