From owner-svn-src-head@freebsd.org Fri Mar 17 12:34:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4554D1016E; Fri, 17 Mar 2017 12:34:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74F6F1D27; Fri, 17 Mar 2017 12:34:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2HCYu1d026386; Fri, 17 Mar 2017 12:34:56 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2HCYuOJ026381; Fri, 17 Mar 2017 12:34:56 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201703171234.v2HCYuOJ026381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 17 Mar 2017 12:34:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315448 - in head/sys/arm: conf freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2017 12:34:57 -0000 Author: andrew Date: Fri Mar 17 12:34:56 2017 New Revision: 315448 URL: https://svnweb.freebsd.org/changeset/base/315448 Log: Move the IMX6 kernels to use PLATFORM_SMP. This is the last SMP config to be migrated to this and will allow the removal of this option. Reviewed by: ian Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D9907 Added: head/sys/arm/freescale/imx/imx6_mp.h (contents, props changed) Modified: head/sys/arm/conf/IMX6 head/sys/arm/freescale/imx/imx6_machdep.c head/sys/arm/freescale/imx/imx6_mp.c Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Fri Mar 17 11:45:46 2017 (r315447) +++ head/sys/arm/conf/IMX6 Fri Mar 17 12:34:56 2017 (r315448) @@ -30,6 +30,7 @@ options SCHED_ULE # ULE scheduler #options NFSD # Network Filesystem Server options INCLUDE_CONFIG_FILE # Include this file in kernel options PLATFORM +options PLATFORM_SMP options SMP # Enable multiple cores # NFS root from boopt/dhcp Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Fri Mar 17 11:45:46 2017 (r315447) +++ head/sys/arm/freescale/imx/imx6_machdep.c Fri Mar 17 12:34:56 2017 (r315448) @@ -50,6 +50,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "platform_if.h" static uint32_t gpio1_node; @@ -346,6 +348,11 @@ static platform_method_t imx6_methods[] PLATFORMMETHOD(platform_late_init, imx6_late_init), PLATFORMMETHOD(platform_cpu_reset, imx6_cpu_reset), +#ifdef SMP + PLATFORMMETHOD(platform_mp_start_ap, imx6_mp_start_ap), + PLATFORMMETHOD(platform_mp_setmaxid, imx6_mp_setmaxid), +#endif + PLATFORMMETHOD_END, }; Modified: head/sys/arm/freescale/imx/imx6_mp.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_mp.c Fri Mar 17 11:45:46 2017 (r315447) +++ head/sys/arm/freescale/imx/imx6_mp.c Fri Mar 17 12:34:56 2017 (r315448) @@ -41,6 +41,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include + +#include #define SCU_PHYSBASE 0x00a00000 #define SCU_SIZE 0x00001000 @@ -67,7 +71,7 @@ __FBSDID("$FreeBSD$"); #define SRC_GPR1_C1ARG 0x24 /* Register for Core 1 entry arg */ void -platform_mp_setmaxid(void) +imx6_mp_setmaxid(platform_t plat) { bus_space_handle_t scu; int hwcpu, ncpu; @@ -92,8 +96,8 @@ platform_mp_setmaxid(void) mp_maxid = ncpu - 1; } -void -platform_mp_start_ap(void) +void +imx6_mp_start_ap(platform_t plat) { bus_space_handle_t scu; bus_space_handle_t src; Added: head/sys/arm/freescale/imx/imx6_mp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx6_mp.h Fri Mar 17 12:34:56 2017 (r315448) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2017 Andrew Turner + * 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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 IMX6_MP_H +#define IMX6_MP_H + +void imx6_mp_start_ap(platform_t); +void imx6_mp_setmaxid(platform_t); + +#endif /* IMX6_MP_H */