Dan Williams | 33dd707 | 2019-11-06 17:43:31 -0800 | [diff] [blame] | 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 | |
Dan Williams | a6c7f4c | 2019-11-06 17:43:43 -0800 | [diff] [blame] | 7 | struct memregion_info { |
| 8 | int target_node; |
| 9 | }; |
| 10 | |
Dan Williams | 33dd707 | 2019-11-06 17:43:31 -0800 | [diff] [blame] | 11 | #ifdef CONFIG_MEMREGION |
| 12 | int memregion_alloc(gfp_t gfp); |
| 13 | void memregion_free(int id); |
| 14 | #else |
| 15 | static inline int memregion_alloc(gfp_t gfp) |
| 16 | { |
| 17 | return -ENOMEM; |
| 18 | } |
| 19 | void memregion_free(int id) |
| 20 | { |
| 21 | } |
| 22 | #endif |
| 23 | #endif /* _MEMREGION_H_ */ |