Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4203280imu; Mon, 28 Jan 2019 19:57:04 -0800 (PST) X-Google-Smtp-Source: ALg8bN43yhhE3yqMPWboF1w8dtdBS3kPohsjx4+tXJPZuUvzpGthXA1/PF/Awk2yg6m36/sp1WhT X-Received: by 2002:a17:902:d90d:: with SMTP id c13mr18886493plz.31.1548734224782; Mon, 28 Jan 2019 19:57:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548734224; cv=none; d=google.com; s=arc-20160816; b=HOyuO4oW+JKt77d0dvc7TOVrrSGf1IXsgI1GHWD5xzl7FvsjwxK3oDjMur53MPwKML 6l/bXkpk0Ad51NDZHE6WFjTWmIRs7kazqRft937ujx8BY2JPFa/TNxUG4S5V/r4exvy8 DahaOzqb+/kA/5/xj/R0uSriCF05Oy56rpqLVS02NkCnjW/qdJ+M0QAB5FGwHhMKF+jC o4sR3040PQ2ieZVJFLpNsIGCqPTqFyUWxt/bYbhkXWxQNBCcG6J/r9PU0aovfXUSxL+F dpvtOJwvGfzTdlSqbfjQAqdSN3MC67UCMKCqqUCMtwaO3+aLn4PPsKsj80Q8P0lT0oVn h9gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:authenticated-by; bh=oMUSXr5QsF43bcIcsIiuh+5ymsAO1eFL7kdTCvBXLWI=; b=OGbOY0xb8n6UWDn2fEYcEHPx42kDGzDkTh6ELd7ayDGbaooLUX9gLlhZ3pQJgw1iQO P5cegr2+meC3U0A2hDen/j6+kG+yUDi53VOXAYUtg6XYBjGnice8G/DUik6g2uiGPDh2 9k58BhrKZmt4r8faJYbInNfcqCz4EhAS4MU9YCnDSiK0m3E5LPNebSKNhtfqEivFufAL FcGEozzScbi6zmRkVvzPS1rhpMmFye8dlPmKPvMxtJelnu1tRAJ8zQeRqp0Z0MRF0EUU cx9RZ32vEV/619PZI3CN1aCAjh2orHEmAxG0ZKst2qtrDfpnZhOvrOhABouKtUcrRynj ZxfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b36si7317pgl.596.2019.01.28.19.56.48; Mon, 28 Jan 2019 19:57:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727268AbfA2D4l (ORCPT + 99 others); Mon, 28 Jan 2019 22:56:41 -0500 Received: from rtits2.realtek.com ([211.75.126.72]:49725 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726735AbfA2D4l (ORCPT ); Mon, 28 Jan 2019 22:56:41 -0500 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x0T3u8uX024090, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtitcasv01.realtek.com.tw[172.21.6.18]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id x0T3u8uX024090 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NOT); Tue, 29 Jan 2019 11:56:08 +0800 Received: from localhost (172.21.234.150) by RTITCASV01.realtek.com.tw (172.21.6.18) with Microsoft SMTP Server id 14.3.408.0; Tue, 29 Jan 2019 11:56:07 +0800 Date: Tue, 29 Jan 2019 11:56:07 +0800 From: Jun-Ru Chang To: CC: , , , , , , , , , Subject: [PATCH] MIPS: Remove function size check in get_frame_info() Message-ID: <20190129035607.GA8801@genru-nb> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline User-Agent: Mutt/1.11.2 (2019-01-07) X-Originating-IP: [172.21.234.150] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Tony Wu Fixes: b6c7a324df37b ("MIPS: Fix get_frame_info() handling of microMIPS function size.") --- arch/mips/kernel/process.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 6829a064aac8..339870ed92f7 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -371,7 +371,7 @@ static inline int is_sp_move_ins(union mips_instruction *ip, int *frame_size) 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; @@ -384,10 +384,9 @@ static int get_frame_info(struct mips_frame_info *info) 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; -- 2.20.1