mm: rework accept memory helpers
Make accept_memory() and range_contains_unaccepted_memory() take 'start' and 'size' arguments instead of 'start' and 'end'. Remove accept_page(), replacing it with direct calls to accept_memory(). The accept_page() name is going to be used for a different function. Link: https://lkml.kernel.org/r/20240809114854.3745464-6-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Suggested-by: David Hildenbrand <david@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Matthew Wilcox <willy@infradead.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Mike Rapoport (Microsoft) <rppt@kernel.org> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
310183de7b
commit
5adfeaecc4
@@ -1229,7 +1229,7 @@ efi_zboot_entry(efi_handle_t handle, efi_system_table_t *systab);
|
||||
efi_status_t allocate_unaccepted_bitmap(__u32 nr_desc,
|
||||
struct efi_boot_memmap *map);
|
||||
void process_unaccepted_memory(u64 start, u64 end);
|
||||
void accept_memory(phys_addr_t start, phys_addr_t end);
|
||||
void accept_memory(phys_addr_t start, unsigned long size);
|
||||
void arch_accept_memory(phys_addr_t start, phys_addr_t end);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -177,9 +177,10 @@ void process_unaccepted_memory(u64 start, u64 end)
|
||||
start / unit_size, (end - start) / unit_size);
|
||||
}
|
||||
|
||||
void accept_memory(phys_addr_t start, phys_addr_t end)
|
||||
void accept_memory(phys_addr_t start, unsigned long size)
|
||||
{
|
||||
unsigned long range_start, range_end;
|
||||
phys_addr_t end = start + size;
|
||||
unsigned long bitmap_size;
|
||||
u64 unit_size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user