The in6_setscope() function determines the scope zone id of an address
and embeds it into address. Inside the kernel we keep addresses with
embedded zone id only for two scopes: link-local and interface-local.

For other scopes this function is nop in most cases. To reduce an
overhead of locking, first check that address is capable for embedding.
Also, handle the loopback address before acquire the lock.

Sponsored by:	Yandex LLC
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@245199 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use get_pcpu() instead of using pcpup, as it's wrong for SMP.

Submitted by:	Lukasz Plachno <luk@semihalf.com>


git-svn-id: svn://svn.freebsd.org/base/head@245202 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Define IPI_IRQ_START and IPI_IRQ_END.


git-svn-id: svn://svn.freebsd.org/base/head@245203 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a "pause" to busy wait loops in the cpu reset path.

This should not matter much when running on bare metal but it makes the guest
more friendly when running inside a virtual machine.

Discussed with:	jhb
Obtained from:	NetApp


git-svn-id: svn://svn.freebsd.org/base/head@245204 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix compile warning when using GCC:
Comparison between signed and unsigned.

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@245222 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Change function argument type instead of casting.

Suggested by:	glebius @


git-svn-id: svn://svn.freebsd.org/base/head@245223 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge remote-tracking branch 'upstream/master'