Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp346445ybk; Wed, 20 May 2020 00:52:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9YJ10k3x3av5HYBzBnvksppp06yvzq0thNKZ6u0vuGFWrRP+B/hWA6WImH6jXVVZj1yFq X-Received: by 2002:a05:6402:1a21:: with SMTP id be1mr2142910edb.211.1589961157762; Wed, 20 May 2020 00:52:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589961157; cv=none; d=google.com; s=arc-20160816; b=OPSel1Mt43lcYjIfbS84nl4QXh2csWwBdnhcl4IIghGEOgse/XbB0HUqs0Bo8UwrZO SW/YZzvL6q+Z7NiSfIMlnW8nDX4n6ZubakPwTdpftIjofT3pRO2pLHSHk16X/sYg27VG RTnX1zNEb7vr8bfD1KmDSk9iRFAPuuTXy48BnL5gQ0MNdCu0+N/RtriLTNobPzzrUmdy Ws5edOsp+dR/x93FISc49PGjRKG4u7AP4UV+XldUOmC/a4IjGjPsPeyWwHcZOSMRaTxt MKT9eaVg/yDMXvblzanaaaaPrsikb5yzSZZZK3XgTtdGN/5/Mkna116H+JpH5fqFWLoB lXIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=HHfK5r8nxxLx+KGnfeTCAVOMPPl3RiJudQvLgJX3HGQ=; b=S2nnPzDIuv8i+vM6Cqt3KkpPwPBt394hCrb345tHCt6x83eRKZoAjmDOujyN3/61Sb CEig3vM0LV06bsPxv+ZVW4oKsoRzRiqy1dky1FcrRctVld+IYeMK9+qnRf2UpymBaQ1w DMh4HGBL9TSAZwDBp6q2ibD09wzoLcHHezGPhmndYxjzSDIDkAlRTBe7/TPi+WMw1YAI 6StmnV9r3y5ZbOdeAJDU9CaYKKhuPcSDDnlHcoD3KOMUj1DyNT3LKC211Qtl7AsuOl8R d0wL8XrivNTN+pERyeyco6J+F05PViM27jLA9ogYTOxXO1ZIvAvJEm386I8wYkZ9d22V GImA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si1030737eda.19.2020.05.20.00.52.15; Wed, 20 May 2020 00:52:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726818AbgETHus convert rfc822-to-8bit (ORCPT + 99 others); Wed, 20 May 2020 03:50:48 -0400 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:37109 "EHLO smtp2200-217.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726403AbgETHur (ORCPT ); Wed, 20 May 2020 03:50:47 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.03739544|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_social|0.00791156-0.00127422-0.990814;FP=0|0|0|0|0|-1|-1|-1;HT=e01l07447;MF=ren_guo@c-sky.com;NM=1;PH=DS;RN=6;RT=6;SR=0;TI=SMTPD_---.Hb479ug_1589961042; Received: from 192.168.43.81(mailfrom:ren_guo@c-sky.com fp:SMTPD_---.Hb479ug_1589961042) by smtp.aliyun-inc.com(10.147.44.145); Wed, 20 May 2020 15:50:43 +0800 Content-Type: text/plain; charset=gb2312 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH] csky: Fixup calltrace panic From: Guo Ren In-Reply-To: <20200517175220.GA48379@roeck-us.net> Date: Wed, 20 May 2020 15:50:42 +0800 Cc: Guo Ren , linux-csky@vger.kernel.org, Linux Kernel Mailing List Content-Transfer-Encoding: 8BIT Message-Id: References: <20200517175220.GA48379@roeck-us.net> To: Guenter Roeck , =?gb2312?B?9sTPye21?= , =?gb2312?B?ydDUxrqj?= X-Mailer: Apple Mail (2.3445.104.11) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Guenter, > ?? 2020??5??18?գ?????1:52??Guenter Roeck д???? > > Hi, > > On Wed, May 13, 2020 at 03:15:25PM +0800, Guo Ren wrote: >> The implementation of show_stack will panic with wrong fp: >> >> addr = *fp++; >> >> because the fp isn't checked properly. >> >> The current implementations of show_stack, wchan and stack_trace >> haven't been designed properly, so just deprecate them. >> >> This patch is a reference to riscv's way, all codes are modified from >> arm's. The patch is passed with: >> >> - cat /proc//stack >> - cat /proc//wchan >> - echo c > /proc/sysrq-trigger >> >> Signed-off-by: Guo Ren > > This patch results in: > > gcc version: csky-linux-gcc (GCC) 9.3.0 > > Building csky:defconfig ... failed > -------------- > Error log: > csky-linux-gcc: error: unrecognized command line option '-mbacktrace'; did you mean '-fbacktrace'? > csky-linux-gcc: error: unrecognized command line option '-mbacktrace'; did you mean '-fbacktrace'? > make[2]: *** [scripts/mod/devicetable-offsets.s] Error 1 > make[2]: *** Waiting for unfinished jobs.... > csky-linux-gcc: error: unrecognized command line option '-mbacktrace'; did you mean '-fbacktrace'? > make[2]: *** [scripts/mod/empty.o] Error 1 > make[1]: *** [prepare0] Error 2 > make: *** [sub-make] Error 2 > > when trying to build csky images with upstream gcc 9.3.0. > > What version of gcc is needed to build csky images ? Also, would it be > possible to support the upstream version of gcc ? > We tested it with https://github.com/c-sky/gcc (gcc-6.3) You can fast test with: wget -nc https://gitlab.com/c-sky/buildroot/-/jobs/557072746/artifacts/raw/output/images/toolchain_thead_860_compat_next_glibc_br_defconfig_8f1b5cd7d85509fbafea935ec65c48add73bba07.tar.xz mkdir -p host tar -Jxf toolchain_thead_860_compat_next_glibc_br_defconfig_8f1b5cd7d85509fbafea935ec65c48add73bba07.tar.xz -C host cd linux-xxx LD_LIBRARY_PATH=../host/lib make ARCH=csky CROSS_COMPILE=../host/bin/csky-linux- Image We will upstream -mbacktrace to gcc.org > Thanks, > Guenter