Author: wma Date: Thu Jan 11 09:34:33 2018 New Revision: 327813 URL: https://svnweb.freebsd.org/changeset/base/327813
Log: PowerNV: correctly start secondary CPUs Fix AP startup, which was broken. Created by: Nathan Whitehorn <nwhiteh...@freebsd.org> Submitted by: Wojciech Macek <w...@freebsd.org> Sponsored by: FreeBSD Foundation Modified: head/sys/powerpc/powernv/platform_powernv.c Modified: head/sys/powerpc/powernv/platform_powernv.c ============================================================================== --- head/sys/powerpc/powernv/platform_powernv.c Thu Jan 11 09:26:28 2018 (r327812) +++ head/sys/powerpc/powernv/platform_powernv.c Thu Jan 11 09:34:33 2018 (r327813) @@ -71,6 +71,7 @@ static int powernv_smp_start_cpu(platform_t, struct pc 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, struct cpuref *cp 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) +{ +} _______________________________________________ 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"