Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

memblock: Permit existing reserved regions to be marked RSRV_KERN

Permit existing memblock reservations to be marked as RSRV_KERN. This
will be used by the EFI code on x86 to distinguish between reservations
of boot services data regions that have actual significance to the
kernel and regions that are reserved temporarily to work around buggy
firmware.

Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

+16
+1
include/linux/memblock.h
··· 155 155 int memblock_mark_nomap(phys_addr_t base, phys_addr_t size); 156 156 int memblock_clear_nomap(phys_addr_t base, phys_addr_t size); 157 157 int memblock_reserved_mark_noinit(phys_addr_t base, phys_addr_t size); 158 + int memblock_reserved_mark_kern(phys_addr_t base, phys_addr_t size); 158 159 int memblock_mark_kho_scratch(phys_addr_t base, phys_addr_t size); 159 160 int memblock_clear_kho_scratch(phys_addr_t base, phys_addr_t size); 160 161
+15
mm/memblock.c
··· 1116 1116 } 1117 1117 1118 1118 /** 1119 + * memblock_reserved_mark_kern - Mark a reserved memory region with flag 1120 + * MEMBLOCK_RSRV_KERN 1121 + * 1122 + * @base: the base phys addr of the region 1123 + * @size: the size of the region 1124 + * 1125 + * Return: 0 on success, -errno on failure. 1126 + */ 1127 + int __init_memblock memblock_reserved_mark_kern(phys_addr_t base, phys_addr_t size) 1128 + { 1129 + return memblock_setclr_flag(&memblock.reserved, base, size, 1, 1130 + MEMBLOCK_RSRV_KERN); 1131 + } 1132 + 1133 + /** 1119 1134 * memblock_mark_kho_scratch - Mark a memory region as MEMBLOCK_KHO_SCRATCH. 1120 1135 * @base: the base phys addr of the region 1121 1136 * @size: the size of the region