In preparation for handling platform differentiated memory types beyond persistent memory, uplevel the "region" identifier to a global number space. This enables a device-dax instance to be registered to any memory type with guaranteed unique names.
Showing the changes to include/linux (1 of 8 files). Show all
Unified · Split
| @@ -0,0 +1,19 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ | |
| 2 | +#ifndef _MEMREGION_H_ | |
| 3 | +#define _MEMREGION_H_ | |
| 4 | +#include <linux/types.h> | |
| 5 | +#include <linux/errno.h> | |
| 6 | + | |
| 7 | +#ifdef CONFIG_MEMREGION | |
| 8 | +int memregion_alloc(gfp_t gfp); | |
| 9 | +void memregion_free(int id); | |
| 10 | +#else | |
| 11 | +static inline int memregion_alloc(gfp_t gfp) | |
| 12 | +{ | |
| 13 | + return -ENOMEM; | |
| 14 | +} | |
| 15 | +void memregion_free(int id) | |
| 16 | +{ | |
| 17 | +} | |
| 18 | +#endif | |
| 19 | +#endif /* _MEMREGION_H_ */ | |