History

Merge branch 'acpi-mm'

* acpi-mm: ACPI: HMAT: use %u instead of %d to print u32 values ACPI: NUMA: HMAT: fix a section mismatch ACPI: HMAT: don't mix pxm and nid when setting memory target processor_pxm ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device ACPI: NUMA: HMAT: Register HMAT at device_initcall level device-dax: Add a driver for "hmem" devices dax: Fix alloc_dax_region() compile warning lib: Uplevel the pmem "region" ida to a global allocator x86/efi: Add efi_fake_mem support for EFI_MEMORY_SP arm/efi: EFI soft reservation to memblock x86/efi: EFI soft reservation to E820 enumeration efi: Common enable/disable infrastructure for EFI soft reservation x86/efi: Push EFI_MEMMAP check into leaf routines efi: Enumerate EFI_MEMORY_SP ACPI: NUMA: Establish a new drivers/acpi/numa/ directory

Rafael J. Wysocki committed 6 years ago

Commit 782b5972 parents 995e2ef 0f1839d45 files · +644 −100Browse files

Showing the changes to include/linux (3 of 45 files). Show all

Unified · Split

3 files
  1. include/linux/efi.h +15 −1
  2. include/linux/ioport.h +1 −0
  3. include/linux/memregion.h +23 −0
include/linux/efi.h+15−1
@@ -112,6 +112,7 @@ typedef struct { · 111 unmodified lines
112112 #define EFI_MEMORY_MORE_RELIABLE \
113113 ((u64)0x0000000000010000ULL) /* higher reliability */
114114 #define EFI_MEMORY_RO ((u64)0x0000000000020000ULL) /* read-only */
115+#define EFI_MEMORY_SP ((u64)0x0000000000040000ULL) /* soft reserved */
115116 #define EFI_MEMORY_RUNTIME ((u64)0x8000000000000000ULL) /* range requires runtime mapping */
116117 #define EFI_MEMORY_DESCRIPTOR_VERSION 1
117118
@@ -1044,7 +1045,6 @@ extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if pos · 926 unmodified lines
10441045 extern efi_status_t efi_query_variable_store(u32 attributes,
10451046 unsigned long size,
10461047 bool nonblocking);
1047−extern void efi_find_mirror(void);
10481048 #else
10491049
10501050 static inline efi_status_t efi_query_variable_store(u32 attributes,
@@ -1202,6 +1202,7 @@ extern int __init efi_setup_pcdp_console(char *); · 151 unmodified lines
12021202 #define EFI_DBG 8 /* Print additional debug info at runtime */
12031203 #define EFI_NX_PE_DATA 9 /* Can runtime data regions be mapped non-executable? */
12041204 #define EFI_MEM_ATTR 10 /* Did firmware publish an EFI_MEMORY_ATTRIBUTES table? */
1205+#define EFI_MEM_NO_SOFT_RESERVE 11 /* Is the kernel configured to ignore soft reservations? */
12051206
12061207 #ifdef CONFIG_EFI
12071208 /*
@@ -1212,6 +1213,14 @@ static inline bool efi_enabled(int feature) · 4 unmodified lines
12121213 return test_bit(feature, &efi.flags) != 0;
12131214 }
12141215 extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused);
1216+
1217+bool __pure __efi_soft_reserve_enabled(void);
1218+
1219+static inline bool __pure efi_soft_reserve_enabled(void)
1220+{
1221+ return IS_ENABLED(CONFIG_EFI_SOFT_RESERVE)
1222+ && __efi_soft_reserve_enabled();
1223+}
12151224 #else
12161225 static inline bool efi_enabled(int feature)
12171226 {
@@ -1225,6 +1234,11 @@ efi_capsule_pending(int *reset_type) · 7 unmodified lines
12251234 {
12261235 return false;
12271236 }
1237+
1238+static inline bool efi_soft_reserve_enabled(void)
1239+{
1240+ return false;
1241+}
12281242 #endif
12291243
12301244 extern int efi_status_to_err(efi_status_t status);
include/linux/ioport.h+1−0
@@ -134,6 +134,7 @@ enum { · 133 unmodified lines
134134 IORES_DESC_PERSISTENT_MEMORY_LEGACY = 5,
135135 IORES_DESC_DEVICE_PRIVATE_MEMORY = 6,
136136 IORES_DESC_RESERVED = 7,
137+ IORES_DESC_SOFT_RESERVED = 8,
137138 };
138139
139140 /*
include/linux/memregion.h+23−0
@@ -0,0 +1,23 @@
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+struct memregion_info {
8+ int target_node;
9+};
10+
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_ */

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