Skip to content
Snippets Groups Projects
Select Git revision
  • 8310a32c15c76623bbe2425d38688a9d5b3e50a9
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

sys_sparc.c

Blame
  • hugetlb.c 59.72 KiB
    /*
     * Generic hugetlb support.
     * (C) William Irwin, April 2004
     */
    #include <linux/gfp.h>
    #include <linux/list.h>
    #include <linux/init.h>
    #include <linux/module.h>
    #include <linux/mm.h>
    #include <linux/seq_file.h>
    #include <linux/sysctl.h>
    #include <linux/highmem.h>
    #include <linux/mmu_notifier.h>
    #include <linux/nodemask.h>
    #include <linux/pagemap.h>
    #include <linux/mempolicy.h>
    #include <linux/cpuset.h>
    #include <linux/mutex.h>
    #include <linux/bootmem.h>
    #include <linux/sysfs.h>
    
    #include <asm/page.h>
    #include <asm/pgtable.h>
    #include <asm/io.h>
    
    #include <linux/hugetlb.h>
    #include "internal.h"
    
    const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL;
    static gfp_t htlb_alloc_mask = GFP_HIGHUSER;
    unsigned long hugepages_treat_as_movable;
    
    static int max_hstate;
    unsigned int default_hstate_idx;
    struct hstate hstates[HUGE_MAX_HSTATE];
    
    __initdata LIST_HEAD(huge_boot_pages);
    
    /* for command line parsing */
    static struct hstate * __initdata parsed_hstate;
    static unsigned long __initdata default_hstate_max_huge_pages;
    static unsigned long __initdata default_hstate_size;
    
    #define for_each_hstate(h) \
    	for ((h) = hstates; (h) < &hstates[max_hstate]; (h)++)
    
    /*
     * Protects updates to hugepage_freelists, nr_huge_pages, and free_huge_pages
     */
    static DEFINE_SPINLOCK(hugetlb_lock);
    
    /*
     * Region tracking -- allows tracking of reservations and instantiated pages
     *                    across the pages in a mapping.
     *
     * The region data structures are protected by a combination of the mmap_sem
     * and the hugetlb_instantion_mutex.  To access or modify a region the caller
     * must either hold the mmap_sem for write, or the mmap_sem for read and
     * the hugetlb_instantiation mutex:
     *
     * 	down_write(&mm->mmap_sem);
     * or
     * 	down_read(&mm->mmap_sem);
     * 	mutex_lock(&hugetlb_instantiation_mutex);
     */
    struct file_region {
    	struct list_head link;
    	long from;
    	long to;
    };