opnsense-src/sys/arm/arm
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 arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
bcopy_page.S _ARM_ARCH_5E is always defined, we not support older CPUs. 2020-11-29 16:44:22 +00:00
bcopyinout.S _ARM_ARCH_5E is always defined, we not support older CPUs. 2020-11-29 16:44:22 +00:00
bcopyinout_xscale.S Remove remaining support of big endian byte order. 2020-11-29 15:04:39 +00:00
blockio.S
bus_space_asm_generic.S
bus_space_base.c Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
bus_space_generic.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
busdma_machdep.c busdma: Remove outdated comments about Giant. 2021-12-23 20:05:17 -05:00
copystr.S Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
cpu_asm-v6.S
cpufunc.c Remove unused functions and variables in cpufunc.[ch]. 2020-12-14 14:00:54 +00:00
cpufunc_asm.S Remove unused functions and variables in cpufunc.[ch]. 2020-12-14 14:00:54 +00:00
cpufunc_asm_arm11x6.S
cpufunc_asm_armv7.S
cpufunc_asm_pj4b.S
cpuinfo.c Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
db_disasm.c
db_interface.c Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
db_trace.c ddb: replace watchpoint set/clear functions 2021-04-21 10:20:33 -03:00
debug_monitor.c arm: implement kdb watchpoint functions 2021-04-21 10:20:33 -03:00
disassem.c Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
dump_machdep.c
elf_machdep.c sysent: Add a sv_psstringssz field to struct sysentvec 2022-01-31 09:48:11 -05:00
elf_note.S
exception.S Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
exec_machdep.c exec: Introduce the PROC_PS_STRINGS() macro 2022-01-31 09:46:57 -05:00
fiq.c Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
fiq_subr.S
fusu.S Implement suword16() for the 32-bit ARMv6/v7 architecture. 2022-01-07 14:25:23 +01:00
gdb_machdep.c arm: Let the GDB stub write to SP, LR and GP registers 2020-12-07 15:09:28 +00:00
genassym.c make maximum interrupt number tunable on ARM, ARM64, MIPS, and RISC-V 2021-01-18 16:36:39 -08:00
generic_timer.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
gic.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
gic.h
gic_acpi.c Add missing ACPI GICv2 MSI/MSI-X attachment 2019-06-28 01:17:33 +00:00
gic_common.h Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2022-02-08 15:00:55 -05:00
gic_fdt.c
hypervisor-stub.S
identcpu-v6.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
in_cksum_arm.S _ARM_ARCH_5E is always defined, we not support older CPUs. 2020-11-29 16:44:22 +00:00
in_cksum_machdep.c netinet: Deduplicate most in_cksum() implementations 2021-12-01 07:42:43 -05:00
locore-v6.S Set a "kernbase" symbol in 32-bit arm locore.S and use it with ldscript.arm. 2019-12-30 23:20:46 +00:00
locore.S Remove now unused armv4 and not-INTRNG files. 2020-11-28 15:00:08 +00:00
machdep.c arm: move signal delivery code to exec_machdep.c 2021-10-16 16:01:48 +03:00
machdep_boot.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
machdep_intr.c Also enable IPIs on 32-bit arm 2021-06-11 19:23:50 +01:00
machdep_kdb.c Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
machdep_ptrace.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
mem.c Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
minidump_machdep.c minidump: Use the provided dump bitset 2021-12-03 10:02:03 -04:00
mp_machdep.c sched: separate out schedinit_ap() 2022-02-10 14:55:29 -06:00
mpcore_timer.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
mpcore_timervar.h
nexus.c arm, arm64, riscv: adjust top-level nexus comment 2021-10-15 12:22:14 -03:00
nexusvar.h arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
ofw_machdep.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
pl190.c Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
pl310.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
platform.c
platform_if.m
platform_pl310_if.m
pmap-v6.c Convert vm_page_alloc() callers to use vm_page_alloc_noobj(). 2021-11-03 13:39:36 -04:00
pmu.c Split out the FDT arm pmu attachment 2020-12-30 16:11:02 +00:00
pmu.h Add pmu.h missed in 5e78bbb74a 2020-12-31 10:12:34 +00:00
pmu_fdt.c Split out the FDT arm pmu attachment 2020-12-30 16:11:02 +00:00
ptrace_machdep.c Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
sc_machdep.c sc(4) md bits: stop setting sc->kbd entirely 2019-12-30 02:07:55 +00:00
setcpsr.S
setstack.s
stack_machdep.c Reimplement stack capture of running threads on i386 and amd64. 2020-01-31 15:43:33 +00:00
stdatomic.c Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
support.S arm: replace byte-by-byte memcmp with an already existing asm variant 2021-07-19 09:54:18 +00:00
swtch-v6.S
swtch.S
sys_machdep.c arm32: Align arguments of sync_icache() syscall to cacheline size. 2021-02-11 16:08:21 +01:00
syscall.c Remove the 'nap' field from ARM's 'struct syscall_args', to bring it 2020-11-05 18:10:03 +00:00
trap-v6.c Fix some common typos in source code comments 2021-08-31 08:13:15 +02:00
uio_machdep.c
undefined.c arm: Fix handling of undefined instruction aborts in THUMB2 mode. 2022-01-20 11:12:36 +01:00
unwind.c Rewrite arm kernel stack unwind code to work when unwinding through modules. 2019-12-15 21:16:35 +00:00
vfp.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
vm_machdep.c Remove remaining support of big endian byte order. 2020-11-29 15:04:39 +00:00