linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Michael Ellerman <mpe@ellerman.id.au>, <linuxppc-dev@ozlabs.org>
Subject: Re: [1/5] powerpc/rtas: Add rtas_call_unlocked()
Date: Thu, 17 Dec 2015 22:57:31 +1100 (AEDT)	[thread overview]
Message-ID: <20151217115731.401DD1402C0@ozlabs.org> (raw)
In-Reply-To: <1448364372-28065-1-git-send-email-mpe@ellerman.id.au>

On Tue, 2015-24-11 at 11:26:08 UTC, 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>

Series applied to powerpc next.

https://git.kernel.org/powerpc/c/209eb4e5cbaba53ab555f3e7b4

cheers

      parent reply	other threads:[~2015-12-17 11:57 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 ` [PATCH 1/5] powerpc/rtas: Add rtas_call_unlocked() Michael Ellerman
2015-12-17 11:57 ` Michael Ellerman [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=20151217115731.401DD1402C0@ozlabs.org \
    --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).