ARM: rockchip: Add workaround for unknown write of thread_info
authorHuang, Tao <huangtao@rock-chips.com>
Thu, 18 May 2017 02:51:27 +0000 (10:51 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 18 May 2017 03:33:04 +0000 (11:33 +0800)
We see the cpu of thread_info was changed by unknown reason sometimes,
which cause rq spinlock deadlock while schedule. Until we found the
root cause, we have to add this workaround.

Change-Id: Ib943ccb47a57fe4b267a1da853366363cd7f1f52
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
arch/arm/include/asm/thread_info.h

index 776757d1604ab3901996bb24bb02748e54c2aee7..af4a57fdc816ad763e15e21b8a157fd3c9db19d5 100644 (file)
@@ -47,6 +47,13 @@ struct cpu_context_save {
  * __switch_to() assumes cpu_context follows immediately after cpu_domain.
  */
 struct thread_info {
+#ifdef CONFIG_ARCH_ROCKCHIP
+       /*
+        * FIXME: prevent unknown write of cpu
+        * we reservee 64 bytes to make sure cacheline aligned
+        */
+       __u8                    reserved[64];
+#endif
        unsigned long           flags;          /* low level flags */
        int                     preempt_count;  /* 0 => preemptable, <0 => bug */
        mm_segment_t            addr_limit;     /* address limit */