Ignore:
Timestamp:
Sep 8, 2022, 11:20:01 AM (3 years ago)
Author:
Paul Smedley
Message:

Fix GFP_ZERO support in vmalloc()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/include/linux/gfp.h

    r662 r728  
    22#define __LINUX_GFP_H
    33
    4 #include <asm/page.h>
    5 #include <linux/export.h>
    6 #include <linux/mm.h>
    74#include <linux/types.h>
     5
     6/*
     7 * GFP bitmasks..
     8 */
     9#define __GFP_WAIT      0x01
     10#define __GFP_LOW       0x02
     11#define __GFP_MED       0x04
     12#define __GFP_HIGH      0x08
     13#define __GFP_IO        0x10
     14#define __GFP_SWAP      0x20
    815
    916/* Plain integer GFP bitmasks. Do not use this directly. */
     
    4451#define __GFP_RETRY_MAYFAIL     ((__force gfp_t)___GFP_RETRY_MAYFAIL)
    4552#define GFP_DMA32 0             /* driver must check for 32-bit address */
     53#define GFP_BUFFER      (__GFP_LOW | __GFP_WAIT)
     54#define GFP_ATOMIC      (__GFP_HIGH)
     55#define GFP_USER        (__GFP_LOW | __GFP_WAIT | __GFP_IO)
     56#define GFP_HIGHUSER    (GFP_USER | __GFP_HIGHMEM)
     57#define GFP_KERNEL      (__GFP_MED | __GFP_WAIT | __GFP_IO)
     58#define GFP_NFS         (__GFP_HIGH | __GFP_WAIT | __GFP_IO)
     59#define GFP_KSWAPD      (__GFP_IO | __GFP_SWAP)
     60
    4661
    4762/*
     
    5772#define __GFP_MOVABLE   ((__force gfp_t)___GFP_MOVABLE)  /* ZONE_MOVABLE allowed */
    5873#define GFP_ZONEMASK    (__GFP_DMA|__GFP_HIGHMEM|__GFP_DMA32|__GFP_MOVABLE)
     74/* Flag - indicates that the buffer will be suitable for DMA.  Ignored on some
     75   platforms, used as appropriate on others */
     76
     77#define GFP_DMA         __GFP_DMA
     78
     79/* Flag - indicates that the buffer can be taken from high memory which is not
     80   directly addressable by the kernel */
     81
     82#define GFP_HIGHMEM     __GFP_HIGHMEM
     83#define __GFP_DMAHIGHMEM  0x100
     84#define GFP_DMAHIGHMEM    __GFP_DMAHIGHMEM
     85
    5986void *alloc_pages_exact(size_t size, gfp_t gfp_mask);
    6087void free_pages_exact(void *virt, size_t size);
Note: See TracChangeset for help on using the changeset viewer.