From: Nathan Lynch <ntl@pobox.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH v3] fix multiple bugs in rtas_ibm_suspend_me code
Date: Tue, 13 Nov 2007 10:25:22 -0600 [thread overview]
Message-ID: <20071113162522.GJ26313@localdomain> (raw)
In-Reply-To: <20071113161513.GI26313@localdomain>
Nathan Lynch wrote:
>
> 3.) H_JOIN must be called with MSR[EE] off, but lazy interrupt
> disabling may cause the caller of rtas_ibm_suspend_me to call H_JOIN
> with it on; the local_irq_disable() in on_each_cpu() is not
> sufficient.
>
> Fix this by explicitly saving the MSR and clearing the EE bit before
> calling H_JOIN.
...
> + atomic_inc(&data->working);
> +
> + /* really need to ensure MSR.EE is off for H_JOIN */
> + msr_save = mfmsr();
> + mtmsr(msr_save & ~(MSR_EE));
> +
> + rc = plpar_hcall_norets(H_JOIN);
> +
> + mtmsr(msr_save);
BTW, I'm wondering if this is the right way to do this. I think
there's the possibility that we could enter this routine hard-enabled
and take take an interrupt between the mfmsr and the first mtmsr, but
I haven't worked out all the implications. Would hard_irq_disable be
better?
prev parent reply other threads:[~2007-11-13 16:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 4:43 [RFC/PATCH] Fix rtas_ibm_suspend_me bugs Nathan Lynch
2007-11-06 23:08 ` jschopp
2007-11-07 19:19 ` Nathan Lynch
2007-11-09 20:44 ` [PATCH v2] fix multiple bugs in rtas_ibm_suspend_me code Nathan Lynch
2007-11-13 5:11 ` Paul Mackerras
2007-11-13 16:15 ` [PATCH v3] " Nathan Lynch
2007-11-13 16:25 ` Nathan Lynch [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=20071113162522.GJ26313@localdomain \
--to=ntl@pobox.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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.