mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Define a WFI macro that expands to the right form of wait-for-interrupt
depending on the architecture.
This commit is contained in:
parent
bd96d0895e
commit
54f9ec883d
3 changed files with 5 additions and 1 deletions
|
|
@ -461,7 +461,7 @@ ENTRY_NP(cpu_halt)
|
|||
teq r4, #0
|
||||
movne pc, r4
|
||||
1:
|
||||
wfi
|
||||
WFI
|
||||
b 1b
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -227,14 +227,17 @@
|
|||
#define ISB isb
|
||||
#define DSB dsb
|
||||
#define DMB dmb
|
||||
#define WFI wfi
|
||||
#elif __ARM_ARCH == 6
|
||||
#define ISB mcr CP15_CP15ISB
|
||||
#define DSB mcr CP15_CP15DSB
|
||||
#define DMB mcr CP15_CP15DMB
|
||||
#define WFI mcr CP15_CP15WFI
|
||||
#else
|
||||
#define ISB mcr CP15_CP15ISB
|
||||
#define DSB mcr CP15_CP15DSB /* DSB and DMB are the */
|
||||
#define DMB mcr CP15_CP15DSB /* same prior to v6.*/
|
||||
/* No form of WFI available on v4, define nothing to get an error on use. */
|
||||
#endif
|
||||
|
||||
#endif /* !_MACHINE_ASM_H_ */
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@
|
|||
/* Only ARMv6: */
|
||||
#define CP15_CP15DSB p15, 0, r0, c7, c10, 4 /* DSB */
|
||||
#define CP15_CP15DMB p15, 0, r0, c7, c10, 5 /* DMB */
|
||||
#define CP15_CP15WFI p15, 0, r0, c7, c0, 4 /* WFI */
|
||||
#endif
|
||||
|
||||
#if __ARM_ARCH >= 7
|
||||
|
|
|
|||
Loading…
Reference in a new issue