From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Anton Blanchard <anton@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org, paulus@samba.org
Subject: Re: [PATCH] powerpc: check_and_cede_processor never cedes
Date: Thu, 28 Jun 2012 08:51:19 +1000 [thread overview]
Message-ID: <1340837479.3732.90.camel@pasglop> (raw)
In-Reply-To: <20120628084509.4caec81d@kryten>
On Thu, 2012-06-28 at 08:45 +1000, Anton Blanchard wrote:
> hard_irq_disable();
> - if (get_paca()->irq_happened == 0)
> + if (get_paca()->irq_happened == PACA_IRQ_HARD_DIS)
> cede_processor();
I'd rather add a helper, something like lazy_irq_pending()
and hide the actual check for the bits in irq_happened, in
case we change the scheme again.
Something like:
static inline bool lazy_irq_pending(void)
{
return !!(get_paca()->irq_happened & ~PACA_IRQ_HARD_DIS);
}
Cheers,
Ben.
next prev parent reply other threads:[~2012-06-27 22:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-27 22:45 [PATCH] powerpc: check_and_cede_processor never cedes Anton Blanchard
2012-06-27 22:51 ` Benjamin Herrenschmidt [this message]
2012-06-27 23:13 ` Anton Blanchard
2012-06-28 7:10 ` Benjamin Herrenschmidt
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=1340837479.3732.90.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=anton@samba.org \
--cc=linuxppc-dev@lists.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 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).