Commit b5c1bd62 authored by Madhavan Srinivasan's avatar Madhavan Srinivasan Committed by Michael Ellerman

powerpc/64: Fix arch_local_irq_disable() prototype

In powerpc/64, the arch_local_irq_disable() function returns unsigned
long, which is not consistent with other architectures.

Move that set-return asm implementation into arch_local_irq_save(),
and make arch_local_irq_disable() return void, simplifying the
assembly.
Suggested-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 9f83e00f
...@@ -61,18 +61,14 @@ static inline unsigned long arch_local_save_flags(void) ...@@ -61,18 +61,14 @@ static inline unsigned long arch_local_save_flags(void)
return flags; return flags;
} }
static inline unsigned long arch_local_irq_disable(void) static inline void arch_local_irq_disable(void)
{ {
unsigned long flags;
asm volatile( asm volatile(
"lbz %0,%1(13); stb %2,%1(13)" "stb %0,%1(13)"
: "=&r" (flags) :
: "i" (offsetof(struct paca_struct, soft_enabled)), : "r" (IRQS_DISABLED),
"r" (IRQS_DISABLED) "i" (offsetof(struct paca_struct, soft_enabled))
: "memory"); : "memory");
return flags;
} }
extern void arch_local_irq_restore(unsigned long); extern void arch_local_irq_restore(unsigned long);
...@@ -84,7 +80,16 @@ static inline void arch_local_irq_enable(void) ...@@ -84,7 +80,16 @@ static inline void arch_local_irq_enable(void)
static inline unsigned long arch_local_irq_save(void) static inline unsigned long arch_local_irq_save(void)
{ {
return arch_local_irq_disable(); unsigned long flags;
asm volatile(
"lbz %0,%1(13); stb %2,%1(13)"
: "=&r" (flags)
: "i" (offsetof(struct paca_struct, soft_enabled)),
"r" (IRQS_DISABLED)
: "memory");
return flags;
} }
static inline bool arch_irqs_disabled_flags(unsigned long flags) static inline bool arch_irqs_disabled_flags(unsigned long flags)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment