Thread (13 messages) 13 messages, 6 authors, 2021-09-24

Re: [PATCH 3/3] memblock: cleanup memblock_free interface

From: Juergen Gross <jgross@suse.com>
Date: 2021-09-23 08:15:17
Also in: kvm, linux-alpha, linux-arm-kernel, linux-devicetree, linux-efi, linux-iommu, linux-mips, linux-mm, linux-riscv, linux-s390, linux-sh, linux-um, linux-usb, lkml, sparclinux, xen-devel

On 23.09.21 09:43, Mike Rapoport wrote:
From: Mike Rapoport <redacted>

For ages memblock_free() interface dealt with physical addresses even
despite the existence of memblock_alloc_xx() functions that return a
virtual pointer.

Introduce memblock_phys_free() for freeing physical ranges and repurpose
memblock_free() to free virtual pointers to make the following pairing
abundantly clear:

	int memblock_phys_free(phys_addr_t base, phys_addr_t size);
	phys_addr_t memblock_phys_alloc(phys_addr_t base, phys_addr_t size);

	void *memblock_alloc(phys_addr_t size, phys_addr_t align);
	void memblock_free(void *ptr, size_t size);

Replace intermediate memblock_free_ptr() with memblock_free() and drop
unnecessary aliases memblock_free_early() and memblock_free_early_nid().

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Mike Rapoport <redacted>
arch/x86/xen/ parts: Reviewed-by: Juergen Gross [off-list ref]


Juergen

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help