[tip: locking/core] arm64: Implement arch_irqs_disabled()

From: tip-bot2 for Peter Zijlstra
Date: Thu Aug 27 2020 - 03:56:33 EST


The following commit has been merged into the locking/core branch of tip:

Commit-ID: 021c109330ebc1f54b546c63a078ea3c31356ecb
Gitweb: https://git.kernel.org/tip/021c109330ebc1f54b546c63a078ea3c31356ecb
Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
AuthorDate: Fri, 21 Aug 2020 10:40:49 +02:00
Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CommitterDate: Wed, 26 Aug 2020 12:41:55 +02:00

arm64: Implement arch_irqs_disabled()

Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
Cc: Will Deacon <will@xxxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Reviewed-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
Link: https://lkml.kernel.org/r/20200821085348.664425120@xxxxxxxxxxxxx
---
arch/arm64/include/asm/irqflags.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm64/include/asm/irqflags.h b/arch/arm64/include/asm/irqflags.h
index aa4b652..ff328e5 100644
--- a/arch/arm64/include/asm/irqflags.h
+++ b/arch/arm64/include/asm/irqflags.h
@@ -95,6 +95,11 @@ static inline int arch_irqs_disabled_flags(unsigned long flags)
return res;
}

+static inline int arch_irqs_disabled(void)
+{
+ return arch_irqs_disabled_flags(arch_local_save_flags());
+}
+
static inline unsigned long arch_local_irq_save(void)
{
unsigned long flags;