mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
Merge "Revert "arm64: Remove unused daif related functions/macros""
This commit is contained in:
commit
5e70ff9768
2 changed files with 19 additions and 1 deletions
|
|
@ -52,8 +52,16 @@
|
|||
.endm
|
||||
|
||||
/*
|
||||
* Save/restore interrupts.
|
||||
* Enable and disable interrupts.
|
||||
*/
|
||||
.macro disable_irq
|
||||
msr daifset, #2
|
||||
.endm
|
||||
|
||||
.macro enable_irq
|
||||
msr daifclr, #2
|
||||
.endm
|
||||
|
||||
.macro save_and_disable_irq, flags
|
||||
mrs \flags, daif
|
||||
msr daifset, #2
|
||||
|
|
|
|||
|
|
@ -41,6 +41,16 @@ static inline unsigned long local_daif_save(void)
|
|||
return flags;
|
||||
}
|
||||
|
||||
static inline void local_daif_unmask(void)
|
||||
{
|
||||
trace_hardirqs_on();
|
||||
asm volatile(
|
||||
"msr daifclr, #0xf // local_daif_unmask"
|
||||
:
|
||||
:
|
||||
: "memory");
|
||||
}
|
||||
|
||||
static inline void local_daif_restore(unsigned long flags)
|
||||
{
|
||||
bool irq_disabled = flags & PSR_I_BIT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue