patch-2.4.13 linux/include/asm-arm/cpu-single.h
Next file: linux/include/asm-arm/hardirq.h
Previous file: linux/include/asm-arm/cpu-multi32.h
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Thu Oct 11 09:04:57 2001
- Orig file:
v2.4.12/linux/include/asm-arm/cpu-single.h
- Orig date:
Mon Sep 18 15:15:23 2000
diff -u --recursive --new-file v2.4.12/linux/include/asm-arm/cpu-single.h linux/include/asm-arm/cpu-single.h
@@ -51,6 +51,7 @@
#ifndef __ASSEMBLY__
+#include <asm/memory.h>
#include <asm/page.h>
/* forward declare task_struct */
@@ -85,5 +86,14 @@
extern volatile void cpu_reset(unsigned long addr);
#define cpu_switch_mm(pgd,tsk) cpu_set_pgd(__virt_to_phys((unsigned long)(pgd)))
+
+#define cpu_get_pgd() \
+ ({ \
+ unsigned long pg; \
+ __asm__("mrc p15, 0, %0, c2, c0, 0" \
+ : "=r" (pg)); \
+ pg &= ~0x3fff; \
+ (pgd_t *)phys_to_virt(pg); \
+ })
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)