From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: adc: ti-ads7950: use iio_push_to_buffers_with_ts_unaligned()
Date: Wed, 25 Mar 2026 07:56:31 -0700 [thread overview]
Message-ID: <acP3aiLCZkYEXhqc@google.com> (raw)
In-Reply-To: <acBtUzrkMGK2Wd19@google.com>
On Sun, Mar 22, 2026 at 03:30:21PM -0700, Dmitry Torokhov wrote:
> On Sat, Mar 21, 2026 at 09:05:39PM +0000, Jonathan Cameron wrote:
> > On Sat, 14 Mar 2026 16:12:24 -0500
> > David Lechner <dlechner@baylibre.com> wrote:
> >
> > > Use iio_push_to_buffers_with_ts_unaligned() to avoid unaligned access
> > > when writing the timestamp in the rx_buf.
> > >
> > > The previous implementation would have been fine on architectures that
> > > support 4-byte alignment of 64-bit integers but could cause issues on
> > > architectures that require 8-byte alignment.
> > >
> > > Fixes: 902c4b2446d4 ("iio: adc: New driver for TI ADS7950 chips")
> > > Signed-off-by: David Lechner <dlechner@baylibre.com>
> > > ---
> > > Since we were looking at this driver, I was going to convert this to use
> > > IIO_DECLARE_DMA_BUFFER_WITH_TS() but then I noticed that we actually
> > > have an unaligned access problem with the timestamp since we are
> > > ignoring the first two elements in the rx_buf when pushing the data to
> > > the buffer.
> > >
> > > Unfortunately, this will cause a merge conflict with the series Dmitry
> > > is working on. I don't think there is any rush to get this backported
> > > since no one has reported a crash from unaligned access. Since fixes
> > > should go before improvements, we could apply this to iio/togreg then
> > > Dmitry can rebase his series on top of it.
> > I've done that. Applied to the togreg branch of iio.git pushed out as
> > testing etc. I've also marked it for stable so it gets picked up in the long
> > run.
>
> Cool, I'll rebase and send out my patches as soon as this hits
> linux-next.
Hm, I only see it in "testing", not in "togreg"...
--
Dmitry
next prev parent reply other threads:[~2026-03-25 14:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-14 21:12 [PATCH v2] iio: adc: ti-ads7950: use iio_push_to_buffers_with_ts_unaligned() David Lechner
2026-03-16 11:26 ` Andy Shevchenko
2026-03-16 14:58 ` David Lechner
2026-03-21 21:05 ` Jonathan Cameron
2026-03-22 22:30 ` Dmitry Torokhov
2026-03-25 14:56 ` Dmitry Torokhov [this message]
2026-03-25 20:39 ` Jonathan Cameron
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=acP3aiLCZkYEXhqc@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.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 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.