Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Krishna Reddy <vdumpa@nvidia.com>, Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joro@8bytes.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	linux-kernel@vger.kernel.org, iommu@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-tegra@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>,
	linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH] iommu/tegra241-cmdqv: do not call smp_processor_id in preemptible context
Date: Tue, 19 Nov 2024 08:15:10 +0100	[thread overview]
Message-ID: <20241119071510.-6OKEw2q@linutronix.de> (raw)
In-Reply-To: <ZzvZkMKhwmJESpdM@uudg.org>

On 2024-11-18 21:19:28 [-0300], Luis Claudio R. Goncalves wrote:
> With PREEMPT_RT enabled some of the calls to tegra241_cmdqv_get_cmdq()
> during boot will happen in preemptible context. As this function calls
> smp_processor_id(), these calls will trigger a "BUG: using smp_processor_id()
> in preemptible" backtrace if DEBUG_PREEMPT is enabled.

If this is only on PREEMPT_RT, where is the disabled preemption coming
from on !PREEMPT_RT?

> As tegra241_cmdqv_get_cmdq() only calls smp_processor_id() to use the
> CPU number as a factor to balance out traffic on cmdq usage, it is safe
> to use raw_smp_processor_id() here.
> 
> Signed-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>

Sebastian

  reply	other threads:[~2024-11-19  7:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-19  0:19 [PATCH] iommu/tegra241-cmdqv: do not call smp_processor_id in preemptible context Luis Claudio R. Goncalves
2024-11-19  7:15 ` Sebastian Andrzej Siewior [this message]
2024-11-19 16:55   ` Luis Claudio R. Goncalves

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=20241119071510.-6OKEw2q@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=iommu@lists.linux.dev \
    --cc=jonathanh@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=lgoncalv@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=linux-tegra@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=rostedt@goodmis.org \
    --cc=thierry.reding@gmail.com \
    --cc=vdumpa@nvidia.com \
    --cc=will@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox