From: Ben Hutchings <ben@decadent.org.uk>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: akpm@linux-foundation.org, Denis Kirjanov <kda@linux-powerpc.org>,
"" <yamada.masahiro@socionext.com>,
"" <linux-mips@vger.kernel.org>, "" <peterz@infradead.org>,
"" <mingo@kernel.org>, "" <jhogan@kernel.org>,
"Paul Burton" <paul.burton@mips.com>,
"Tony Wu" <tonywu@realtek.com>, "" <ralf@linux-mips.org>,
"" <macro@mips.com>, "Jun-Ru Chang" <jrjang@realtek.com>
Subject: [PATCH 3.16 099/202] MIPS: Remove function size check in get_frame_info()
Date: Sat, 27 Apr 2019 16:13:09 +0100 [thread overview]
Message-ID: <lsq.1556377989.99898756@decadent.org.uk> (raw)
In-Reply-To: <lsq.1556377988.384060557@decadent.org.uk>
3.16.66-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Jun-Ru Chang <jrjang@realtek.com>
commit 2b424cfc69728224fcb5fad138ea7260728e0901 upstream.
Patch (b6c7a324df37b "MIPS: Fix get_frame_info() handling of
microMIPS function size.") introduces additional function size
check for microMIPS by only checking insn between ip and ip + func_size.
However, func_size in get_frame_info() is always 0 if KALLSYMS is not
enabled. This causes get_frame_info() to return immediately without
calculating correct frame_size, which in turn causes "Can't analyze
schedule() prologue" warning messages at boot time.
This patch removes func_size check, and let the frame_size check run
up to 128 insns for both MIPS and microMIPS.
Signed-off-by: Jun-Ru Chang <jrjang@realtek.com>
Signed-off-by: Tony Wu <tonywu@realtek.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Fixes: b6c7a324df37b ("MIPS: Fix get_frame_info() handling of microMIPS function size.")
Cc: <ralf@linux-mips.org>
Cc: <jhogan@kernel.org>
Cc: <macro@mips.com>
Cc: <yamada.masahiro@socionext.com>
Cc: <peterz@infradead.org>
Cc: <mingo@kernel.org>
Cc: <linux-mips@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/mips/kernel/process.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -373,7 +373,7 @@ static inline int is_sp_move_ins(union m
static int get_frame_info(struct mips_frame_info *info)
{
bool is_mmips = IS_ENABLED(CONFIG_CPU_MICROMIPS);
- union mips_instruction insn, *ip, *ip_end;
+ union mips_instruction insn, *ip;
const unsigned int max_insns = 128;
unsigned int last_insn_size = 0;
unsigned int i;
@@ -385,10 +385,9 @@ static int get_frame_info(struct mips_fr
if (!ip)
goto err;
- ip_end = (void *)ip + info->func_size;
-
- for (i = 0; i < max_insns && ip < ip_end; i++) {
+ for (i = 0; i < max_insns; i++) {
ip = (void *)ip + last_insn_size;
+
if (is_mmips && mm_insn_16bit(ip->halfword[0])) {
insn.word = ip->halfword[0] << 16;
last_insn_size = 2;
next parent reply other threads:[~2019-04-27 15:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <lsq.1556377988.384060557@decadent.org.uk>
2019-04-27 15:13 ` Ben Hutchings [this message]
2019-04-27 15:13 ` [PATCH 3.16 074/202] MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled Ben Hutchings
2019-04-27 15:13 ` [PATCH 3.16 029/202] Disable MSI also when pcie-octeon.pcie_disable on Ben Hutchings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=lsq.1556377989.99898756@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=akpm@linux-foundation.org \
--cc=jhogan@kernel.org \
--cc=jrjang@realtek.com \
--cc=kda@linux-powerpc.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=macro@mips.com \
--cc=mingo@kernel.org \
--cc=paul.burton@mips.com \
--cc=peterz@infradead.org \
--cc=ralf@linux-mips.org \
--cc=stable@vger.kernel.org \
--cc=tonywu@realtek.com \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).