linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linuxppc-dev@ozlabs.org
Subject: [PATCH] Make hard_irq_disable() actually hard-disable interrupts
Date: Thu, 14 Jun 2012 20:31:12 +1000	[thread overview]
Message-ID: <20120614103112.GA15685@bloggs.ozlabs.ibm.com> (raw)

At present, hard_irq_disable() does nothing because of this code in
include/linux/interrupt.h:

#ifndef hard_irq_disable
#define hard_irq_disable()	do { } while(0)
#endif

So we need to make our hard_irq_disable() be a macro.

Signed-off-by: Paul Mackerras <paulus@samba.org>

---
 arch/powerpc/include/asm/hw_irq.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h
index c9aac24..d8f873f 100644
--- a/arch/powerpc/include/asm/hw_irq.h
+++ b/arch/powerpc/include/asm/hw_irq.h
@@ -93,12 +93,13 @@ static inline bool arch_irqs_disabled(void)
 #define __hard_irq_disable()	__mtmsrd(local_paca->kernel_msr, 1)
 #endif
 
-static inline void hard_irq_disable(void)
+static inline void _hard_irq_disable(void)
 {
 	__hard_irq_disable();
 	get_paca()->soft_enabled = 0;
 	get_paca()->irq_happened |= PACA_IRQ_HARD_DIS;
 }
+#define hard_irq_disable()	_hard_irq_disable()
 
 /*
  * This is called by asynchronous interrupts to conditionally

             reply	other threads:[~2012-06-14 10:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-14 10:31 Paul Mackerras [this message]
2012-06-14 11:34 ` [PATCH] Make hard_irq_disable() actually hard-disable interrupts 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=20120614103112.GA15685@bloggs.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=benh@kernel.crashing.org \
    --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).