Deleted Added
full compact
mp_machdep.c (256281) mp_machdep.c (264118)
1/*-
2 * Copyright (c) 1996, by Steve Passe
3 * Copyright (c) 2008, by Kip Macy
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1996, by Steve Passe
3 * Copyright (c) 2008, by Kip Macy
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: stable/10/sys/i386/xen/mp_machdep.c 256073 2013-10-05 23:11:01Z gibbs $");
28__FBSDID("$FreeBSD: stable/10/sys/i386/xen/mp_machdep.c 264118 2014-04-04 14:54:54Z royger $");
29
30#include "opt_apic.h"
31#include "opt_cpu.h"
32#include "opt_kstack_pages.h"
33#include "opt_mp_watchdog.h"
34#include "opt_pmap.h"
35#include "opt_sched.h"
36#include "opt_smp.h"

--- 1234 unchanged lines hidden (view full) ---

1271
1272 if (cpu == 0 && cpustop_restartfunc != NULL) {
1273 cpustop_restartfunc();
1274 cpustop_restartfunc = NULL;
1275 }
1276}
1277
1278/*
29
30#include "opt_apic.h"
31#include "opt_cpu.h"
32#include "opt_kstack_pages.h"
33#include "opt_mp_watchdog.h"
34#include "opt_pmap.h"
35#include "opt_sched.h"
36#include "opt_smp.h"

--- 1234 unchanged lines hidden (view full) ---

1271
1272 if (cpu == 0 && cpustop_restartfunc != NULL) {
1273 cpustop_restartfunc();
1274 cpustop_restartfunc = NULL;
1275 }
1276}
1277
1278/*
1279 * Handlers for TLB related IPIs
1280 *
1281 * On i386 Xen PV this are no-ops since this port doesn't support SMP.
1282 */
1283void
1284invltlb_handler(void)
1285{
1286}
1287
1288void
1289invlpg_handler(void)
1290{
1291}
1292
1293void
1294invlrng_handler(void)
1295{
1296}
1297
1298void
1299invlcache_handler(void)
1300{
1301}
1302
1303/*
1279 * This is called once the rest of the system is up and running and we're
1280 * ready to let the AP's out of the pen.
1281 */
1282static void
1283release_aps(void *dummy __unused)
1284{
1285
1286 if (mp_ncpus == 1)
1287 return;
1288 atomic_store_rel_int(&aps_ready, 1);
1289 while (smp_started == 0)
1290 ia32_pause();
1291}
1292SYSINIT(start_aps, SI_SUB_SMP, SI_ORDER_FIRST, release_aps, NULL);
1293SYSINIT(start_ipis, SI_SUB_SMP, SI_ORDER_ANY, xen_smp_intr_init_cpus, NULL);
1294SYSINIT(start_cpu, SI_SUB_INTR, SI_ORDER_ANY, xen_smp_intr_setup_cpus, NULL);
1304 * This is called once the rest of the system is up and running and we're
1305 * ready to let the AP's out of the pen.
1306 */
1307static void
1308release_aps(void *dummy __unused)
1309{
1310
1311 if (mp_ncpus == 1)
1312 return;
1313 atomic_store_rel_int(&aps_ready, 1);
1314 while (smp_started == 0)
1315 ia32_pause();
1316}
1317SYSINIT(start_aps, SI_SUB_SMP, SI_ORDER_FIRST, release_aps, NULL);
1318SYSINIT(start_ipis, SI_SUB_SMP, SI_ORDER_ANY, xen_smp_intr_init_cpus, NULL);
1319SYSINIT(start_cpu, SI_SUB_INTR, SI_ORDER_ANY, xen_smp_intr_setup_cpus, NULL);