This is a note to let you know that I've just added the patch titled scsi: libsas: Align SMP request allocation to ARCH_DMA_MINALIGN to the 6.8-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: scsi-libsas-align-smp-request-allocation-to-arch_dma.patch and it can be found in the queue-6.8 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit c3d533e28fa759235c21a5f7c0919977a43e31c6 Author: Yihang Li <liyihang9@xxxxxxxxxx> Date: Thu Mar 28 17:06:26 2024 +0800 scsi: libsas: Align SMP request allocation to ARCH_DMA_MINALIGN [ Upstream commit e675a4fd6d1f8990d3bed5dada3d20edfa000423 ] This series [1] reduced the kmalloc() minimum alignment on arm64 to 8 bytes (from 128). In libsas, this will cause SMP requests to be 8-byte aligned through kmalloc() allocation. However, for hisi_sas hardware, all command addresses must be 16-byte-aligned. Otherwise, the commands fail to be executed. ARCH_DMA_MINALIGN represents the minimum (static) alignment for safe DMA operations, so use ARCH_DMA_MINALIGN as the alignment for SMP request. Link: https://lkml.kernel.org/r/20230612153201.554742-1-catalin.marinas@xxxxxxx [1] Signed-off-by: Yihang Li <liyihang9@xxxxxxxxxx> Link: https://lore.kernel.org/r/20240328090626.621147-1-liyihang9@xxxxxxxxxx Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx> Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx> Reviewed-by: Jason Yan <yanaijie@xxxxxxxxxx> Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 5c261005b74e4..f6e6db8b8aba9 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -135,7 +135,7 @@ static int smp_execute_task(struct domain_device *dev, void *req, int req_size, static inline void *alloc_smp_req(int size) { - u8 *p = kzalloc(size, GFP_KERNEL); + u8 *p = kzalloc(ALIGN(size, ARCH_DMA_MINALIGN), GFP_KERNEL); if (p) p[0] = SMP_REQUEST; return p;