From: Paul Mackerras <paulus@samba.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 4/5] ppc64: make soft_enabled irqs preempt safe
Date: Fri, 10 Nov 2006 20:18:12 +1100 [thread overview]
Message-ID: <17748.17364.884083.164844@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0610311841570.26470@blonde.wat.veritas.com>
Hugh Dickins writes:
> local_irq_restore be careful to access hard_enabled and lppaca before
> setting soft_enabled, which may well permit preemption. Use local_paca
The reason for testing hard_enabled *after* setting soft_enabled is to
avoid a race. If we load hard_enabled first, as your patch does, then
an interrupt could come in between that load and the store that sets
soft_enabled, and we would miss that and not hard-enable as we should.
I'm not sure what the solution is. I suppose we could disable
preemption, although I'd rather something lighter-weight if possible.
Paul.
next prev parent reply other threads:[~2006-11-10 9:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-31 18:39 [PATCH 1/5] ppc64: make current preempt safe Hugh Dickins
2006-10-31 18:40 ` [PATCH 2/5] ppc64: make high hugepage areas " Hugh Dickins
2006-11-01 3:42 ` David Gibson
2006-10-31 18:41 ` [PATCH 3/5] ppc64: make mmiowb's io_sync " Hugh Dickins
2006-10-31 18:43 ` [PATCH 4/5] ppc64: make soft_enabled irqs " Hugh Dickins
2006-11-10 9:18 ` Paul Mackerras [this message]
2006-11-10 21:32 ` Hugh Dickins
2006-10-31 18:44 ` [PATCH 5/5] ppc64: support CONFIG_DEBUG_PREEMPT Hugh Dickins
2007-02-25 19:04 ` [PATCH] include stddef.h in asm-powerpc/current.h to get definition of offsetof Olaf Hering
2007-02-26 11:34 ` Hugh Dickins
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=17748.17364.884083.164844@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=hugh@veritas.com \
--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).