Re: [PATCH v13 3/5] s390/pci: Improve FMB memory management
From: Niklas Schnelle
Date: Wed Nov 11 2026 - 15:53:36 EST
On Wed, 2026-11-11 at 11:27 -0500, Omar Elghoul wrote:
> Refactor the FMB memory management code to use kzalloc() instead of a
> dedicated kmem_cache. kzalloc() already guarantees adequate alignment
> for power-of-two sizes, rendering the kmem_cache approach unnecessary.
> This simplifies both the initialization and cleanup procedures.
>
> Allocate the FMB once upon first enable and keep it for the lifetime of
> the zdev instead of freeing it on every disable. Defer freeing the
> buffer until device teardown in zpci_release_device(). Add the field
> fmb_enabled to struct zpci_dev as the new FMB liveness bool, since a
> non-null FMB pointer no longer implies FMB enablement in firmware.
>
> Signed-off-by: Omar Elghoul <oelghoul@xxxxxxxxxxxxx>
> ---
> arch/s390/include/asm/pci.h | 1 +
> arch/s390/pci/pci.c | 61 +++++++++++++++++++++----------------
> arch/s390/pci/pci_debug.c | 2 +-
> 3 files changed, 37 insertions(+), 27 deletions(-)
And this one too looks good now. In the beginning I had really guessed
that this would have been a series with few hurdles but the devil
really is in the detail. Thanks for the great work.
Reviewed-by: Niklas Schnelle <schnelle@xxxxxxxxxxxxx>
Thanks,
Niklas