linux/include/trace/events/mmflags.h

/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/node.h>
#include <linux/mmzone.h>
#include <linux/compaction.h>
/*
 * The order of these masks is important. Matching masks will be seen
 * first and the left over flags will end up showing by themselves.
 *
 * For example, if we have GFP_KERNEL before GFP_USER we wil get:
 *
 *  GFP_KERNEL|GFP_HARDWALL
 *
 * Thus most bits set go first.
 */

#define gfpflag_string(flag)

#define __def_gfpflag_names

#ifdef CONFIG_KASAN_HW_TAGS
#define __def_gfpflag_names_kasan
#else
#define __def_gfpflag_names_kasan
#endif

#define show_gfp_flags(flags)

#ifdef CONFIG_MMU
#define IF_HAVE_PG_MLOCK(_name)
#else
#define IF_HAVE_PG_MLOCK
#endif

#ifdef CONFIG_ARCH_USES_PG_UNCACHED
#define IF_HAVE_PG_UNCACHED(_name)
#else
#define IF_HAVE_PG_UNCACHED
#endif

#ifdef CONFIG_MEMORY_FAILURE
#define IF_HAVE_PG_HWPOISON(_name)
#else
#define IF_HAVE_PG_HWPOISON
#endif

#if defined(CONFIG_PAGE_IDLE_FLAG) && defined(CONFIG_64BIT)
#define IF_HAVE_PG_IDLE(_name)
#else
#define IF_HAVE_PG_IDLE
#endif

#ifdef CONFIG_ARCH_USES_PG_ARCH_X
#define IF_HAVE_PG_ARCH_X
#else
#define IF_HAVE_PG_ARCH_X(_name)
#endif

#define DEF_PAGEFLAG_NAME(_name)

#define __def_pageflag_names

#define show_page_flags(flags)

#define DEF_PAGETYPE_NAME(_name)

#define __def_pagetype_names

#if defined(CONFIG_X86)
#define __VM_ARCH_SPECIFIC_1
#elif defined(CONFIG_PPC)
#define __VM_ARCH_SPECIFIC_1
#elif defined(CONFIG_PARISC)
#define __VM_ARCH_SPECIFIC_1
#elif !defined(CONFIG_MMU)
#define __VM_ARCH_SPECIFIC_1
#else
#define __VM_ARCH_SPECIFIC_1
#endif

#ifdef CONFIG_MEM_SOFT_DIRTY
#define IF_HAVE_VM_SOFTDIRTY(flag,name)
#else
#define IF_HAVE_VM_SOFTDIRTY
#endif

#ifdef CONFIG_HAVE_ARCH_USERFAULTFD_MINOR
#define IF_HAVE_UFFD_MINOR(flag, name)
#else
#define IF_HAVE_UFFD_MINOR
#endif

#ifdef CONFIG_64BIT
#define IF_HAVE_VM_DROPPABLE(flag, name)
#else
#define IF_HAVE_VM_DROPPABLE
#endif

#define __def_vmaflag_names		\

#define show_vma_flags(flags)

#ifdef CONFIG_COMPACTION
#define COMPACTION_STATUS

/* High-level compaction status feedback */
#define COMPACTION_FAILED
#define COMPACTION_WITHDRAWN
#define COMPACTION_PROGRESS

#define compact_result_to_feedback(result)

#define COMPACTION_FEEDBACK

#define COMPACTION_PRIORITY
#else
#define COMPACTION_STATUS
#define COMPACTION_PRIORITY
#define COMPACTION_FEEDBACK
#endif

#ifdef CONFIG_ZONE_DMA
#define IFDEF_ZONE_DMA(X)
#else
#define IFDEF_ZONE_DMA
#endif

#ifdef CONFIG_ZONE_DMA32
#define IFDEF_ZONE_DMA32(X)
#else
#define IFDEF_ZONE_DMA32
#endif

#ifdef CONFIG_HIGHMEM
#define IFDEF_ZONE_HIGHMEM
#else
#define IFDEF_ZONE_HIGHMEM(X)
#endif

#define ZONE_TYPE

#define LRU_NAMES

/*
 * First define the enums in the above macros to be exported to userspace
 * via TRACE_DEFINE_ENUM().
 */
#undef EM
#undef EMe
#define EM(a, b)
#define EMe(a, b)

COMPACTION_STATUS
COMPACTION_PRIORITY
/* COMPACTION_FEEDBACK are defines not enums. Not needed here. */
ZONE_TYPE
LRU_NAMES

/*
 * Now redefine the EM() and EMe() macros to map the enums to the strings
 * that will be printed in the output.
 */
#undef EM
#undef EMe
#define EM(a, b)
#define EMe(a, b)