Date: Fri, 18 Nov 2016 22:58:47 +0000 (UTC) From: Olivier Houchard <cognet@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308816 - in head/sys/arm: conf ti ti/omap4 Message-ID: <201611182258.uAIMwlLx028547@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cognet Date: Fri Nov 18 22:58:47 2016 New Revision: 308816 URL: https://svnweb.freebsd.org/changeset/base/308816 Log: Convert the omap4 code to use PLATFORM_SMP. Added: head/sys/arm/ti/omap4/omap4_mp.h (contents, props changed) Modified: head/sys/arm/conf/PANDABOARD head/sys/arm/ti/omap4/omap4_mp.c head/sys/arm/ti/ti_machdep.c Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Fri Nov 18 22:28:57 2016 (r308815) +++ head/sys/arm/conf/PANDABOARD Fri Nov 18 22:58:47 2016 (r308816) @@ -34,6 +34,7 @@ makeoptions MODULES_EXTRA=dtb/omap4 options SCHED_ULE # ULE scheduler options PLATFORM +options PLATFORM_SMP options SMP # Enable multiple cores # NFS root from boopt/dhcp Modified: head/sys/arm/ti/omap4/omap4_mp.c ============================================================================== --- head/sys/arm/ti/omap4/omap4_mp.c Fri Nov 18 22:28:57 2016 (r308815) +++ head/sys/arm/ti/omap4/omap4_mp.c Fri Nov 18 22:58:47 2016 (r308816) @@ -38,20 +38,24 @@ __FBSDID("$FreeBSD$"); #include <machine/smp.h> #include <machine/fdt.h> #include <machine/intr.h> +#include <machine/platformvar.h> #include <arm/ti/ti_smc.h> #include <arm/ti/omap4/omap4_smc.h> +#include <arm/ti/omap4/omap4_mp.h> void -platform_mp_setmaxid(void) +omap4_mp_setmaxid(platform_t plat) { + if (mp_ncpus != 0) + return; mp_maxid = 1; mp_ncpus = 2; } void -platform_mp_start_ap(void) +omap4_mp_start_ap(platform_t plat) { bus_addr_t scu_addr; Added: head/sys/arm/ti/omap4/omap4_mp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/omap4/omap4_mp.h Fri Nov 18 22:58:47 2016 (r308816) @@ -0,0 +1,33 @@ +/*- + * Copyright (c) 2016 Olivier Houchard <cognet@FreeBSD.org> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _OMAP4_MP_H_ +#define _OMAP4_MP_H_ +void omap4_mp_setmaxid(platform_t plat); +void omap4_mp_start_ap(platform_t plat); +#endif /* _OMAP4_MP_H_ */ + Modified: head/sys/arm/ti/ti_machdep.c ============================================================================== --- head/sys/arm/ti/ti_machdep.c Fri Nov 18 22:28:57 2016 (r308815) +++ head/sys/arm/ti/ti_machdep.c Fri Nov 18 22:58:47 2016 (r308816) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include <machine/platformvar.h> #include <arm/ti/omap4/omap4_reg.h> +#include <arm/ti/omap4/omap4_mp.h> #include "platform_if.h" @@ -110,6 +111,10 @@ static platform_method_t omap4_methods[] PLATFORMMETHOD(platform_lastaddr, ti_lastaddr), PLATFORMMETHOD(platform_cpu_reset, ti_plat_cpu_reset), +#ifdef SMP + PLATFORMMETHOD(platform_mp_start_ap, omap4_mp_start_ap), + PLATFORMMETHOD(platform_mp_setmaxid, omap4_mp_setmaxid), +#endif PLATFORMMETHOD_END, }; FDT_PLATFORM_DEF(omap4, "omap4", 0, "ti,omap4430", 0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611182258.uAIMwlLx028547>