From: Andrew Donnellan <ajd@linux.ibm.com>
To: Nathan Lynch <nathanl@linux.ibm.com>, linuxppc-dev@lists.ozlabs.org
Cc: ldufour@linux.ibm.com, npiggin@gmail.com
Subject: Re: [PATCH v2 4/4] powerpc/rtas: upgrade internal arch spinlocks
Date: Thu, 02 Feb 2023 18:15:09 +1100 [thread overview]
Message-ID: <a4783d1674642d398c7d922f1725c9473daf5652.camel@linux.ibm.com> (raw)
In-Reply-To: <20230124140448.45938-5-nathanl@linux.ibm.com>
On Tue, 2023-01-24 at 08:04 -0600, Nathan Lynch wrote:
> At the time commit f97bb36f705d ("powerpc/rtas: Turn rtas lock into a
> raw spinlock") was written, the spinlock lockup detection code called
> __delay(), which will not make progress if the timebase is not
> advancing. Since the interprocessor timebase synchronization sequence
> for chrp, cell, and some now-unsupported Power models can temporarily
> freeze the timebase through an RTAS function (freeze-time-base), the
> lock that serializes most RTAS calls was converted to arch_spinlock_t
> to prevent kernel hangs in the lockup detection code.
>
> However, commit bc88c10d7e69 ("locking/spinlock/debug: Remove
> spinlock
> lockup detection code") removed that inconvenient property from the
> lock debug code several years ago. So now it should be safe to
> reintroduce generic locks into the RTAS support code, primarily to
> increase lockdep coverage.
>
> Making rtas_lock a spinlock_t would violate lock type nesting rules
> because it can be acquired while holding raw locks, e.g. pci_lock and
> irq_desc->lock. So convert it to raw_spinlock_t. There's no apparent
> reason not to upgrade timebase_lock as well.
>
> Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
I'm no locking expert but this looks reasonable from a quick read-
through.
Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>
--
Andrew Donnellan OzLabs, ADL Canberra
ajd@linux.ibm.com IBM Australia Limited
next prev parent reply other threads:[~2023-02-02 7:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-24 14:04 [PATCH v2 0/4] powerpc/rtas: exports and locking Nathan Lynch
2023-01-24 14:04 ` [PATCH v2 1/4] powerpc/rtas: unexport 'rtas' symbol Nathan Lynch
2023-02-02 3:55 ` Andrew Donnellan
2023-01-24 14:04 ` [PATCH v2 2/4] powerpc/rtas: make all exports GPL Nathan Lynch
2023-01-24 16:18 ` Laurent Dufour
2023-02-02 4:00 ` Andrew Donnellan
2023-01-24 14:04 ` [PATCH v2 3/4] powerpc/rtas: remove lock and args fields from global rtas struct Nathan Lynch
2023-01-24 16:21 ` Laurent Dufour
2023-02-02 4:25 ` Andrew Donnellan
2023-01-24 14:04 ` [PATCH v2 4/4] powerpc/rtas: upgrade internal arch spinlocks Nathan Lynch
2023-02-02 7:15 ` Andrew Donnellan [this message]
2023-01-24 17:23 ` [PATCH v2 0/4] powerpc/rtas: exports and locking Nathan Lynch
2023-02-05 0:47 ` Michael Ellerman
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=a4783d1674642d398c7d922f1725c9473daf5652.camel@linux.ibm.com \
--to=ajd@linux.ibm.com \
--cc=ldufour@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nathanl@linux.ibm.com \
--cc=npiggin@gmail.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;
as well as URLs for NNTP newsgroup(s).