~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/c6x/mm/init.c

Version: ~ [ linux-5.4-rc3 ] ~ [ linux-5.3.6 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.79 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.149 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.196 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.196 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.75 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *  Port on Texas Instruments TMS320C6x architecture
  3  *
  4  *  Copyright (C) 2004, 2009, 2010, 2011 Texas Instruments Incorporated
  5  *  Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
  6  *
  7  *  This program is free software; you can redistribute it and/or modify
  8  *  it under the terms of the GNU General Public License version 2 as
  9  *  published by the Free Software Foundation.
 10  */
 11 #include <linux/mm.h>
 12 #include <linux/swap.h>
 13 #include <linux/module.h>
 14 #include <linux/bootmem.h>
 15 #ifdef CONFIG_BLK_DEV_RAM
 16 #include <linux/blkdev.h>
 17 #endif
 18 #include <linux/initrd.h>
 19 
 20 #include <asm/sections.h>
 21 #include <asm/uaccess.h>
 22 
 23 /*
 24  * ZERO_PAGE is a special page that is used for zero-initialized
 25  * data and COW.
 26  */
 27 unsigned long empty_zero_page;
 28 EXPORT_SYMBOL(empty_zero_page);
 29 
 30 /*
 31  * paging_init() continues the virtual memory environment setup which
 32  * was begun by the code in arch/head.S.
 33  * The parameters are pointers to where to stick the starting and ending
 34  * addresses  of available kernel virtual memory.
 35  */
 36 void __init paging_init(void)
 37 {
 38         struct pglist_data *pgdat = NODE_DATA(0);
 39         unsigned long zones_size[MAX_NR_ZONES] = {0, };
 40 
 41         empty_zero_page      = (unsigned long) alloc_bootmem_pages(PAGE_SIZE);
 42         memset((void *)empty_zero_page, 0, PAGE_SIZE);
 43 
 44         /*
 45          * Set up user data space
 46          */
 47         set_fs(KERNEL_DS);
 48 
 49         /*
 50          * Define zones
 51          */
 52         zones_size[ZONE_NORMAL] = (memory_end - PAGE_OFFSET) >> PAGE_SHIFT;
 53         pgdat->node_zones[ZONE_NORMAL].zone_start_pfn =
 54                 __pa(PAGE_OFFSET) >> PAGE_SHIFT;
 55 
 56         free_area_init(zones_size);
 57 }
 58 
 59 void __init mem_init(void)
 60 {
 61         high_memory = (void *)(memory_end & PAGE_MASK);
 62 
 63         /* this will put all memory onto the freelists */
 64         free_all_bootmem();
 65 
 66         mem_init_print_info(NULL);
 67 }
 68 
 69 #ifdef CONFIG_BLK_DEV_INITRD
 70 void __init free_initrd_mem(unsigned long start, unsigned long end)
 71 {
 72         free_reserved_area((void *)start, (void *)end, -1, "initrd");
 73 }
 74 #endif
 75 
 76 void __init free_initmem(void)
 77 {
 78         free_initmem_default(-1);
 79 }
 80 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp