add arm64 support
- add arm64 dependent codes with GICv3 and SVE support - fix bugs based on architecture separation requests
This commit is contained in:
31
arch/arm64/kernel/include/irqflags.h
Normal file
31
arch/arm64/kernel/include/irqflags.h
Normal file
@ -0,0 +1,31 @@
|
||||
/* irqflags.h COPYRIGHT FUJITSU LIMITED 2015-2017 */
|
||||
#ifndef __HEADER_ARM64_COMMON_IRQFLAGS_H
|
||||
#define __HEADER_ARM64_COMMON_IRQFLAGS_H
|
||||
|
||||
#include <ptrace.h>
|
||||
|
||||
/*
|
||||
* save and restore debug state
|
||||
*/
|
||||
static inline unsigned long local_dbg_save(void)
|
||||
{
|
||||
unsigned long flags;
|
||||
asm volatile(
|
||||
"mrs %0, daif // local_dbg_save\n"
|
||||
"msr daifset, #8"
|
||||
: "=r" (flags)
|
||||
:
|
||||
: "memory");
|
||||
return flags;
|
||||
}
|
||||
|
||||
static inline void local_dbg_restore(unsigned long flags)
|
||||
{
|
||||
asm volatile(
|
||||
"msr daif, %0 // local_dbg_restore"
|
||||
:
|
||||
: "r" (flags)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
#endif /* !__HEADER_ARM64_COMMON_IRQFLAGS_H */
|
||||
Reference in New Issue
Block a user