All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Kaiser <martin@kaiser.cx>
To: sashiko-reviews@lists.linux.dev
Cc: Frank.Li@kernel.org, dmaengine@vger.kernel.org,
	imx@lists.linux.dev, vkoul@kernel.org
Subject: Re: [PATCH v2] dmaengine: fsl-edma: tracing: no ptr dereference during log output
Date: Tue, 28 Jul 2026 10:19:24 +0200	[thread overview]
Message-ID: <amhmDM2DWyL3ngRc@nb282.user.codasip.com> (raw)
In-Reply-To: <20260718131453.A94821F00A3A@smtp.kernel.org>

Thus wrote sashiko-bot@kernel.org (sashiko-bot@kernel.org):

> However, edma_writel() uses iowrite32() which assumes native CPU-endian
> input:

> drivers/dma/fsl-edma-common.h:edma_writel() {

static inline void edma_writel(struct fsl_edma_engine *edma,
			       u32 val, void __iomem *addr)

where val is always little-endian

>     if (edma->big_endian)

edma->big_endian is configured from a devicetree setting. It's possible that it
doesn't match cpu endianness.

Could we check __BYTE_ORDER__ instead (or additonally)?


>         iowrite32be(val, addr);
>     else
>         iowrite32(val, addr);

The potential endianness issue affects only the value that's written to the
hardware. It's unrelated to the tracing patch that is reviewed here.

>     trace_edma_writel(edma, addr, val);

The value that's traced is always little-endian. We might have to use
le32_to_cpu(val) in the trace event definition. But again, that would be a
separate patch.

May I ask that we put the sashiko comments asided and merge the trace event
fix? (I'm happy to submit another patch for le32_to_cpu in the event.)

Thanks,
Martin

  reply	other threads:[~2026-07-28  8:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-18 12:58 [PATCH v2] dmaengine: fsl-edma: tracing: no ptr dereference during log output Martin Kaiser
2026-07-18 13:14 ` sashiko-bot
2026-07-28  8:19   ` Martin Kaiser [this message]
2026-07-28 15:38     ` Frank Li
2026-07-18 14:52 ` Frank Li

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=amhmDM2DWyL3ngRc@nb282.user.codasip.com \
    --to=martin@kaiser.cx \
    --cc=Frank.Li@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.