Date: Fri, 13 Feb 2015 00:17:22 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278648 - in stable/10/sys/arm: arm include Message-ID: <201502130017.t1D0HMDl096930@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Fri Feb 13 00:17:22 2015 New Revision: 278648 URL: https://svnweb.freebsd.org/changeset/base/278648 Log: MFC r276519: Define a WFI macro that expands to the right form of wait-for-interrupt depending on the architecture. Modified: stable/10/sys/arm/arm/locore-v6.S stable/10/sys/arm/include/asm.h stable/10/sys/arm/include/sysreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/locore-v6.S ============================================================================== --- stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:16:05 2015 (r278647) +++ stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:17:22 2015 (r278648) @@ -461,7 +461,7 @@ ENTRY_NP(cpu_halt) teq r4, #0 movne pc, r4 1: - wfi + WFI b 1b /* Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Fri Feb 13 00:16:05 2015 (r278647) +++ stable/10/sys/arm/include/asm.h Fri Feb 13 00:17:22 2015 (r278648) @@ -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_ */ Modified: stable/10/sys/arm/include/sysreg.h ============================================================================== --- stable/10/sys/arm/include/sysreg.h Fri Feb 13 00:16:05 2015 (r278647) +++ stable/10/sys/arm/include/sysreg.h Fri Feb 13 00:17:22 2015 (r278648) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502130017.t1D0HMDl096930>