From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-i2c@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
Waiman Long <longman@redhat.com>,
linux-rt-devel@lists.linux.dev,
Andi Shyti <andi.shyti@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>
Subject: Re: [BUG] exynos5_i2c_xfer_atomic() can sleep.
Date: Fri, 8 May 2026 17:52:31 +0200 [thread overview]
Message-ID: <20260508155231.fe3abjlF@linutronix.de> (raw)
In-Reply-To: <55bdf688-85f5-4b2b-9e90-b4a2c671250f@samsung.com>
On 2026-05-08 17:28:10 [+0200], Marek Szyprowski wrote:
> On 08.05.2026 12:42, Sebastian Andrzej Siewior wrote:
> > On 2026-05-08 12:35:51 [+0200], Marek Szyprowski wrote:
> >> Ah, it looks that I've checked irq_disable() code, so that's why I
> >> didn't find might_sleep() call. In the case of exynos5_i2c driver,
> >> probably switching to disable_irq_nosync() will be enough. I assume
> >> that all previous transfers have to be finished to start this atomic
> >> one, so waiting for interrupts to finish is not needed.
> > This looks kind of odd. Are the "other" transfers really done at this
> > point? Do you have a backtrace for me from the atomic path?
>
> I thought that i2c core somehow serializes the transfers for the given master.
>
> > Is this needed because you need to send the "power off" command via i2c?
>
> Yes, most embedded boards do power off by sending i2c command to PMIC chip.
I'm wondering if you could "avoid" the interrupts-off part since
kernel_power_off() is called from preemtible context.
>
> > Could you try to test with PREEMPT_RT? I'm sure how this works there.
>
> I will check this, but so far I run all my tests without PREEMPT_RT
Right. I am curious if interrupts are really disabled on PREEMPT_RT or
if this happens as a side-effect of something that does not happen with
PREEMPT_RT enabled.
> Best regards
Sebastian
prev parent reply other threads:[~2026-05-08 15:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260506065541eucas1p2f986355d0a06ac1f72aa00e8d3148ad0@eucas1p2.samsung.com>
2026-05-06 6:51 ` [BUG] exynos5_i2c_xfer_atomic() can sleep Sebastian Andrzej Siewior
2026-05-08 9:45 ` Marek Szyprowski
2026-05-08 10:09 ` Sebastian Andrzej Siewior
2026-05-08 10:35 ` Marek Szyprowski
2026-05-08 10:42 ` Sebastian Andrzej Siewior
2026-05-08 15:28 ` Marek Szyprowski
2026-05-08 15:52 ` Sebastian Andrzej Siewior [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=20260508155231.fe3abjlF@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=alim.akhtar@samsung.com \
--cc=andi.shyti@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=longman@redhat.com \
--cc=m.szyprowski@samsung.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