From: Michael Ellerman <mpe@ellerman.id.au>
To: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 1/5] powerpc/rtas: Add rtas_call_unlocked()
Date: Tue, 24 Nov 2015 22:58:06 +1100 [thread overview]
Message-ID: <1448366286.32654.4.camel@ellerman.id.au> (raw)
In-Reply-To: <1448364372-28065-1-git-send-email-mpe@ellerman.id.au>
On Tue, 2015-11-24 at 22:26 +1100, Michael Ellerman wrote:
> Most users of RTAS (Run-Time Abstraction Services) use rtas_call(),
> which deals with locking as well as endian handling.
>
> However we have two users outside of rtas.c that can't use rtas_call()
> because they have different locking requirements.
>
> The hotplug CPU code can't take the RTAS lock because the CPU would go
> offline with the lock held and no other CPUs would be able to call RTAS
> until the CPU came back online.
>
> The xmon code doesn't want to take the lock because it would risk dead
> locking when we are trying to recover from a crash.
>
> Both sites required multiple patches when we added little endian
> support, proving that programmers can't do endian right.
>
> Although that ship has sailed, we can still clean the code up by
> providing an unlocked version of rtas_call() which avoids the need to
> open code the logic elsewhere.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>
> commit 98bd678fc89575d0f4026a3ced3de19d90d1fe72
> Author: Michael Ellerman <mpe@ellerman.id.au>
> Date: Fri May 15 16:40:48 2015 +1000
>
> powerpc/rtas: Add rtas_call_unlocked(), make enter_rtas() private
... wut.
Obviously I fubared the commit message a bit here while rebasing.
cheers
next prev parent reply other threads:[~2015-11-24 11:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 11:26 [PATCH 1/5] powerpc/rtas: Add rtas_call_unlocked() Michael Ellerman
2015-11-24 11:26 ` [PATCH 2/5] powerpc/xmon: Use rtas_call_unlocked() in xmon Michael Ellerman
2015-11-24 11:26 ` [PATCH 3/5] powerpc/pseries: Use rtas_call_unlocked() in pseries hotplug Michael Ellerman
2015-11-24 11:26 ` [PATCH 4/5] powerpc/rtas: Use rtas_call_unlocked() in call_rtas_display_status() Michael Ellerman
2015-11-24 11:26 ` [PATCH 5/5] powerpc/rtas: Make enter_rtas() private Michael Ellerman
2015-11-24 11:58 ` Michael Ellerman [this message]
2015-12-17 11:57 ` [1/5] powerpc/rtas: Add rtas_call_unlocked() 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=1448366286.32654.4.camel@ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).