Xtensa fixes for v5.12:
- fix build with separate exception vectors when they are placed too far from the rest of the kernel; - fix uaccess-related livelock in do_page_fault. -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEK2eFS5jlMn3N6xfYUfnMkfg/oEQFAmBiHDkTHGpjbXZia2Jj QGdtYWlsLmNvbQAKCRBR+cyR+D+gRJ6iD/9xqCAbd5L2rXia9MmwXtFe03JBP/0R VtYy3SVYzaR3fW5TWjDUekqkPjkyfEa1wZf0kFaNWs9TYZhVKv7wbtnD8D2n+RaJ QfwXZSIhcOZiLufXm6/ig960/nFTe2h3rX3/Mu/ngAGGTRdKYIdJHERsk4qvdUsf WeV9zBYkicdA+zkzzyEy02kgW8AgiGGfnYdNNXT92be1bDV751VWr5O/3qBGAsek CMkH6t7xXIiAU4kOfrnS7nXmWhgFP1Kos+miW4CJVKN4Cq5ek7cIuShyyQMtF8Zz Mz8Q4h6jFcgqWd0FN9CNNKXh/we2hJTV+ZuCq3ew6CGpz7RghrAyYebnNZ2kKGyA Go/7yy7D5Pm/V/bqSIe1KIipONl22yJmwEWxJoXxGx9Tn2mAIZCPb2VbCOMOZ9C6 qONdnWwCYp7GFdrbgbfdS3bL3BUQd/tHpDrc6Erc1YhAATlfI/L1qUfow85I/6O0 EHrWDR4BTAsbxrE1t6IGXE0GoCdr/x5WbA8o+8Qg5D5rIF0TX15rEDEjpNEEIbSm XThK6Dvw+y5Z37tdEecQPYG18idkQGTb1a7jtwINvpbi+RVmm7pYFrDQ4v8OToWk QqCyBR+0MgqcbPzpbY2TXBg3q02W3JKKzXrHeaYTCEmSI6k5na+sBmo0QyQ0zRaS Ax/o9BPwZKFzfQ== =nxqa -----END PGP SIGNATURE----- Merge tag 'xtensa-20210329' of git://github.com/jcmvbkbc/linux-xtensa Pull xtensa fixes from Max Filippov: - fix build with separate exception vectors when they are placed too far from the rest of the kernel - fix uaccess-related livelock in do_page_fault. * tag 'xtensa-20210329' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: fix uaccess-related livelock in do_page_fault xtensa: move coprocessor_flush to the .text sectionrM2-mainline
commit
1e43c377a7
|
@ -99,37 +99,6 @@
|
|||
LOAD_CP_REGS_TAB(6)
|
||||
LOAD_CP_REGS_TAB(7)
|
||||
|
||||
/*
|
||||
* coprocessor_flush(struct thread_info*, index)
|
||||
* a2 a3
|
||||
*
|
||||
* Save coprocessor registers for coprocessor 'index'.
|
||||
* The register values are saved to or loaded from the coprocessor area
|
||||
* inside the task_info structure.
|
||||
*
|
||||
* Note that this function doesn't update the coprocessor_owner information!
|
||||
*
|
||||
*/
|
||||
|
||||
ENTRY(coprocessor_flush)
|
||||
|
||||
/* reserve 4 bytes on stack to save a0 */
|
||||
abi_entry(4)
|
||||
|
||||
s32i a0, a1, 0
|
||||
movi a0, .Lsave_cp_regs_jump_table
|
||||
addx8 a3, a3, a0
|
||||
l32i a4, a3, 4
|
||||
l32i a3, a3, 0
|
||||
add a2, a2, a4
|
||||
beqz a3, 1f
|
||||
callx0 a3
|
||||
1: l32i a0, a1, 0
|
||||
|
||||
abi_ret(4)
|
||||
|
||||
ENDPROC(coprocessor_flush)
|
||||
|
||||
/*
|
||||
* Entry condition:
|
||||
*
|
||||
|
@ -245,6 +214,39 @@ ENTRY(fast_coprocessor)
|
|||
|
||||
ENDPROC(fast_coprocessor)
|
||||
|
||||
.text
|
||||
|
||||
/*
|
||||
* coprocessor_flush(struct thread_info*, index)
|
||||
* a2 a3
|
||||
*
|
||||
* Save coprocessor registers for coprocessor 'index'.
|
||||
* The register values are saved to or loaded from the coprocessor area
|
||||
* inside the task_info structure.
|
||||
*
|
||||
* Note that this function doesn't update the coprocessor_owner information!
|
||||
*
|
||||
*/
|
||||
|
||||
ENTRY(coprocessor_flush)
|
||||
|
||||
/* reserve 4 bytes on stack to save a0 */
|
||||
abi_entry(4)
|
||||
|
||||
s32i a0, a1, 0
|
||||
movi a0, .Lsave_cp_regs_jump_table
|
||||
addx8 a3, a3, a0
|
||||
l32i a4, a3, 4
|
||||
l32i a3, a3, 0
|
||||
add a2, a2, a4
|
||||
beqz a3, 1f
|
||||
callx0 a3
|
||||
1: l32i a0, a1, 0
|
||||
|
||||
abi_ret(4)
|
||||
|
||||
ENDPROC(coprocessor_flush)
|
||||
|
||||
.data
|
||||
|
||||
ENTRY(coprocessor_owner)
|
||||
|
|
|
@ -112,8 +112,11 @@ good_area:
|
|||
*/
|
||||
fault = handle_mm_fault(vma, address, flags, regs);
|
||||
|
||||
if (fault_signal_pending(fault, regs))
|
||||
if (fault_signal_pending(fault, regs)) {
|
||||
if (!user_mode(regs))
|
||||
goto bad_page_fault;
|
||||
return;
|
||||
}
|
||||
|
||||
if (unlikely(fault & VM_FAULT_ERROR)) {
|
||||
if (fault & VM_FAULT_OOM)
|
||||
|
|
Loading…
Reference in New Issue