mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-21 22:45:23 +00:00
Add basic project files, together with local stubs of required headers. Update tools/include/slab.h to include definitions used by memblock. Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com> Signed-off-by: Mike Rapoport <rppt@kernel.org> Link: https://lore.kernel.org/r/d296fceb023a04b316a31fbff9acf1e76ac684e4.1643796665.git.karolinadrobnik@gmail.com
36 lines
742 B
C
36 lines
742 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _TOOLS_MMZONE_H
|
|
#define _TOOLS_MMZONE_H
|
|
|
|
#include <linux/atomic.h>
|
|
|
|
struct pglist_data *first_online_pgdat(void);
|
|
struct pglist_data *next_online_pgdat(struct pglist_data *pgdat);
|
|
|
|
#define for_each_online_pgdat(pgdat) \
|
|
for (pgdat = first_online_pgdat(); \
|
|
pgdat; \
|
|
pgdat = next_online_pgdat(pgdat))
|
|
|
|
enum zone_type {
|
|
__MAX_NR_ZONES
|
|
};
|
|
|
|
#define MAX_NR_ZONES __MAX_NR_ZONES
|
|
#define MAX_ORDER 11
|
|
#define MAX_ORDER_NR_PAGES (1 << (MAX_ORDER - 1))
|
|
|
|
#define pageblock_order (MAX_ORDER - 1)
|
|
#define pageblock_nr_pages BIT(pageblock_order)
|
|
|
|
struct zone {
|
|
atomic_long_t managed_pages;
|
|
};
|
|
|
|
typedef struct pglist_data {
|
|
struct zone node_zones[MAX_NR_ZONES];
|
|
|
|
} pg_data_t;
|
|
|
|
#endif
|