Drop support for kernels < 4.4 from 'wrapper/page_alloc.h'
[lttng-modules.git] / include / wrapper / page_alloc.h
CommitLineData
b7cdc182 1/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
9f36eaed 2 *
389d7070
MD
3 * wrapper/page_alloc.h
4 *
5 * wrapper around get_pfnblock_flags_mask. Using KALLSYMS to get its address
6 * when available, else we need to have a kernel that exports this function to
7 * GPL modules.
8 *
9 * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
389d7070
MD
10 */
11
9f36eaed
MJ
12#ifndef _LTTNG_WRAPPER_PAGE_ALLOC_H
13#define _LTTNG_WRAPPER_PAGE_ALLOC_H
14
5a90857e 15#include <linux/mm_types.h>
389d7070
MD
16
17/*
18 * We need to redefine get_pfnblock_flags_mask to our wrapper, because
19 * the get_pageblock_migratetype() macro uses it.
20 */
5a90857e 21#ifdef CONFIG_KALLSYMS
389d7070
MD
22
23#define get_pfnblock_flags_mask wrapper_get_pfnblock_flags_mask
24
389d7070
MD
25int wrapper_get_pfnblock_flags_mask_init(void);
26
0e14d6e7 27#else
389d7070 28
389d7070
MD
29static inline
30int wrapper_get_pfnblock_flags_mask_init(void)
31{
32 return 0;
33}
34
0e14d6e7
MD
35#endif
36
389d7070 37#endif /* _LTTNG_WRAPPER_PAGE_ALLOC_H */
This page took 0.048316 seconds and 4 git commands to generate.