aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/hw_irq.h
diff options
context:
space:
mode:
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>2017-12-20 09:25:46 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2018-01-19 22:36:59 +1100
commite0b5687bed13ddbf99985d77910b9adfd429bf12 (patch)
treec30d77598d3542c4f916f5223d35e5552d272b6b /arch/powerpc/include/asm/hw_irq.h
parentpowerpc/64: Move set_soft_enabled() and rename (diff)
downloadlinux-dev-e0b5687bed13ddbf99985d77910b9adfd429bf12.tar.xz
linux-dev-e0b5687bed13ddbf99985d77910b9adfd429bf12.zip
powerpc/64: Implement and use soft_enabled_return API
Add a new wrapper function, soft_enabled_return(), added to return paca->soft_enabled value. Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/hw_irq.h')
-rw-r--r--arch/powerpc/include/asm/hw_irq.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h
index d046d9f3b777..f9791884af08 100644
--- a/arch/powerpc/include/asm/hw_irq.h
+++ b/arch/powerpc/include/asm/hw_irq.h
@@ -49,6 +49,18 @@ extern void unknown_exception(struct pt_regs *regs);
#ifdef CONFIG_PPC64
#include <asm/paca.h>
+static inline notrace unsigned long soft_enabled_return(void)
+{
+ unsigned long flags;
+
+ asm volatile(
+ "lbz %0,%1(13)"
+ : "=r" (flags)
+ : "i" (offsetof(struct paca_struct, soft_enabled)));
+
+ return flags;
+}
+
/*
* The "memory" clobber acts as both a compiler barrier
* for the critical section and as a clobber because
@@ -66,14 +78,7 @@ static inline notrace void soft_enabled_set(unsigned long enable)
static inline unsigned long arch_local_save_flags(void)
{
- unsigned long flags;
-
- asm volatile(
- "lbz %0,%1(13)"
- : "=r" (flags)
- : "i" (offsetof(struct paca_struct, soft_enabled)));
-
- return flags;
+ return soft_enabled_return();
}
static inline void arch_local_irq_disable(void)