From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felipe Balbi Subject: Re: kexec on rk3399 Date: Wed, 14 Aug 2019 16:06:04 +0300 Message-ID: <87v9uzaocj.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3631818242867994164==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+glpar-linux-rockchip=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Vicente Bergas , Robin Murphy Cc: Matthias Brugger , Heiko Stuebner , Marc Zyngier , Catalin Marinas , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Will Deacon , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Greg Kroah-Hartman , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-rockchip.vger.kernel.org --===============3631818242867994164== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Vicente Bergas writes: > On Monday, July 22, 2019 4:31:27 PM CEST, Vicente Bergas wrote: >> Hi, i have been running linux on rk3399 booted with kexec fine until 5.2 >> From 5.2 onwards, there are memory corruption issues as reported here: >> http://lkml.iu.edu/hypermail/linux/kernel/1906.2/07211.html >> kexec has been identified as the principal reason for the issues. >> >> It turns out that kexec has never worked reliably on this platform, >> i was just lucky until recently. >> >> Please, can you provide some directions on how to debug the issue? > > Thank you all for your suggestions on where the issue could be. > > It seems that it was the USB driver. > Now using v5.2.8 booted with kexec from v5.2.8 with a workaround and > so far so good. It is being tested on the Sapphire board. > > The workaround is: > --- a/drivers/usb/dwc3/dwc3-of-simple.c > +++ b/drivers/usb/dwc3/dwc3-of-simple.c > @@ -133,6 +133,13 @@ > return 0; > } >=20=20 > +static void dwc3_of_simple_shutdown(struct platform_device *pdev) > +{ > + struct dwc3_of_simple *simple =3D platform_get_drvdata(pdev); > + > + reset_control_assert(simple->resets); > +} > + > static int __maybe_unused dwc3_of_simple_runtime_suspend(struct device=20 > *dev) > { > struct dwc3_of_simple *simple =3D dev_get_drvdata(dev); > @@ -190,6 +197,7 @@ > static struct platform_driver dwc3_of_simple_driver =3D { > .probe =3D dwc3_of_simple_probe, > .remove =3D dwc3_of_simple_remove, > + .shutdown =3D dwc3_of_simple_shutdown, > .driver =3D { > .name =3D "dwc3-of-simple", > .of_match_table =3D of_dwc3_simple_match, > > If this patch is OK after review i can resubmit it as a pull request. not a pull request, just send a patch using git send-email > Should a similar change be applied to drivers/usb/dwc3/core.c ? Is it necessary? We haven't had any bug reports regarding that. Also, if we have reset control support in the core driver, why do we need it in of_simple? Seems like of_simple could just rely on what core does. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAl1UBzwACgkQzL64meEa mQYOVQ//eKd2UVl0Lk/iBF9be4Qe4UnhUTXChWgQRk4zD9Xvjfgx16lvKHRd202Y tDKEYXDrOeSfQZTopKUfO8d3vjPkxfqYMeLyiiXTA983oXVwc6ZeaE6+VA3AO9m1 nWdQthWGnpSiBaXhceBgMmAaKkvuFe/dDua9OhGkLz/aOYFQ5iLEVT/Ffkj8sr5g u9oXIq/Vs49XFoymk8s+9qGip9l3ZbQNEkUkJbL4+hw83IiFR5SWtGG7kf/Uv/bI sA6JUkcTDvOXkqI/9cSk9ZeCePbOQpu5lk9C5B78//hdDNpkopJ8OeIW6YOBh5HF HIOZzyBgWjXu6fRM1XiqoRjWZvfpv/76CGml0zNKdDs5bvN4tbcUoJtf655JWdav S+0cEGfvLMsh5UiFcsBTT63S7+/Gh/d8Z/m3JsgSw9i0TBZLhbGQ36SYX+RpNSrr LNZsCbl67wc12ftHZOJaUTsdHy6MU4O5nf5vlSFTJCkRJtNKV65hODulCRMiTdkh kgyjs98yUegt2siGNHbVg8LC14GjWQaAxRLB7BN4pCx4243vmpapRRWjHG63f2Jh VZvYCB8hj5MBy+2BZ5S94siSoMS6+qaZ8DQ2L065EwdrlKLly4Rofh0FNhtbL5I5 F5P6V1xEnd0TN75wevzsI57lsNB2Cov8WoSeFQ0D7OSrS6eN38s= =9b3X -----END PGP SIGNATURE----- --=-=-=-- --===============3631818242867994164== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Linux-rockchip mailing list Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org http://lists.infradead.org/mailman/listinfo/linux-rockchip --===============3631818242867994164==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05FCBC433FF for ; Wed, 14 Aug 2019 13:06:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D12DD204EC for ; Wed, 14 Aug 2019 13:06:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565787992; bh=d/Hxf3vmPYsdj6m+7b/zR0Tc7ldEmzN9HwYhQquDtMo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-ID:From; b=Pm6SaHQZ1MA9oXoqjnilFoQZH1lJH+4HbDcLpSVS22w7XDL6NpGjWo7/k6WFhZ4bD R+Xkb+H/KWuRp9AoCCTjNmucKnZ4mvCIgdcWJtp8dwnTiUgvHLtVJDD19ZRE4ggQSo 8bnSCsfPhj8kAVMl+rimwR63ok9nsSukwq4eeAS4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727111AbfHNNG2 (ORCPT ); Wed, 14 Aug 2019 09:06:28 -0400 Received: from mga03.intel.com ([134.134.136.65]:1678 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726934AbfHNNG2 (ORCPT ); Wed, 14 Aug 2019 09:06:28 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2019 06:06:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,385,1559545200"; d="asc'?scan'208";a="328044176" Received: from pipin.fi.intel.com (HELO pipin) ([10.237.72.175]) by orsmga004.jf.intel.com with ESMTP; 14 Aug 2019 06:06:08 -0700 From: Felipe Balbi To: Vicente Bergas , Robin Murphy Cc: Heiko Stuebner , Will Deacon , Marc Zyngier , Catalin Marinas , Matthias Brugger , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: kexec on rk3399 In-Reply-To: References: Date: Wed, 14 Aug 2019 16:06:04 +0300 Message-ID: <87v9uzaocj.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Vicente Bergas writes: > On Monday, July 22, 2019 4:31:27 PM CEST, Vicente Bergas wrote: >> Hi, i have been running linux on rk3399 booted with kexec fine until 5.2 >> From 5.2 onwards, there are memory corruption issues as reported here: >> http://lkml.iu.edu/hypermail/linux/kernel/1906.2/07211.html >> kexec has been identified as the principal reason for the issues. >> >> It turns out that kexec has never worked reliably on this platform, >> i was just lucky until recently. >> >> Please, can you provide some directions on how to debug the issue? > > Thank you all for your suggestions on where the issue could be. > > It seems that it was the USB driver. > Now using v5.2.8 booted with kexec from v5.2.8 with a workaround and > so far so good. It is being tested on the Sapphire board. > > The workaround is: > --- a/drivers/usb/dwc3/dwc3-of-simple.c > +++ b/drivers/usb/dwc3/dwc3-of-simple.c > @@ -133,6 +133,13 @@ > return 0; > } >=20=20 > +static void dwc3_of_simple_shutdown(struct platform_device *pdev) > +{ > + struct dwc3_of_simple *simple =3D platform_get_drvdata(pdev); > + > + reset_control_assert(simple->resets); > +} > + > static int __maybe_unused dwc3_of_simple_runtime_suspend(struct device=20 > *dev) > { > struct dwc3_of_simple *simple =3D dev_get_drvdata(dev); > @@ -190,6 +197,7 @@ > static struct platform_driver dwc3_of_simple_driver =3D { > .probe =3D dwc3_of_simple_probe, > .remove =3D dwc3_of_simple_remove, > + .shutdown =3D dwc3_of_simple_shutdown, > .driver =3D { > .name =3D "dwc3-of-simple", > .of_match_table =3D of_dwc3_simple_match, > > If this patch is OK after review i can resubmit it as a pull request. not a pull request, just send a patch using git send-email > Should a similar change be applied to drivers/usb/dwc3/core.c ? Is it necessary? We haven't had any bug reports regarding that. Also, if we have reset control support in the core driver, why do we need it in of_simple? Seems like of_simple could just rely on what core does. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAl1UBzwACgkQzL64meEa mQYOVQ//eKd2UVl0Lk/iBF9be4Qe4UnhUTXChWgQRk4zD9Xvjfgx16lvKHRd202Y tDKEYXDrOeSfQZTopKUfO8d3vjPkxfqYMeLyiiXTA983oXVwc6ZeaE6+VA3AO9m1 nWdQthWGnpSiBaXhceBgMmAaKkvuFe/dDua9OhGkLz/aOYFQ5iLEVT/Ffkj8sr5g u9oXIq/Vs49XFoymk8s+9qGip9l3ZbQNEkUkJbL4+hw83IiFR5SWtGG7kf/Uv/bI sA6JUkcTDvOXkqI/9cSk9ZeCePbOQpu5lk9C5B78//hdDNpkopJ8OeIW6YOBh5HF HIOZzyBgWjXu6fRM1XiqoRjWZvfpv/76CGml0zNKdDs5bvN4tbcUoJtf655JWdav S+0cEGfvLMsh5UiFcsBTT63S7+/Gh/d8Z/m3JsgSw9i0TBZLhbGQ36SYX+RpNSrr LNZsCbl67wc12ftHZOJaUTsdHy6MU4O5nf5vlSFTJCkRJtNKV65hODulCRMiTdkh kgyjs98yUegt2siGNHbVg8LC14GjWQaAxRLB7BN4pCx4243vmpapRRWjHG63f2Jh VZvYCB8hj5MBy+2BZ5S94siSoMS6+qaZ8DQ2L065EwdrlKLly4Rofh0FNhtbL5I5 F5P6V1xEnd0TN75wevzsI57lsNB2Cov8WoSeFQ0D7OSrS6eN38s= =9b3X -----END PGP SIGNATURE----- --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3512DC433FF for ; Wed, 14 Aug 2019 13:06:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 09D4120679 for ; Wed, 14 Aug 2019 13:06:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rnIynJ/k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 09D4120679 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GZuxiSxmGyo8lh5JLLX07m4L2xFFV4/0kg5lTTtgeiE=; b=rnIynJ/k13wYp9AGiBkjsqMwt pd+Ec2H+2NjtarKHnGXEkuKuDfOFyH92NGQp8lsKCrSy+cZaTJDQ+Bu/GfMjkLmKqcn/Mc9UHVvgF MuxxWUk8Rifb5alKbttmZGzGtAnHnsawIQrHiid5GNA2i7mNwYNXDC0chuDxoqAiMSC2LcRsOLVGH QMkcQ7gai6JKKncg7QdIuYffOG4u49u0DjLfQHU9ukooD1fmaaubIBXiXIG/xumF7kaa0cTBuTNDB vidwzxliqgFIS8UYhNNqsX7uRmn7+iJwQcy25vGofPIiawrMguKkNd/BuKJ4ce5HLqxBOkQdxEqqH vIFtiWVCw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hxsyn-0004Jj-Qd; Wed, 14 Aug 2019 13:06:17 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hxsyk-0004IK-3q; Wed, 14 Aug 2019 13:06:15 +0000 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2019 06:06:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,385,1559545200"; d="asc'?scan'208";a="328044176" Received: from pipin.fi.intel.com (HELO pipin) ([10.237.72.175]) by orsmga004.jf.intel.com with ESMTP; 14 Aug 2019 06:06:08 -0700 From: Felipe Balbi To: Vicente Bergas , Robin Murphy Subject: Re: kexec on rk3399 In-Reply-To: References: Date: Wed, 14 Aug 2019 16:06:04 +0300 Message-ID: <87v9uzaocj.fsf@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190814_060614_166681_5A384B09 X-CRM114-Status: GOOD ( 16.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matthias Brugger , Heiko Stuebner , Marc Zyngier , Catalin Marinas , linux-usb@vger.kernel.org, Will Deacon , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============2373004482386164243==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============2373004482386164243== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Vicente Bergas writes: > On Monday, July 22, 2019 4:31:27 PM CEST, Vicente Bergas wrote: >> Hi, i have been running linux on rk3399 booted with kexec fine until 5.2 >> From 5.2 onwards, there are memory corruption issues as reported here: >> http://lkml.iu.edu/hypermail/linux/kernel/1906.2/07211.html >> kexec has been identified as the principal reason for the issues. >> >> It turns out that kexec has never worked reliably on this platform, >> i was just lucky until recently. >> >> Please, can you provide some directions on how to debug the issue? > > Thank you all for your suggestions on where the issue could be. > > It seems that it was the USB driver. > Now using v5.2.8 booted with kexec from v5.2.8 with a workaround and > so far so good. It is being tested on the Sapphire board. > > The workaround is: > --- a/drivers/usb/dwc3/dwc3-of-simple.c > +++ b/drivers/usb/dwc3/dwc3-of-simple.c > @@ -133,6 +133,13 @@ > return 0; > } >=20=20 > +static void dwc3_of_simple_shutdown(struct platform_device *pdev) > +{ > + struct dwc3_of_simple *simple =3D platform_get_drvdata(pdev); > + > + reset_control_assert(simple->resets); > +} > + > static int __maybe_unused dwc3_of_simple_runtime_suspend(struct device=20 > *dev) > { > struct dwc3_of_simple *simple =3D dev_get_drvdata(dev); > @@ -190,6 +197,7 @@ > static struct platform_driver dwc3_of_simple_driver =3D { > .probe =3D dwc3_of_simple_probe, > .remove =3D dwc3_of_simple_remove, > + .shutdown =3D dwc3_of_simple_shutdown, > .driver =3D { > .name =3D "dwc3-of-simple", > .of_match_table =3D of_dwc3_simple_match, > > If this patch is OK after review i can resubmit it as a pull request. not a pull request, just send a patch using git send-email > Should a similar change be applied to drivers/usb/dwc3/core.c ? Is it necessary? We haven't had any bug reports regarding that. Also, if we have reset control support in the core driver, why do we need it in of_simple? Seems like of_simple could just rely on what core does. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAl1UBzwACgkQzL64meEa mQYOVQ//eKd2UVl0Lk/iBF9be4Qe4UnhUTXChWgQRk4zD9Xvjfgx16lvKHRd202Y tDKEYXDrOeSfQZTopKUfO8d3vjPkxfqYMeLyiiXTA983oXVwc6ZeaE6+VA3AO9m1 nWdQthWGnpSiBaXhceBgMmAaKkvuFe/dDua9OhGkLz/aOYFQ5iLEVT/Ffkj8sr5g u9oXIq/Vs49XFoymk8s+9qGip9l3ZbQNEkUkJbL4+hw83IiFR5SWtGG7kf/Uv/bI sA6JUkcTDvOXkqI/9cSk9ZeCePbOQpu5lk9C5B78//hdDNpkopJ8OeIW6YOBh5HF HIOZzyBgWjXu6fRM1XiqoRjWZvfpv/76CGml0zNKdDs5bvN4tbcUoJtf655JWdav S+0cEGfvLMsh5UiFcsBTT63S7+/Gh/d8Z/m3JsgSw9i0TBZLhbGQ36SYX+RpNSrr LNZsCbl67wc12ftHZOJaUTsdHy6MU4O5nf5vlSFTJCkRJtNKV65hODulCRMiTdkh kgyjs98yUegt2siGNHbVg8LC14GjWQaAxRLB7BN4pCx4243vmpapRRWjHG63f2Jh VZvYCB8hj5MBy+2BZ5S94siSoMS6+qaZ8DQ2L065EwdrlKLly4Rofh0FNhtbL5I5 F5P6V1xEnd0TN75wevzsI57lsNB2Cov8WoSeFQ0D7OSrS6eN38s= =9b3X -----END PGP SIGNATURE----- --=-=-=-- --===============2373004482386164243== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============2373004482386164243==--