Deleted Added
full compact
36c36
< __FBSDID("$FreeBSD: head/sys/kern/subr_smp.c 244444 2012-12-19 20:08:06Z jeff $");
---
> __FBSDID("$FreeBSD: head/sys/kern/subr_smp.c 255726 2013-09-20 05:06:03Z gibbs $");
227a228,239
> #ifdef XENHVM
> /*
> * When migrating a PVHVM domain we need to make sure there are
> * no IPIs in progress. IPIs that have been issued, but not
> * yet delivered (not pending on a vCPU) will be lost in the
> * IPI rebinding process, violating FreeBSD's assumption of
> * reliable IPI delivery.
> */
> if (type == IPI_SUSPEND)
> mtx_lock_spin(&smp_ipi_mtx);
> #endif
>
254a267,271
> #ifdef XENHVM
> if (type == IPI_SUSPEND)
> mtx_unlock_spin(&smp_ipi_mtx);
> #endif
>
295,296c312,313
< int
< restart_cpus(cpuset_t map)
---
> static int
> generic_restart_cpus(cpuset_t map, u_int type)
300a318
> volatile cpuset_t *cpus;
301a320,327
> KASSERT(
> #if defined(__amd64__) || defined(__i386__)
> type == IPI_STOP || type == IPI_STOP_HARD || type == IPI_SUSPEND,
> #else
> type == IPI_STOP || type == IPI_STOP_HARD,
> #endif
> ("%s: invalid stop type", __func__));
>
306a333,339
> #if defined(__amd64__) || defined(__i386__)
> if (type == IPI_SUSPEND)
> cpus = &suspended_cpus;
> else
> #endif
> cpus = &stopped_cpus;
>
311c344
< while (CPU_OVERLAP(&stopped_cpus, &map))
---
> while (CPU_OVERLAP(cpus, &map))
316a350,365
> int
> restart_cpus(cpuset_t map)
> {
>
> return (generic_restart_cpus(map, IPI_STOP));
> }
>
> #if defined(__amd64__) || defined(__i386__)
> int
> resume_cpus(cpuset_t map)
> {
>
> return (generic_restart_cpus(map, IPI_SUSPEND));
> }
> #endif
>