Skip to content
Snippets Groups Projects
Select Git revision
  • 8fe8ce896c1cc29d6bfebb3c7b3cc948f72cd32c
  • 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

amdgpu_drv.c

Blame
  • internal.h 15.29 KiB
    /* internal.h: mm/ internal definitions
     *
     * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
     * Written by David Howells (dhowells@redhat.com)
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * as published by the Free Software Foundation; either version
     * 2 of the License, or (at your option) any later version.
     */
    #ifndef __MM_INTERNAL_H
    #define __MM_INTERNAL_H
    
    #include <linux/fs.h>
    #include <linux/mm.h>
    #include <linux/pagemap.h>
    #include <linux/tracepoint-defs.h>
    
    /*
     * The set of flags that only affect watermark checking and reclaim
     * behaviour. This is used by the MM to obey the caller constraints
     * about IO, FS and watermark checking while ignoring placement
     * hints such as HIGHMEM usage.
     */
    #define GFP_RECLAIM_MASK (__GFP_RECLAIM|__GFP_HIGH|__GFP_IO|__GFP_FS|\
    			__GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|\
    			__GFP_NORETRY|__GFP_MEMALLOC|__GFP_NOMEMALLOC|\
    			__GFP_ATOMIC)
    
    /* The GFP flags allowed during early boot */
    #define GFP_BOOT_MASK (__GFP_BITS_MASK & ~(__GFP_RECLAIM|__GFP_IO|__GFP_FS))
    
    /* Control allocation cpuset and node placement constraints */
    #define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE)
    
    /* Do not use these with a slab allocator */
    #define GFP_SLAB_BUG_MASK (__GFP_DMA32|__GFP_HIGHMEM|~__GFP_BITS_MASK)
    
    int do_swap_page(struct fault_env *fe, pte_t orig_pte);
    
    void free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *start_vma,
    		unsigned long floor, unsigned long ceiling);
    
    void unmap_page_range(struct mmu_gather *tlb,
    			     struct vm_area_struct *vma,
    			     unsigned long addr, unsigned long end,
    			     struct zap_details *details);
    
    extern int __do_page_cache_readahead(struct address_space *mapping,
    		struct file *filp, pgoff_t offset, unsigned long nr_to_read,
    		unsigned long lookahead_size);
    
    /*
     * Submit IO for the read-ahead request in file_ra_state.
     */
    static inline unsigned long ra_submit(struct file_ra_state *ra,
    		struct address_space *mapping, struct file *filp)
    {
    	return __do_page_cache_readahead(mapping, filp,
    					ra->start, ra->size, ra->async_size);
    }
    
    /*
     * Turn a non-refcounted page (->_refcount == 0) into refcounted with
     * a count of one.
     */
    static inline void set_page_refcounted(struct page *page)
    {
    	VM_BUG_ON_PAGE(PageTail(page), page);
    	VM_BUG_ON_PAGE(page_ref_count(page), page);