linux/drivers/tty/hvc
Mike Rapoport (Microsoft) ff289e0448 s390/hvc_iucv: Replace get_zeroed_page() with kzalloc()
hvc_iucv_alloc() allocates a send staging buffer for accumulating
outbound terminal characters before they are copied into a separate
IUCV message buffer for transmission to the hypervisor. The staging
buffer itself is never passed to any IUCV function.

This buffer can be allocated with kmalloc() as there's nothing special
about it to go directly to the page allocator.

kmalloc() provides a better API that does not require ugly casts and
kfree() does not need to know the size of the freed object.

Performance difference between kmalloc() and __get_free_pages() is not
measurable as both allocators take an object/page from a per-CPU list for
fast path allocations.

For the slow path the performance is anyway determined by the amount of
reclaim involved rather than by what allocator is used.

Replace use of get_zeroed_page() with kzalloc() and free_page() with
kfree().

Link: https://lore.kernel.org/all/635405e4-9423-4a25-a6e7-e03c8ea0bcbe@redhat.com
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2026-06-03 15:32:45 +02:00
..
hvc_console.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hvc_console.h tty: hvc: convert to u8 and size_t 2023-12-08 12:02:37 +01:00
hvc_dcc.c tty: hvc: convert to u8 and size_t 2023-12-08 12:02:37 +01:00
hvc_irq.c
hvc_iucv.c s390/hvc_iucv: Replace get_zeroed_page() with kzalloc() 2026-06-03 15:32:45 +02:00
hvc_opal.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hvc_riscv_sbi.c RISC-V Patches for the 6.8 Merge Window, Part 4 2024-01-20 11:06:04 -08:00
hvc_rtas.c tty: hvc: convert to u8 and size_t 2023-12-08 12:02:37 +01:00
hvc_udbg.c tty: hvc: convert to u8 and size_t 2023-12-08 12:02:37 +01:00
hvc_vio.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hvc_xen.c hvc/xen: Check console connection flag 2026-03-30 17:37:18 +02:00
hvcs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hvsi_lib.c tty: hvc: convert comma to semicolon 2024-09-03 10:47:56 +02:00
hvsi.c tty: hvc: convert counts to size_t 2023-08-11 21:12:47 +02:00
Kconfig tty: hvc: Don't enable the RISC-V SBI console by default 2024-02-19 09:43:33 +01:00
Makefile