summaryrefslogtreecommitdiffstats
path: root/sys/arm64
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2016-02-10 09:19:29 +0000
committerandrew <andrew@FreeBSD.org>2016-02-10 09:19:29 +0000
commit4cf4fddec8c3df6f92a4c842133d17613c459575 (patch)
treeef177bb0c7a78e6ce3af09f16bcb1a328099121c /sys/arm64
parent517ee62210c3163f71681eb95e09542ec96a6b24 (diff)
downloadFreeBSD-src-4cf4fddec8c3df6f92a4c842133d17613c459575.zip
FreeBSD-src-4cf4fddec8c3df6f92a4c842133d17613c459575.tar.gz
Update of the Allwinner drivers to:
* Use the Linux compat string * Use EARLY_DRIVER_MODULE to attach at the right time * Add a generic A10 kernel config file * A20 now use generic_timer * Add two new dts files for Olimex boards * Update our custom DTS file for A10 and A20 to use the same compatible property names as the vendor ones. Submitted by: Emmanuel Vadot <manu@bidouilliste.com> Differential Revision: https://reviews.freebsd.org/D4792
Diffstat (limited to 'sys/arm64')
-rw-r--r--sys/arm64/arm64/swtch.S13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/arm64/arm64/swtch.S b/sys/arm64/arm64/swtch.S
index 3175e87..981dfeb 100644
--- a/sys/arm64/arm64/swtch.S
+++ b/sys/arm64/arm64/swtch.S
@@ -129,12 +129,6 @@ END(cpu_throw)
* x3 to x7, x16 and x17 are caller saved
*/
ENTRY(cpu_switch)
- /* Store the new curthread */
- str x1, [x18, #PC_CURTHREAD]
- /* And the new pcb */
- ldr x4, [x1, #TD_PCB]
- str x4, [x18, #PC_CURPCB]
-
/*
* Save the old context.
*/
@@ -174,10 +168,15 @@ ENTRY(cpu_switch)
mov x0, x19
#endif
+ /* Store the new curthread */
+ str x1, [x18, #PC_CURTHREAD]
+
/*
- * Restore the saved context.
+ * Restore the saved context and save it as the curpcb.
*/
ldr x4, [x1, #TD_PCB]
+ str x4, [x18, #PC_CURPCB]
+
/*
* TODO: We may need to flush the cache here if switching
OpenPOWER on IntegriCloud