diff options
author | Madhavan Srinivasan <maddy@linux.vnet.ibm.com> | 2017-12-20 06:55:44 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-01-19 14:36:58 +0300 |
commit | b5c1bd62c054f3cff1a672f9bf1dddefafadffec (patch) | |
tree | f7f21ad34a8ba17a32e8488c6607122ad9f27eb3 /arch/powerpc/include/asm/hw_irq.h | |
parent | 9f83e00f4cc1c560b6847acecba2b3746c8d8c06 (diff) | |
download | linux-b5c1bd62c054f3cff1a672f9bf1dddefafadffec.tar.xz |
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: Nicholas Piggin <npiggin@gmail.com>
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.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h index 4210ddbf38b0..4c54db29104f 100644 --- a/arch/powerpc/include/asm/hw_irq.h +++ b/arch/powerpc/include/asm/hw_irq.h @@ -61,18 +61,14 @@ static inline unsigned long arch_local_save_flags(void) return flags; } -static inline unsigned long arch_local_irq_disable(void) +static inline void arch_local_irq_disable(void) { - 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) + "stb %0,%1(13)" + : + : "r" (IRQS_DISABLED), + "i" (offsetof(struct paca_struct, soft_enabled)) : "memory"); - - return flags; } extern void arch_local_irq_restore(unsigned long); @@ -84,7 +80,16 @@ static inline void arch_local_irq_enable(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) |