summaryrefslogtreecommitdiffstats
path: root/sys/arm/include/sysarch.h
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2005-02-26 18:59:01 +0000
committercognet <cognet@FreeBSD.org>2005-02-26 18:59:01 +0000
commit43586d701a28a6b1ef236ac59977399f1c91658e (patch)
tree754a92db74155793fdb77b1dabe591af0404d9f8 /sys/arm/include/sysarch.h
parentd017d1bb8095eeec8316d252936d8810684f8c64 (diff)
downloadFreeBSD-src-43586d701a28a6b1ef236ac59977399f1c91658e.zip
FreeBSD-src-43586d701a28a6b1ef236ac59977399f1c91658e.tar.gz
Instead of using sysarch() to store-retrieve the tp, add a magic address,
ARM_TP_ADDRESS, where the tp will be stored. On CPUs that support it, a cache line will be allocated and locked for this address, so that it will never go to RAM. On CPUs that does not, a page is allocated for it (it will be a bit slower, and is wrong for SMP, but should be fine for UP). The tp is still stored in the mdthread struct, and at each context switch, ARM_TP_ADDRESS gets updated. Suggested by: davidxu
Diffstat (limited to 'sys/arm/include/sysarch.h')
-rw-r--r--sys/arm/include/sysarch.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/arm/include/sysarch.h b/sys/arm/include/sysarch.h
index d0c0c47..4d6234b 100644
--- a/sys/arm/include/sysarch.h
+++ b/sys/arm/include/sysarch.h
@@ -53,6 +53,8 @@
#define ARM_SET_TP 2
#define ARM_GET_TP 3
+#define ARM_TP_ADDRESS 0xe0000000 /* Magic */
+
struct arm_sync_icache_args {
uintptr_t addr; /* Virtual start address */
size_t len; /* Region size */
OpenPOWER on IntegriCloud