svn commit: r307344 - in stable/11/sys/arm: allwinner altera/socfpga amlogic/aml8726 arm broadcom/bcm2835 freescale/imx include mv/armada38x nvidia/tegra124 rockchip samsung/exynos ti/omap4 xilinx
Michal Meloun
mmel at FreeBSD.org
Sat Oct 15 08:27:57 UTC 2016
Author: mmel
Date: Sat Oct 15 08:27:54 2016
New Revision: 307344
URL: https://svnweb.freebsd.org/changeset/base/307344
Log:
MFC r306756:
ARM: SEV/WFE instructions are implemented starting from ARMv6K, use it
directly.
Modified:
stable/11/sys/arm/allwinner/aw_mp.c
stable/11/sys/arm/altera/socfpga/socfpga_mp.c
stable/11/sys/arm/amlogic/aml8726/aml8726_mp.c
stable/11/sys/arm/arm/cpufunc_asm_armv7.S
stable/11/sys/arm/arm/mp_machdep.c
stable/11/sys/arm/broadcom/bcm2835/bcm2836_mp.c
stable/11/sys/arm/freescale/imx/imx6_mp.c
stable/11/sys/arm/include/cpu-v6.h
stable/11/sys/arm/include/cpufunc.h
stable/11/sys/arm/mv/armada38x/pmsu.c
stable/11/sys/arm/nvidia/tegra124/tegra124_mp.c
stable/11/sys/arm/rockchip/rk30xx_mp.c
stable/11/sys/arm/samsung/exynos/exynos5_mp.c
stable/11/sys/arm/ti/omap4/omap4_mp.c
stable/11/sys/arm/xilinx/zy7_mp.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/arm/allwinner/aw_mp.c
==============================================================================
--- stable/11/sys/arm/allwinner/aw_mp.c Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/allwinner/aw_mp.c Sat Oct 15 08:27:54 2016 (r307344)
@@ -193,7 +193,8 @@ aw_mp_start_ap(platform_t plat)
val |= (1 << i);
bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1, val);
- armv7_sev();
+ dsb();
+ sev();
bus_space_unmap(fdtbus_bs_tag, cpucfg, CPUCFG_SIZE);
if (soc_family != ALLWINNERSOC_SUN7I)
bus_space_unmap(fdtbus_bs_tag, prcm, PRCM_SIZE);
@@ -279,7 +280,8 @@ a83t_mp_start_ap(platform_t plat)
panic("Couldn't map the PRCM\n");
aw_mc_mp_start_ap(cpuscfg, cpuxcfg, prcm);
- armv7_sev();
+ dsb();
+ sev();
bus_space_unmap(fdtbus_bs_tag, cpuxcfg, CPUXCFG_SIZE);
bus_space_unmap(fdtbus_bs_tag, cpuscfg, CPUCFG_SIZE);
bus_space_unmap(fdtbus_bs_tag, prcm, PRCM_SIZE);
Modified: stable/11/sys/arm/altera/socfpga/socfpga_mp.c
==============================================================================
--- stable/11/sys/arm/altera/socfpga/socfpga_mp.c Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/altera/socfpga/socfpga_mp.c Sat Oct 15 08:27:54 2016 (r307344)
@@ -151,7 +151,8 @@ platform_mp_start_ap(void)
/* Put CPU1 out from reset */
bus_space_write_4(fdtbus_bs_tag, rst, MPUMODRST, 0);
- armv7_sev();
+ dsb();
+ sev();
bus_space_unmap(fdtbus_bs_tag, scu, SCU_SIZE);
bus_space_unmap(fdtbus_bs_tag, rst, RSTMGR_SIZE);
Modified: stable/11/sys/arm/amlogic/aml8726/aml8726_mp.c
==============================================================================
--- stable/11/sys/arm/amlogic/aml8726/aml8726_mp.c Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/amlogic/aml8726/aml8726_mp.c Sat Oct 15 08:27:54 2016 (r307344)
@@ -487,7 +487,8 @@ platform_mp_start_ap(void)
CPUCONF_BARRIER(AML_CPUCONF_CONTROL_REG);
/* Wakeup the now enabled APs */
- armv7_sev();
+ dsb();
+ sev();
/*
* Free the resources which are not needed after startup.
Modified: stable/11/sys/arm/arm/cpufunc_asm_armv7.S
==============================================================================
--- stable/11/sys/arm/arm/cpufunc_asm_armv7.S Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/arm/cpufunc_asm_armv7.S Sat Oct 15 08:27:54 2016 (r307344)
@@ -297,13 +297,6 @@ ENTRY(armv7_drain_writebuf)
RET
END(armv7_drain_writebuf)
-ENTRY(armv7_sev)
- dsb
- sev
- nop
- RET
-END(armv7_sev)
-
ENTRY(armv7_auxctrl)
mrc CP15_ACTLR(r2)
bic r3, r2, r0 /* Clear bits */
Modified: stable/11/sys/arm/arm/mp_machdep.c
==============================================================================
--- stable/11/sys/arm/arm/mp_machdep.c Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/arm/mp_machdep.c Sat Oct 15 08:27:54 2016 (r307344)
@@ -467,9 +467,8 @@ release_aps(void *dummy __unused)
#endif
atomic_store_rel_int(&aps_ready, 1);
/* Wake the other threads up */
-#if __ARM_ARCH >= 7
- armv7_sev();
-#endif
+ dsb();
+ sev();
printf("Release APs\n");
Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2836_mp.c
==============================================================================
--- stable/11/sys/arm/broadcom/bcm2835/bcm2836_mp.c Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/broadcom/bcm2835/bcm2836_mp.c Sat Oct 15 08:27:54 2016 (r307344)
@@ -132,7 +132,8 @@ platform_mp_start_ap(void)
} while (1);
/* dsb and sev */
- armv7_sev();
+ dsb();
+ sev();
/* recode AP in CPU map */
CPU_SET(i, &all_cpus);
Modified: stable/11/sys/arm/freescale/imx/imx6_mp.c
==============================================================================
--- stable/11/sys/arm/freescale/imx/imx6_mp.c Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/freescale/imx/imx6_mp.c Sat Oct 15 08:27:54 2016 (r307344)
@@ -150,7 +150,8 @@ platform_mp_start_ap(void)
}
bus_space_write_4(fdtbus_bs_tag, src, SRC_CONTROL_REG, val);
- armv7_sev();
+ dsb();
+ sev();
bus_space_unmap(fdtbus_bs_tag, scu, SCU_SIZE);
bus_space_unmap(fdtbus_bs_tag, src, SRC_SIZE);
Modified: stable/11/sys/arm/include/cpu-v6.h
==============================================================================
--- stable/11/sys/arm/include/cpu-v6.h Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/include/cpu-v6.h Sat Oct 15 08:27:54 2016 (r307344)
@@ -56,6 +56,8 @@ extern uint32_t ccnt_hi[MAXCPU];
extern int pmu_attched;
#endif /* DEV_PMU */
+#define sev() __asm __volatile("sev" : : : "memory")
+#define wfe() __asm __volatile("wfe" : : : "memory")
/*
* Macros to generate CP15 (system control processor) read/write functions.
Modified: stable/11/sys/arm/include/cpufunc.h
==============================================================================
--- stable/11/sys/arm/include/cpufunc.h Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/include/cpufunc.h Sat Oct 15 08:27:54 2016 (r307344)
@@ -289,7 +289,6 @@ void armv7_cpu_sleep (int);
void armv7_setup (void);
void armv7_context_switch (void);
void armv7_drain_writebuf (void);
-void armv7_sev (void);
u_int armv7_auxctrl (u_int, u_int);
void armadaxp_idcache_wbinv_all (void);
Modified: stable/11/sys/arm/mv/armada38x/pmsu.c
==============================================================================
--- stable/11/sys/arm/mv/armada38x/pmsu.c Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/mv/armada38x/pmsu.c Sat Oct 15 08:27:54 2016 (r307344)
@@ -146,7 +146,8 @@ pmsu_boot_secondary_cpu(void)
pmap_kextract((vm_offset_t)mpentry));
dcache_wbinv_poc_all();
- armv7_sev();
+ dsb();
+ sev();
bus_space_unmap(fdtbus_bs_tag, vaddr, MV_PMSU_REGS_LEN);
Modified: stable/11/sys/arm/nvidia/tegra124/tegra124_mp.c
==============================================================================
--- stable/11/sys/arm/nvidia/tegra124/tegra124_mp.c Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/nvidia/tegra124/tegra124_mp.c Sat Oct 15 08:27:54 2016 (r307344)
@@ -121,7 +121,8 @@ tegra124_mp_start_ap(platform_t plat)
}
}
- armv7_sev();
+ dsb();
+ sev();
bus_space_unmap(fdtbus_bs_tag, pmc, PMC_SIZE);
bus_space_unmap(fdtbus_bs_tag, exvec, TEGRA_EXCEPTION_VECTORS_SIZE);
}
Modified: stable/11/sys/arm/rockchip/rk30xx_mp.c
==============================================================================
--- stable/11/sys/arm/rockchip/rk30xx_mp.c Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/rockchip/rk30xx_mp.c Sat Oct 15 08:27:54 2016 (r307344)
@@ -163,7 +163,8 @@ platform_mp_start_ap(void)
val &= ~(1 << i);
bus_space_write_4(fdtbus_bs_tag, pmu, PMU_PWRDN_CON, val);
- armv7_sev();
+ dsb();
+ sev();
bus_space_unmap(fdtbus_bs_tag, scu, SCU_SIZE);
bus_space_unmap(fdtbus_bs_tag, imem, IMEM_SIZE);
Modified: stable/11/sys/arm/samsung/exynos/exynos5_mp.c
==============================================================================
--- stable/11/sys/arm/samsung/exynos/exynos5_mp.c Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/samsung/exynos/exynos5_mp.c Sat Oct 15 08:27:54 2016 (r307344)
@@ -124,7 +124,8 @@ platform_mp_start_ap(void)
dcache_wbinv_poc_all();
- armv7_sev();
+ dsb();
+ sev();
bus_space_unmap(fdtbus_bs_tag, sysram, 0x100);
bus_space_unmap(fdtbus_bs_tag, pmu, 0x20000);
}
Modified: stable/11/sys/arm/ti/omap4/omap4_mp.c
==============================================================================
--- stable/11/sys/arm/ti/omap4/omap4_mp.c Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/ti/omap4/omap4_mp.c Sat Oct 15 08:27:54 2016 (r307344)
@@ -64,6 +64,7 @@ platform_mp_start_ap(void)
ti_smc0(0x200, 0xfffffdff, MODIFY_AUX_CORE_0);
ti_smc0(pmap_kextract((vm_offset_t)mpentry), 0, WRITE_AUX_CORE_1);
- armv7_sev();
+ dsb();
+ sev();
bus_space_unmap(fdtbus_bs_tag, scu_addr, 0x1000);
}
Modified: stable/11/sys/arm/xilinx/zy7_mp.c
==============================================================================
--- stable/11/sys/arm/xilinx/zy7_mp.c Sat Oct 15 08:09:55 2016 (r307343)
+++ stable/11/sys/arm/xilinx/zy7_mp.c Sat Oct 15 08:27:54 2016 (r307344)
@@ -94,5 +94,6 @@ platform_mp_start_ap(void)
dcache_wbinv_poc_all();
/* Wake up CPU1. */
- armv7_sev();
+ dsb();
+ sev();
}
More information about the svn-src-stable-11
mailing list