]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARMv7: Add support for the Xenon state saving/restoring
authorCatalin Marinas <catalin.marinas@arm.com>
Mon, 22 Jan 2007 10:03:35 +0000 (10:03 +0000)
committerTony Lindgren <tony@atomide.com>
Tue, 12 Jun 2007 16:12:35 +0000 (09:12 -0700)
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm/kernel/asm-offsets.c
arch/arm/kernel/entry-armv.S
arch/arm/mm/Kconfig
include/asm-arm/thread_info.h

index 3278e713c32a106f191a0f925ecf2252d89c5c90..ac29bb9d3152f87f81c0e10b3424ab29d0de99b9 100644 (file)
@@ -58,6 +58,9 @@ int main(void)
   DEFINE(TI_TP_VALUE,          offsetof(struct thread_info, tp_value));
   DEFINE(TI_FPSTATE,           offsetof(struct thread_info, fpstate));
   DEFINE(TI_VFPSTATE,          offsetof(struct thread_info, vfpstate));
+#ifdef CONFIG_ARM_XENON
+  DEFINE(TI_XENONSTATE,                offsetof(struct thread_info, xenonstate));
+#endif
 #ifdef CONFIG_IWMMXT
   DEFINE(TI_IWMMXT_STATE,      offsetof(struct thread_info, fpstate.iwmmxt));
 #endif
index d645897652c2d50a073bc529533127beff369c8d..65ae5b76d14b7460f3f9a9814f6a3742cf39eb65 100644 (file)
@@ -583,6 +583,12 @@ ENTRY(__switch_to)
        add     ip, r1, #TI_CPU_SAVE
        ldr     r3, [r2, #TI_TP_VALUE]
        stmia   ip!, {r4 - sl, fp, sp, lr}      @ Store most regs on stack
+#ifdef CONFIG_ARM_XENON
+       mrc     p14, 6, r4, c1, c0, 0           @ current xenon state
+       ldr     r5, [r2, #TI_XENONSTATE]        @ value to restore
+       str     r4, [r1, #TI_XENONSTATE]        @ save current
+       mcr     p14, 6, r5, c1, c0, 0           @ restore new value
+#endif
 #ifdef CONFIG_MMU
        ldr     r6, [r2, #TI_CPU_DOMAIN]
 #endif
index e7904bc92c73f846abda2b872f3c3e86139c0cfd..15392220f6e558e527538d6b3caa507401d7194b 100644 (file)
@@ -548,6 +548,13 @@ config ARM_THUMB
 
          If you don't know what this all is, saying Y is a safe choice.
 
+config ARM_XENON
+       bool "Enable Xenon extension"
+       depends on CPU_V7
+       help
+         Say Y here if you have a CPU with Xenon extension and code to make
+         use of it. Say N for code that can run on CPUs without Xenon.
+
 config CPU_BIG_ENDIAN
        bool "Build big-endian kernel"
        depends on ARCH_SUPPORTS_BIG_ENDIAN
index eae85b09db2eb85f5c2136fb649fdc35fbabc033..b0125e60e18635e6ae72a64e78483e597e66ec69 100644 (file)
@@ -63,6 +63,9 @@ struct thread_info {
        struct crunch_state     crunchstate;
        union fp_state          fpstate __attribute__((aligned(8)));
        union vfp_state         vfpstate;
+#ifdef CONFIG_ARM_XENON
+       unsigned long           xenonstate;     /* Jazelle-X handler base register */
+#endif
        struct restart_block    restart_block;
 };