Author: andrew
Date: Fri Feb 26 16:04:47 2016
New Revision: 296100
URL: https://svnweb.freebsd.org/changeset/base/296100

Log:
  Almost all copies of platform_mp_init_secondary just called
  intr_pic_init_secondary. Replace them with a direct call. On BCM2836
  and ARMADA XP we need to add this function, but it can be empty.
  
  Reviewed by:  ian, imp
  Sponsored by: ABT Systems Ltd
  Differential Revision:        https://reviews.freebsd.org/D5460

Modified:
  head/sys/arm/allwinner/a20/a20_mp.c
  head/sys/arm/altera/socfpga/socfpga_mp.c
  head/sys/arm/amlogic/aml8726/aml8726_mp.c
  head/sys/arm/annapurna/alpine/alpine_machdep_mp.c
  head/sys/arm/arm/mp_machdep.c
  head/sys/arm/broadcom/bcm2835/bcm2835_intr.c
  head/sys/arm/broadcom/bcm2835/bcm2836_mp.c
  head/sys/arm/freescale/imx/imx6_mp.c
  head/sys/arm/include/smp.h
  head/sys/arm/mv/armada38x/armada38x_mp.c
  head/sys/arm/mv/armadaxp/armadaxp_mp.c
  head/sys/arm/mv/mpic.c
  head/sys/arm/qemu/virt_mp.c
  head/sys/arm/rockchip/rk30xx_mp.c
  head/sys/arm/samsung/exynos/exynos5_mp.c
  head/sys/arm/ti/omap4/omap4_mp.c
  head/sys/arm/xilinx/zy7_mp.c

Modified: head/sys/arm/allwinner/a20/a20_mp.c
==============================================================================
--- head/sys/arm/allwinner/a20/a20_mp.c Fri Feb 26 16:00:16 2016        
(r296099)
+++ head/sys/arm/allwinner/a20/a20_mp.c Fri Feb 26 16:04:47 2016        
(r296100)
@@ -59,13 +59,6 @@ __FBSDID("$FreeBSD$");
 #define        CPUCFG_DBGCTL1          0x1e4
 
 void
-platform_mp_init_secondary(void)
-{
-
-       intr_pic_init_secondary();
-}
-
-void
 platform_mp_setmaxid(void)
 {
        int ncpu;

Modified: head/sys/arm/altera/socfpga/socfpga_mp.c
==============================================================================
--- head/sys/arm/altera/socfpga/socfpga_mp.c    Fri Feb 26 16:00:16 2016        
(r296099)
+++ head/sys/arm/altera/socfpga/socfpga_mp.c    Fri Feb 26 16:04:47 2016        
(r296100)
@@ -85,13 +85,6 @@ socfpga_trampoline(void)
 }
 
 void
-platform_mp_init_secondary(void)
-{
-
-       intr_pic_init_secondary();
-}
-
-void
 platform_mp_setmaxid(void)
 {
        int hwcpu, ncpu;

Modified: head/sys/arm/amlogic/aml8726/aml8726_mp.c
==============================================================================
--- head/sys/arm/amlogic/aml8726/aml8726_mp.c   Fri Feb 26 16:00:16 2016        
(r296099)
+++ head/sys/arm/amlogic/aml8726/aml8726_mp.c   Fri Feb 26 16:04:47 2016        
(r296100)
@@ -341,21 +341,6 @@ power_on_cpu(int cpu)
        }
 }
 
-
-void
-platform_mp_init_secondary(void)
-{
-
-       /*
-        * Consider modifying the timer driver to support
-        * per-cpu timers and then enabling the timer for
-        * each AP.
-        */
-
-        intr_pic_init_secondary();
-}
-
-
 void
 platform_mp_setmaxid(void)
 {

Modified: head/sys/arm/annapurna/alpine/alpine_machdep_mp.c
==============================================================================
--- head/sys/arm/annapurna/alpine/alpine_machdep_mp.c   Fri Feb 26 16:00:16 
2016        (r296099)
+++ head/sys/arm/annapurna/alpine/alpine_machdep_mp.c   Fri Feb 26 16:04:47 
2016        (r296100)
@@ -119,13 +119,6 @@ platform_mp_get_core_cnt(void)
 }
 
 void
-platform_mp_init_secondary(void)
-{
-
-       intr_pic_init_secondary();
-}
-
-void
 platform_mp_setmaxid(void)
 {
 

Modified: head/sys/arm/arm/mp_machdep.c
==============================================================================
--- head/sys/arm/arm/mp_machdep.c       Fri Feb 26 16:00:16 2016        
(r296099)
+++ head/sys/arm/arm/mp_machdep.c       Fri Feb 26 16:04:47 2016        
(r296100)
@@ -234,7 +234,7 @@ init_secondary(int cpu)
        cpu_initclocks_ap();
 
        CTR0(KTR_SMP, "go into scheduler");
-       platform_mp_init_secondary();
+       intr_pic_init_secondary();
 
        /* Enter the scheduler */
        sched_throw(NULL);

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_intr.c
==============================================================================
--- head/sys/arm/broadcom/bcm2835/bcm2835_intr.c        Fri Feb 26 16:00:16 
2016        (r296099)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_intr.c        Fri Feb 26 16:04:47 
2016        (r296100)
@@ -240,3 +240,10 @@ arm_unmask_irq(uintptr_t nb)
        else
                printf("arm_mask_irq: Invalid IRQ number: %d\n", nb);
 }
+
+#ifdef SMP
+void
+intr_pic_init_secondary(void)
+{
+}
+#endif

Modified: head/sys/arm/broadcom/bcm2835/bcm2836_mp.c
==============================================================================
--- head/sys/arm/broadcom/bcm2835/bcm2836_mp.c  Fri Feb 26 16:00:16 2016        
(r296099)
+++ head/sys/arm/broadcom/bcm2835/bcm2836_mp.c  Fri Feb 26 16:04:47 2016        
(r296100)
@@ -77,12 +77,6 @@ static bus_space_handle_t bs_periph;
        bus_space_write_4(fdtbus_bs_tag, bs_periph, (addr), (val))
 
 void
-platform_mp_init_secondary(void)
-{
-
-}
-
-void
 platform_mp_setmaxid(void)
 {
 

Modified: head/sys/arm/freescale/imx/imx6_mp.c
==============================================================================
--- head/sys/arm/freescale/imx/imx6_mp.c        Fri Feb 26 16:00:16 2016        
(r296099)
+++ head/sys/arm/freescale/imx/imx6_mp.c        Fri Feb 26 16:04:47 2016        
(r296100)
@@ -67,13 +67,6 @@ __FBSDID("$FreeBSD$");
 #define        SRC_GPR1_C1ARG                  0x24    /* Register for Core 1 
entry arg */
 
 void
-platform_mp_init_secondary(void)
-{
-
-       intr_pic_init_secondary();
-}
-
-void
 platform_mp_setmaxid(void)
 {
        bus_space_handle_t scu;

Modified: head/sys/arm/include/smp.h
==============================================================================
--- head/sys/arm/include/smp.h  Fri Feb 26 16:00:16 2016        (r296099)
+++ head/sys/arm/include/smp.h  Fri Feb 26 16:04:47 2016        (r296100)
@@ -46,7 +46,6 @@ int   pic_ipi_read(int arg);
 /* Platform interface */
 void   platform_mp_setmaxid(void);
 void   platform_mp_start_ap(void);
-void   platform_mp_init_secondary(void);
 
 /* global data in mp_machdep.c */
 extern struct pcb               stoppcbs[];

Modified: head/sys/arm/mv/armada38x/armada38x_mp.c
==============================================================================
--- head/sys/arm/mv/armada38x/armada38x_mp.c    Fri Feb 26 16:00:16 2016        
(r296099)
+++ head/sys/arm/mv/armada38x/armada38x_mp.c    Fri Feb 26 16:04:47 2016        
(r296100)
@@ -131,13 +131,6 @@ platform_mp_setmaxid(void)
 }
 
 void
-platform_mp_init_secondary(void)
-{
-
-       intr_pic_init_secondary();
-}
-
-void
 platform_mp_start_ap(void)
 {
        int rv;

Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c
==============================================================================
--- head/sys/arm/mv/armadaxp/armadaxp_mp.c      Fri Feb 26 16:00:16 2016        
(r296099)
+++ head/sys/arm/mv/armadaxp/armadaxp_mp.c      Fri Feb 26 16:04:47 2016        
(r296100)
@@ -87,11 +87,6 @@ platform_mp_setmaxid(void)
        mp_maxid = mp_ncpus - 1;
 }
 
-void
-platform_mp_init_secondary(void)
-{
-}
-
 void mptramp(void);
 void mptramp_end(void);
 extern vm_offset_t mptramp_pmu_boot;

Modified: head/sys/arm/mv/mpic.c
==============================================================================
--- head/sys/arm/mv/mpic.c      Fri Feb 26 16:00:16 2016        (r296099)
+++ head/sys/arm/mv/mpic.c      Fri Feb 26 16:04:47 2016        (r296100)
@@ -361,6 +361,11 @@ mv_msi_data(int irq, uint64_t *addr, uin
 
 #if defined(SMP)
 void
+intr_pic_init_secondary(void)
+{
+}
+
+void
 pic_ipi_send(cpuset_t cpus, u_int ipi)
 {
        uint32_t val, i;

Modified: head/sys/arm/qemu/virt_mp.c
==============================================================================
--- head/sys/arm/qemu/virt_mp.c Fri Feb 26 16:00:16 2016        (r296099)
+++ head/sys/arm/qemu/virt_mp.c Fri Feb 26 16:04:47 2016        (r296100)
@@ -90,10 +90,3 @@ platform_mp_start_ap(void)
 
        ofw_cpu_early_foreach(virt_start_ap, true);
 }
-
-void
-platform_mp_init_secondary(void)
-{
-
-       intr_pic_init_secondary();
-}

Modified: head/sys/arm/rockchip/rk30xx_mp.c
==============================================================================
--- head/sys/arm/rockchip/rk30xx_mp.c   Fri Feb 26 16:00:16 2016        
(r296099)
+++ head/sys/arm/rockchip/rk30xx_mp.c   Fri Feb 26 16:04:47 2016        
(r296100)
@@ -80,13 +80,6 @@ rk30xx_boot2(void)
 }
 
 void
-platform_mp_init_secondary(void)
-{
-
-       intr_pic_init_secondary();
-}
-
-void
 platform_mp_setmaxid(void)
 {
        bus_space_handle_t scu;

Modified: head/sys/arm/samsung/exynos/exynos5_mp.c
==============================================================================
--- head/sys/arm/samsung/exynos/exynos5_mp.c    Fri Feb 26 16:00:16 2016        
(r296099)
+++ head/sys/arm/samsung/exynos/exynos5_mp.c    Fri Feb 26 16:04:47 2016        
(r296100)
@@ -71,13 +71,6 @@ exynos_get_soc_id(void)
 }
 
 void
-platform_mp_init_secondary(void)
-{
-
-       intr_pic_init_secondary();
-}
-
-void
 platform_mp_setmaxid(void)
 {
 

Modified: head/sys/arm/ti/omap4/omap4_mp.c
==============================================================================
--- head/sys/arm/ti/omap4/omap4_mp.c    Fri Feb 26 16:00:16 2016        
(r296099)
+++ head/sys/arm/ti/omap4/omap4_mp.c    Fri Feb 26 16:04:47 2016        
(r296100)
@@ -43,12 +43,6 @@ __FBSDID("$FreeBSD$");
 #include <arm/ti/omap4/omap4_smc.h>
 
 void
-platform_mp_init_secondary(void)
-{
-       intr_pic_init_secondary();
-}
-
-void
 platform_mp_setmaxid(void)
 {
 

Modified: head/sys/arm/xilinx/zy7_mp.c
==============================================================================
--- head/sys/arm/xilinx/zy7_mp.c        Fri Feb 26 16:00:16 2016        
(r296099)
+++ head/sys/arm/xilinx/zy7_mp.c        Fri Feb 26 16:04:47 2016        
(r296100)
@@ -47,13 +47,6 @@ __FBSDID("$FreeBSD$");
 #define           SCU_CONTROL_ENABLE   (1 << 0)
 
 void
-platform_mp_init_secondary(void)
-{
-
-       intr_pic_init_secondary();
-}
-
-void
 platform_mp_setmaxid(void)
 {
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to