opnsense-src/sys/powerpc
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
..
aim sched: separate out schedinit_ap() 2022-02-10 14:55:29 -06:00
amigaone powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
booke sched: separate out schedinit_ap() 2022-02-10 14:55:29 -06:00
conf powerpc64le: add LINT64LE kernel config 2021-12-01 19:42:14 -03:00
cpufreq powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
fpu powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
include arm64, powerpc: fix calculation of 'used' in GET_STACK_USAGE 2021-12-07 14:13:47 -04:00
mambo Add CFI start/end proc directives to arm64, i386, and ppc 2020-12-05 00:33:28 +00:00
mikrotik powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
mpc85xx Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
ofw Make CPU_SET macros compliant with other implementations 2022-01-14 18:17:30 +02:00
powermac powerpc/powermac: Constrain 'cpu_sleep()' for AIM to mpc745x 2021-04-19 23:13:41 -05:00
powernv opal_console: fix serial console output corruption on powerpc64 2021-05-07 02:33:39 -03:00
powerpc sysent: Add a sv_psstringssz field to struct sysentvec 2022-01-31 09:48:11 -05:00
ps3 Add CFI start/end proc directives to arm64, i386, and ppc 2020-12-05 00:33:28 +00:00
pseries powerpc/pseries: Add new hypercall definition, H_REGISTER_PROC_TBL 2021-04-06 22:10:09 -05:00
psim powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00