opnsense-src/sys/mips/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
..
autoconf.c
bcopy.S
bus_space_generic.c
busdma_machdep.c busdma: Remove outdated comments about Giant. 2021-12-23 20:05:17 -05:00
cache.c
cache_mipsNN.c mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
cpu.c mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
db_disasm.c
db_interface.c mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
db_trace.c ddb: replace watchpoint set/clear functions 2021-04-21 10:20:33 -03:00
dump_machdep.c
elf_machdep.c Do not call FreeBSD-ABI specific code for all ABIs 2021-07-22 01:11:52 +03:00
elf_trampoline.c mips: Fix a typo in a source code comment 2021-12-03 16:53:27 +01:00
exception.S MFC: mips: fix early kernel panic when setting up interrupt counters 2021-02-02 21:06:37 -08:00
fp.S
freebsd32_machdep.c random(4) FenestrasX: Push root seed version to arc4random(3) 2020-10-10 21:52:00 +00:00
gdb_machdep.c mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
genassym.c Various fixes to TLS for MIPS. 2020-06-12 21:21:18 +00:00
inckern.S
intr_machdep.c MFC: mips: fix early kernel panic when setting up interrupt counters 2021-02-02 21:06:37 -08:00
libkern_machdep.c
locore.S
machdep.c [PowerPC] More relocation fixes 2020-06-21 03:39:26 +00:00
mem.c Add the MEM_EXTRACT_PADDR ioctl to /dev/mem. 2020-09-02 18:12:47 +00:00
minidump_machdep.c Allow minidumps to be performed on the live system 2021-12-03 10:02:03 -04:00
mips_pic.c mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
mp_machdep.c sched: separate out schedinit_ap() 2022-02-10 14:55:29 -06:00
mpboot.S
nexus.c make maximum interrupt number tunable on ARM, ARM64, MIPS, and RISC-V 2021-01-18 16:36:39 -08:00
octeon_cop2.c Fix UMA alignment for COP2 context structure. 2020-11-04 23:29:27 +00:00
octeon_cop2_swtch.S
ofw_machdep.c
pm_machdep.c mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
pmap.c Convert vm_page_alloc() callers to use vm_page_alloc_noobj(). 2021-11-03 13:39:36 -04:00
ptrace_machdep.c
sc_machdep.c
stack_machdep.c Make stack_save*() more robust on MIPS. 2020-12-01 17:17:22 +00:00
stdatomic.c
support.S mips: Implement suword16 2022-01-07 14:30:18 +01:00
swtch.S Various fixes to TLS for MIPS. 2020-06-12 21:21:18 +00:00
sys_machdep.c Various fixes to TLS for MIPS. 2020-06-12 21:21:18 +00:00
tick.c mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
tlb.c
trap.c Handle KDB_WHY_TRAP return on arm and mips 2021-01-02 19:07:04 -04:00
uio_machdep.c
uma_machdep.c Convert vm_page_alloc() callers to use vm_page_alloc_noobj(). 2021-11-03 13:39:36 -04:00
vm_machdep.c mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00