opnsense-src/sys/mips
Kyle Evans 00bc7bbde5 sched: separate out schedinit_ap()
schedinit_ap() sets up an AP for a later call to sched_throw(NULL).

Currently, ULE sets up some pcpu bits and fixes the idlethread lock with
a call to sched_throw(NULL); this results in a window where curthread is
setup in platforms' init_secondary(), but it has the wrong td_lock.
Typical platform AP startup procedure looks something like:

- Setup curthread
- ... other stuff, including cpu_initclocks_ap()
- Signal smp_started
- sched_throw(NULL) to enter the scheduler

cpu_initclocks_ap() may have callouts to process (e.g., nvme) and
attempt to sched_add() for this AP, but this attempt fails because
of the noted violated assumption leading to locking heartburn in
sched_setpreempt().

Interrupts are still disabled until cpu_throw() so we're not really at
risk of being preempted -- just let the scheduler in on it a little
earlier as part of setting up curthread.

(cherry picked from commit 589aed00e3)
2022-02-10 14:55:29 -06:00
..
atheros Avoid dump_avail[] redefinition. 2020-10-14 22:51:40 +00:00
beri Avoid dump_avail[] redefinition. 2020-10-14 22:51:40 +00:00
broadcom Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2022-02-08 15:00:55 -05:00
cavium Fix a common typo in source code comments 2021-09-07 09:24:05 +02:00
conf hid: Import functions and constants required by new subsystem 2021-01-08 02:18:42 +03:00
include Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2022-02-08 15:00:55 -05:00
ingenic mips: Fix build by using the correct device-tree include path 2021-01-16 11:34:10 +01:00
malta mips: fix build w/ TICK_USE_MALTA_RTC defined 2020-12-25 19:47:45 +01:00
mediatek mips: Fix build by using the correct device-tree include path 2021-01-16 11:34:10 +01:00
mips sched: separate out schedinit_ap() 2022-02-10 14:55:29 -06:00
nlm crypto: Add a new type of crypto buffer for a single mbuf. 2021-10-21 08:51:26 -07:00