* 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
Showing the changes to include/linux (3 of 45 files). Show all
Unified · Split
| @@ -112,6 +112,7 @@ typedef struct { · 111 unmodified lines | ||
| 112 | 112 | #define EFI_MEMORY_MORE_RELIABLE \ |
| 113 | 113 | ((u64)0x0000000000010000ULL) /* higher reliability */ |
| 114 | 114 | #define EFI_MEMORY_RO ((u64)0x0000000000020000ULL) /* read-only */ |
| 115 | +#define EFI_MEMORY_SP ((u64)0x0000000000040000ULL) /* soft reserved */ | |
| 115 | 116 | #define EFI_MEMORY_RUNTIME ((u64)0x8000000000000000ULL) /* range requires runtime mapping */ |
| 116 | 117 | #define EFI_MEMORY_DESCRIPTOR_VERSION 1 |
| 117 | 118 | |
| @@ -1044,7 +1045,6 @@ extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if pos · 926 unmodified lines | ||
| 1044 | 1045 | extern efi_status_t efi_query_variable_store(u32 attributes, |
| 1045 | 1046 | unsigned long size, |
| 1046 | 1047 | bool nonblocking); |
| 1047 | −extern void efi_find_mirror(void); | |
| 1048 | 1048 | #else |
| 1049 | 1049 | |
| 1050 | 1050 | 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 | ||
| 1202 | 1202 | #define EFI_DBG 8 /* Print additional debug info at runtime */ |
| 1203 | 1203 | #define EFI_NX_PE_DATA 9 /* Can runtime data regions be mapped non-executable? */ |
| 1204 | 1204 | #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? */ | |
| 1205 | 1206 | |
| 1206 | 1207 | #ifdef CONFIG_EFI |
| 1207 | 1208 | /* |
| @@ -1212,6 +1213,14 @@ static inline bool efi_enabled(int feature) · 4 unmodified lines | ||
| 1212 | 1213 | return test_bit(feature, &efi.flags) != 0; |
| 1213 | 1214 | } |
| 1214 | 1215 | 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 | +} | |
| 1215 | 1224 | #else |
| 1216 | 1225 | static inline bool efi_enabled(int feature) |
| 1217 | 1226 | { |
| @@ -1225,6 +1234,11 @@ efi_capsule_pending(int *reset_type) · 7 unmodified lines | ||
| 1225 | 1234 | { |
| 1226 | 1235 | return false; |
| 1227 | 1236 | } |
| 1237 | + | |
| 1238 | +static inline bool efi_soft_reserve_enabled(void) | |
| 1239 | +{ | |
| 1240 | + return false; | |
| 1241 | +} | |
| 1228 | 1242 | #endif |
| 1229 | 1243 | |
| 1230 | 1244 | extern int efi_status_to_err(efi_status_t status); |
| @@ -134,6 +134,7 @@ enum { · 133 unmodified lines | ||
| 134 | 134 | IORES_DESC_PERSISTENT_MEMORY_LEGACY = 5, |
| 135 | 135 | IORES_DESC_DEVICE_PRIVATE_MEMORY = 6, |
| 136 | 136 | IORES_DESC_RESERVED = 7, |
| 137 | + IORES_DESC_SOFT_RESERVED = 8, | |
| 137 | 138 | }; |
| 138 | 139 | |
| 139 | 140 | /* |
| @@ -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_ */ | |