Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795042366; b=TzuExCCrh/4qmPMKt8Gl6rberrZtMXitli7BqqCIbOsUga37zh0r8GdM9e7RbD+P8zBA Cv/6lNGhQNVuje9Joy0xxh4bE+pmZHzLIYeHC0AaQzRdbWVnIt9hLmWrIbqXVIgef5PXb nPixU62YY1F48guQ63CNbEhel/muscZBvBm4MK999w+hFqE2n7C/zRSlf9J/09aP8jkdJ ietwTSeXjuiNgx2FK7tM59BsBH7+oPoVkCwMW/kj3KGdEXpDiokuBjWZkkhajvG+EX9Ml ZJcicQwCuzVxadAF1eyd7xr5tOq5m49BBWwQ69KQRpQs2Pd4KEoZRg5pLz+Zhm2rtEA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795042366; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=/dd/zQFGvTtJaj+ljphUKAZnTTYMN9GG3NGUEnDuIy0=; b=H8qYJAqsRU7xzUnxih71Y9FRmdi1a2w7k7c+f68HtTaroieS4kHR7HF7Ahp69ZZaRhkv kz8kUiezYsw+Uzd3TloaAgF42E9af+CZXYAUnBiYJgm9bRozsEQhGdBLFB/l/mXDB5a8Q CVBGQjbJl7vmqy2nu9F6ALGkE9JsRiG7FIUhihZgcD7Mp6kfv/SS5NPp0K/Q6xvz8LODx mwm8ocrQtljHVvRfXqA14JdN/7jlVvyOsyeCHImgoFAc2736Vy5dFkr4Omd66nNRGRoo4 NdH0XK+zaNEO+fd6UHmtQdp83Y3e0xXBXzY76HblqrwNsQSqmlpn6t9d0iqzJ3u7JLQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=lq2n+zLL; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D676606A320; Wed, 18 Nov 2026 22:52:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=lq2n+zLL Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72EBB1F000C4; Wed, 18 Nov 2026 22:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795042366; bh=/dd/zQFGvTtJaj+ljphUKAZnTTYMN9GG3NGUEnDuIy0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=lq2n+zLLl3pQ3c6++cq7RWhBWrSXCKUIX0ur2jbULwJZkIGC2MvsBfTBzHuWVzhOJ yunzgLO3y3Z74KxwPs6TvGix0kE2WH3mkD4eABwoH7dL45v6Qc7npy4jIR3dJSAoDV yGE24vxXMOt548cNl83fw+Fj53mF6CSyFyFMmAMY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Florian Fuchs , Adrian McMenamin , Takashi Iwai , Sasha Levin Subject: [PATCH 6.6 3144/3318] ALSA: sh: aica: Fix spu_memset() stride Date: Wed, 18 Nov 2026 16:02:46 +0100 Message-ID: <20261118150454.191880032@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150313.527275416@linuxfoundation.org> References: <20261118150313.527275416@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Fuchs [ Upstream commit 0d01f90b07e877ef31f9959e9b0bc6bcca9b99df ] spu_memset() writes one 32-bit word per iteration, but advances the destination offset by only one byte. spu_reset() calls it with 0x200000 / 4 words to clear the 2 MiB of sound RAM, so: - three out of four writel() calls target an unaligned address. The SH4 can't do that. Each one traps and is emulated by the unaligned access fixup. This call to spu_memset() causes 393216 unaligned accesses, visible in /proc/cpu/alignment. - the clear covered only about 512 KiB of sound RAM, not 2 MiB. Advance the offset by the size of the written word, to clear the full sound RAM using aligned writes. Fixes: 198de43d758c ("[ALSA] Add ALSA support for the SEGA Dreamcast PCM device") Signed-off-by: Florian Fuchs Acked-by: Adrian McMenamin Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261022163241.2504922-1-fuchsfl@gmail.com Signed-off-by: Sasha Levin --- sound/sh/aica.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/sh/aica.c b/sound/sh/aica.c index 3182c634464d4..7e7e928a9d057 100644 --- a/sound/sh/aica.c +++ b/sound/sh/aica.c @@ -95,7 +95,7 @@ static void spu_memset(u32 toi, u32 what, int length) local_irq_save(flags); writel(what, toi + SPU_MEMORY_BASE); local_irq_restore(flags); - toi++; + toi += sizeof(what); } } -- 2.53.0