20 #include <linux/kernel.h>
23 #include <asm/cputype.h>
30 static inline unsigned long teehbr_read(
void)
33 asm(
"mrc p14, 6, %0, c1, c0, 0\n" :
"=r" (
v));
37 static inline void teehbr_write(
unsigned long v)
39 asm(
"mcr p14, 6, %0, c1, c0, 0\n" : :
"r" (
v));
47 case THREAD_NOTIFY_FLUSH:
48 thread->thumbee_state = 0;
50 case THREAD_NOTIFY_SWITCH:
52 teehbr_write(thread->thumbee_state);
60 .notifier_call = thumbee_notifier,
63 static int __init thumbee_init(
void)
72 if ((pfr0 & 0x0000f000) != 0x00001000)
77 thread_register_notifier(&thumbee_notifier_block);