From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 07 Nov 2016 16:10:18 +0100 (CET) Received: from mailapp01.imgtec.com ([195.59.15.196]:19422 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23992022AbcKGPJlJzpKw (ORCPT ); Mon, 7 Nov 2016 16:09:41 +0100 Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Forcepoint Email with ESMTPS id 552393914535F; Mon, 7 Nov 2016 15:09:32 +0000 (GMT) Received: from localhost (10.100.200.221) by HHMAIL01.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.294.0; Mon, 7 Nov 2016 15:09:34 +0000 From: Paul Burton To: CC: Ralf Baechle , Paul Burton , Tony Wu , "# v3 . 10+" Subject: [PATCH 6/6] MIPS: Handle microMIPS jumps in the same way as MIPS32/MIPS64 jumps Date: Mon, 7 Nov 2016 15:07:07 +0000 Message-ID: <20161107150707.5079-7-paul.burton@imgtec.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161107150707.5079-1-paul.burton@imgtec.com> References: <20161107150707.5079-1-paul.burton@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.100.200.221] Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 55715 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: paul.burton@imgtec.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips is_jump_ins() checks for plain jump ("j") instructions since commit e7438c4b893e ("MIPS: Fix sibling call handling in get_frame_info") but that commit didn't make the same change to the microMIPS code, leaving it inconsistent with the MIPS32/MIPS64 code. Handle the microMIPS encoding of the jump instruction too such that it behaves consistently. Signed-off-by: Paul Burton Fixes: e7438c4b893e ("MIPS: Fix sibling call handling in get_frame_info") Cc: linux-mips@linux-mips.org Cc: Ralf Baechle Cc: Tony Wu Cc: # v3.10+ --- arch/mips/kernel/process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 39c946f..1652f36 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -293,6 +293,8 @@ static inline int is_jump_ins(union mips_instruction *ip) return 0; } + if (ip->j_format.opcode == mm_j32_op) + return 1; if (ip->j_format.opcode == mm_jal32_op) return 1; if (ip->r_format.opcode != mm_pool32a_op || -- 2.10.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailapp01.imgtec.com ([195.59.15.196]:19422 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23992022AbcKGPJlJzpKw (ORCPT ); Mon, 7 Nov 2016 16:09:41 +0100 From: Paul Burton Subject: [PATCH 6/6] MIPS: Handle microMIPS jumps in the same way as MIPS32/MIPS64 jumps Date: Mon, 7 Nov 2016 15:07:07 +0000 Message-ID: <20161107150707.5079-7-paul.burton@imgtec.com> In-Reply-To: <20161107150707.5079-1-paul.burton@imgtec.com> References: <20161107150707.5079-1-paul.burton@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: linux-mips@linux-mips.org Cc: Ralf Baechle , Paul Burton , Tony Wu , "# v3 . 10+" Message-ID: <20161107150707.TDZ5eE3Ep3WWdo3MtZBaHXjYmzN-Vsw8KagFkr48_NE@z> is_jump_ins() checks for plain jump ("j") instructions since commit e7438c4b893e ("MIPS: Fix sibling call handling in get_frame_info") but that commit didn't make the same change to the microMIPS code, leaving it inconsistent with the MIPS32/MIPS64 code. Handle the microMIPS encoding of the jump instruction too such that it behaves consistently. Signed-off-by: Paul Burton Fixes: e7438c4b893e ("MIPS: Fix sibling call handling in get_frame_info") Cc: linux-mips@linux-mips.org Cc: Ralf Baechle Cc: Tony Wu Cc: # v3.10+ --- arch/mips/kernel/process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 39c946f..1652f36 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -293,6 +293,8 @@ static inline int is_jump_ins(union mips_instruction *ip) return 0; } + if (ip->j_format.opcode == mm_j32_op) + return 1; if (ip->j_format.opcode == mm_jal32_op) return 1; if (ip->r_format.opcode != mm_pool32a_op || -- 2.10.2