History

lib: Uplevel the pmem "region" ida to a global allocator

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.

Dan Williams committed 7 years ago

Commit 33dd7071 parent 199c8478 files · +46 −11Browse files

Showing the changes to include/linux (1 of 8 files). Show all

Unified · Split

include/linux/memregion.h+19−0
@@ -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_ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t