From owner-svn-src-projects@FreeBSD.ORG Sun Jan 25 02:48:27 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14450C00; Sun, 25 Jan 2015 02:48:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 014AA38C; Sun, 25 Jan 2015 02:48:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0P2mQ6E062140; Sun, 25 Jan 2015 02:48:26 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0P2mQdk062139; Sun, 25 Jan 2015 02:48:26 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501250248.t0P2mQdk062139@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 25 Jan 2015 02:48:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r277672 - projects/powernv/powerpc/powernv X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 02:48:27 -0000 Author: nwhitehorn Date: Sun Jan 25 02:48:26 2015 New Revision: 277672 URL: https://svnweb.freebsd.org/changeset/base/277672 Log: Correctly start secondary CPUs. Modified: projects/powernv/powerpc/powernv/platform_powernv.c Modified: projects/powernv/powerpc/powernv/platform_powernv.c ============================================================================== --- projects/powernv/powerpc/powernv/platform_powernv.c Sun Jan 25 02:47:35 2015 (r277671) +++ projects/powernv/powerpc/powernv/platform_powernv.c Sun Jan 25 02:48:26 2015 (r277672) @@ -71,6 +71,7 @@ static int powernv_smp_start_cpu(platfor static struct cpu_group *powernv_smp_topo(platform_t plat); #endif static void powernv_reset(platform_t); +static void powernv_cpu_idle(sbintime_t sbt); static platform_method_t powernv_methods[] = { PLATFORMMETHOD(platform_probe, powernv_probe), @@ -115,6 +116,8 @@ powernv_attach(platform_t plat) /* Ping OPAL again just to make sure */ opal_check(); + cpu_idle_hook = powernv_cpu_idle; + return (0); } @@ -270,23 +273,19 @@ powernv_smp_get_bsp(platform_t plat, str static int powernv_smp_start_cpu(platform_t plat, struct pcpu *pc) { - int result, err, timeout; + int result; ap_pcpu = pc; powerpc_sync(); result = opal_call(OPAL_START_CPU, pc->pc_cpuid, EXC_RST); - if (result < 0 || err != 0) { - printf("OPAL error (%d/%d): unable to start AP %d\n", - result, err, pc->pc_cpuid); + if (result != OPAL_SUCCESS) { + printf("OPAL error (%d): unable to start AP %d\n", + result, pc->pc_cpuid); return (ENXIO); } - timeout = 10000; - while (!pc->pc_awake && timeout--) - DELAY(100); - - return ((pc->pc_awake) ? 0 : EBUSY); + return (0); } static struct cpu_group * @@ -333,3 +332,7 @@ powernv_smp_ap_init(platform_t platform) { } +static void +powernv_cpu_idle(sbintime_t sbt) +{ +}