From: Vineet Gupta Date: Wed, 30 Apr 2014 09:56:45 +0000 (+0530) Subject: ARC: !PREEMPT: Ensure Return to kernel mode is IRQ safe X-Git-Tag: omap-for-v3.16/pm-signed~31 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8aa9e85adac609588eeec356e5a85059b3b819ba;p=pandora-kernel.git ARC: !PREEMPT: Ensure Return to kernel mode is IRQ safe There was a very small race window where resume to kernel mode from a Exception Path (or pure kernel mode which is true for most of ARC exceptions anyways), was not disabling interrupts in restore_regs, clobbering the exception regs Anton found the culprit call flow (after many sleepless nights) | 1. we got a Trap from user land | 2. started to service it. | 3. While doing some stuff on user-land memory (I think it is padzero()), | we got a DataTlbMiss | 4. On return from it we are taking "resume_kernel_mode" path | 5. NEED_RESHED is not set, so we go to "return from exception" path in | restore regs. | 6. there seems to be IRQ happening Signed-off-by: Vineet Gupta Cc: #3.10, 3.12, 3.13, 3.14 Cc: Anton Kolesov Cc: Francois Bedard Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed