From: Huang, Tao Date: Thu, 18 May 2017 02:51:27 +0000 (+0800) Subject: ARM: rockchip: Add workaround for unknown write of thread_info X-Git-Tag: release-20171130_firefly~4^2~550 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=850b23f6ba9affb949918a8f670ef0a1606c42a2;p=firefly-linux-kernel-4.4.55.git ARM: rockchip: Add workaround for unknown write of thread_info 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 --- diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index 776757d1604a..af4a57fdc816 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h @@ -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 */