mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Florian Fuchs <fuchsfl@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, Kees Cook <kees@kernel.org>,
	Markus Elfring <elfring@users.sourceforge.net>,
	Adrian McMenamin <adrianmcmenamin@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: sh: aica: Fix spu_memset() stride
Date: Fri, 23 Oct 2026 15:41:43 +0200	[thread overview]
Message-ID: <87a4o4a608.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261022163241.2504922-1-fuchsfl@gmail.com>

On Thu, 22 Oct 2026 18:32:41 +0200,
Florian Fuchs wrote:
> 
> 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 <fuchsfl@gmail.com>

Applied now.  Thanks.


Takashi

      parent reply	other threads:[~2026-10-23 13:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 16:32 Florian Fuchs
2026-10-22 20:48 ` Adrian McMenamin
2026-10-23 13:41 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a4o4a608.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=adrianmcmenamin@gmail.com \
    --cc=elfring@users.sourceforge.net \
    --cc=fuchsfl@gmail.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®