opnsense-src/sys/powerpc/aim
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_machdep.c powerpc64: fix OFWFB with Radix MMU 2021-11-05 11:08:27 -03:00
locore.S Add CFI start/end proc directives to arm64, i386, and ppc 2020-12-05 00:33:28 +00:00
locore32.S powerpc64: Add a trap stack area 2019-02-04 16:02:03 +00:00
locore64.S powerpc64: Fix boot on virtual-mode OF (PowerMac G5) 2021-02-09 21:19:45 -06:00
mmu_oea.c Clean up a couple of MD warts in vm_fault_populate(): 2021-12-27 19:35:55 -05:00
mmu_oea64.c powerpc64: fix the calculation of Maxmem 2022-01-10 11:36:56 -03:00
mmu_oea64.h Implement superpages for PowerPC64 (HPT) 2020-11-06 14:12:45 +00:00
mmu_radix.c powerpc64: fix the calculation of Maxmem 2022-01-10 11:36:56 -03:00
moea64_native.c [PowerPC] Fix powerpc64le boot after HPT superpages addition 2020-11-08 23:34:06 +00:00
mp_cpudep.c sched: separate out schedinit_ap() 2022-02-10 14:55:29 -06:00
slb.c Convert consumers to vm_page_alloc_noobj_contig() 2021-11-03 13:41:40 -04:00
trap_subr32.S [PowerPC] Fix invalid asm in trap code 2020-05-27 00:17:05 +00:00
trap_subr64.S Add CFI start/end proc directives to arm64, i386, and ppc 2020-12-05 00:33:28 +00:00