All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Valentin Schneider <valentin.schneider@arm.com>,
	linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
	Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Marc Zyngier <maz@kernel.org>,
	Mel Gorman <mgorman@techsingularity.net>
Subject: Re: [SPLAT 1/3] arm_pmu: Sleeping spinlocks down armpmu_alloc_atomic()
Date: Tue, 10 Aug 2021 20:39:14 +0200	[thread overview]
Message-ID: <20210810183914.2wd7hehdz7y4crla@linutronix.de> (raw)
In-Reply-To: <874kbxqkyk.ffs@tglx>

On 2021-08-10 19:16:19 [+0200], Thomas Gleixner wrote:
> On Tue, Aug 10 2021 at 15:54, Sebastian Andrzej Siewior wrote:
> > On 2021-08-10 14:41:25 [+0100], Valentin Schneider wrote:
> >> [    4.172817] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:35
> >
> > Would it work to allocate the memory upfront and invoke the HP callback
> > via smp_function_call()?
> 
> Huch? If the memory is allocated during the prepare stage then the
> actual hotplug callback can just use it. So what's the SMP function call
> for?

You allocate the memory per-node (based on cpuid id) and you figure that
out on the target CPU. That is the smp-function call for unless there
another way to gather that information.
That is done in
 arm_pmu_acpi_find_alloc_pmu() -> read_cpuid_id()

> Thanks,
> 
>         tglx

Sebastian

  reply	other threads:[~2021-08-10 18:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10 13:41 [SPLAT 0/3] Sleeping spinlocks in troublesome contexts on v5.14-rc4-rt6 Valentin Schneider
2021-08-10 13:41 ` [SPLAT 1/3] arm_pmu: Sleeping spinlocks down armpmu_alloc_atomic() Valentin Schneider
2021-08-10 13:54   ` Sebastian Andrzej Siewior
2021-08-10 17:16     ` Thomas Gleixner
2021-08-10 18:39       ` Sebastian Andrzej Siewior [this message]
2021-08-10 19:56         ` Thomas Gleixner
2021-08-10 13:41 ` [SPLAT 2/3] irqchip/gic-v3-its: Sleeping spinlocks down gic_reserve_range() Valentin Schneider
2021-08-11  8:50   ` Marc Zyngier
2021-08-11 12:28     ` Thomas Gleixner
2021-08-11 15:14       ` Marc Zyngier
2021-08-17 15:16     ` Ard Biesheuvel
2021-08-10 13:41 ` [SPLAT 3/3] gpio: dwapb: Sleeping spinlocks down IRQ mapping Valentin Schneider
2021-08-10 20:33   ` Thomas Gleixner
2021-08-11 10:52   ` Andy Shevchenko

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=20210810183914.2wd7hehdz7y4crla@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=tglx@linutronix.de \
    --cc=valentin.schneider@arm.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 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.