Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750998AbdL0Fw1 (ORCPT ); Wed, 27 Dec 2017 00:52:27 -0500 Received: from mail-eopbgr60064.outbound.protection.outlook.com ([40.107.6.64]:45376 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750794AbdL0FwZ (ORCPT ); Wed, 27 Dec 2017 00:52:25 -0500 From: Peng Fan To: Dong Aisheng , "A.s. Dong" CC: Shawn Guo , "linux-kernel@vger.kernel.org" , Russell King , "Fabio Estevam" , Sascha Hauer , "van.freenix@gmail.com" , "linux-arm-kernel@lists.infradead.org" Subject: RE: [PATCH V2] ARM: imx: suspend/resume: use outer_disable/resume Thread-Topic: [PATCH V2] ARM: imx: suspend/resume: use outer_disable/resume Thread-Index: AQHTfrh9SfRL4O5Us0G2ehZ9FAiD8aNWeFaAgAAAg4CAAAS9gIAAG9Ew Date: Wed, 27 Dec 2017 05:52:22 +0000 Message-ID: References: <1514339867-28946-1-git-send-email-peng.fan@nxp.com> <20171227023207.GX23070@X250> <20171227025055.GD11724@b29396-OptiPlex-7040> In-Reply-To: <20171227025055.GD11724@b29396-OptiPlex-7040> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-originating-ip: [92.121.68.129] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB6PR0401MB2629;7:GlycDwRln6aiGxN59ILKV7OD+iZA280q9b+c95cDkbAssG60/YIfAvZ2zu+YPTzrrDFyfV26DsLsqiwxt5mBf6dMW1C6G45NeBfoIsIg9onY+oF9txOl944McXQ5VJ48IkZwfmCQA5shiR4y3mleEa8Jg9rlpckCpBNttY6qVdEemLDBKUs7MuaRutq13mLIGPrc4vFP7u+hsmYYcyWcWHU+nk584+Tq7CE6FZFbXqLdOcbNk1P36oplg+Q+PyKs x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10009020)(366004)(39380400002)(376002)(346002)(39860400002)(396003)(189003)(199004)(13464003)(43544003)(24454002)(478600001)(305945005)(9686003)(45080400002)(76176011)(99286004)(7696005)(14454004)(8936002)(33656002)(2900100001)(81166006)(81156014)(8676002)(105586002)(106356001)(93886005)(66066001)(110136005)(54906003)(575784001)(86362001)(316002)(229853002)(53936002)(6246003)(39060400002)(68736007)(6116002)(3846002)(74316002)(5250100002)(4326008)(15650500001)(7736002)(3280700002)(3660700001)(55016002)(2906002)(102836004)(5660300001)(25786009)(2950100002)(6636002)(6436002)(6506007)(97736004)(53546011)(59450400001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0401MB2629;H:DB6PR04MB3221.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-correlation-id: 3c31e67e-a325-4a37-efc9-08d54cedfffa x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603307)(7153060);SRVR:DB6PR0401MB2629; x-ms-traffictypediagnostic: DB6PR0401MB2629: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(185117386973197)(258649278758335); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231023)(944501075)(6055026)(6041268)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011);SRVR:DB6PR0401MB2629;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:DB6PR0401MB2629; x-forefront-prvs: 0534947130 x-microsoft-antispam-message-info: 0+DMuriHM+CxJ75uvwAsxU+m9HplB2anpi3Jb1HBaYAFv+vLF1YHhrhXSK+3PqqJ0WETTJhTQGF6PJXnpwUX0w== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c31e67e-a325-4a37-efc9-08d54cedfffa X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Dec 2017 05:52:22.7763 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0401MB2629 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id vBR5qW41012418 Content-Length: 5761 Lines: 135 > -----Original Message----- > From: Dong Aisheng [mailto:dongas86@gmail.com] > Sent: Wednesday, December 27, 2017 10:51 AM > To: A.s. Dong > Cc: Shawn Guo ; Peng Fan ; > linux-kernel@vger.kernel.org; Russell King ; Fabio > Estevam ; Sascha Hauer ; > van.freenix@gmail.com; linux-arm-kernel@lists.infradead.org > Subject: Re: [PATCH V2] ARM: imx: suspend/resume: use > outer_disable/resume > > On Wed, Dec 27, 2017 at 02:33:57AM +0000, A.s. Dong wrote: > > > -----Original Message----- > > > From: Shawn Guo [mailto:shawnguo@kernel.org] > > > Sent: Wednesday, December 27, 2017 10:32 AM > > > To: Peng Fan > > > Cc: A.s. Dong ; linux-kernel@vger.kernel.org; > > > Russell King ; Fabio Estevam > > > ; Sascha Hauer ; > > > van.freenix@gmail.com; linux-arm- kernel@lists.infradead.org > > > Subject: Re: [PATCH V2] ARM: imx: suspend/resume: use > > > outer_disable/resume > > > > > > On Wed, Dec 27, 2017 at 09:57:47AM +0800, Peng Fan wrote: > > > > Use outer_disable/resume for suspend/resume. > > > > With the two APIs used, code could be simplified and easy to > > > > extend to introduce l2c_write_sec for i.MX platforms when moving > > > > Linux Kernel runs in non-secure world. > > > > > > > > Signed-off-by: Peng Fan > > > > Cc: Shawn Guo > > > > Cc: Sascha Hauer > > > > Cc: Fabio Estevam > > > > Cc: Russell King > > > > Cc: Dong Aisheng > > > > > > @Aisheng, can you please give it a test? > > > > > > > Yes, of course. > > > > Not sure but i can still meet booting crash on mx6sx sdb. > Peng, you did not meet it, right? I could reproduce this issue using for-next imx_v6_v7_defconfig. it is a bit strange that if "bl l2c310_early_resume " is kept, it performs well. Actually outer_resume will take care of L2 resume at a later stage. Need check more on this. My previous setup is linus' master branch with multi_v7_defconfig with SNVS RTC enabled, since I need to enable TEE. Thanks, Peng. > > I tested with Shanw/for-next branch. > > [ 4.840665] VFS: Mounted root (nfs filesystem) readonly on device 0:13. > [ 4.853448] devtmpfs: mounted > [ 4.858370] Freeing unused kernel memory: 1024K > INIT: version 2.88 booting > [ 6.835667] BUG: Bad rss-counter state mm:ecef66c0 idx:0 val:-1 > [ 6.841783] BUG: Bad rss-counter state mm:ecef66c0 idx:1 val:1 > Starting udev > [ 7.792090] Unable to handle kernel NULL pointer dereference at virtual > address 00000001 > [ 7.800500] pgd = ecbcc000 > [ 7.803884] [00000001] *pgd=ba0c1831 > [ 7.807541] Internal error: Oops: 17 [#1] SMP ARM > [ 7.812268] Modules linked in: > [ 7.815368] CPU: 0 PID: 175 Comm: S04udev Not tainted 4.15.0-rc1-00043- > g7afb5ac-dirty #1891 > [ 7.823739] Hardware name: Freescale i.MX6 SoloX (Device Tree) > [ 7.829595] task: ec79d940 task.stack: ec8bc000 > [ 7.834168] PC is at kmem_cache_alloc+0xf0/0x168 > [ 7.838808] LR is at 0x2e85d000 > [ 7.841971] pc : [] lr : [<2e85d000>] psr: 20000013 > [ 7.848257] sp : ec8bdef8 ip : ef7d9ee0 fp : ec8bdf2c > [ 7.853502] r10: 00000b5e r9 : 00000001 r8 : a0000013 > [ 7.858748] r7 : 00000b5f r6 : c014a21c r5 : 014000c0 r4 : ec001d80 > [ 7.865295] r3 : 00000000 r2 : eca5b200 r1 : ec8bc000 r0 : c1009290 > [ 7.871848] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment > none > [ 7.879003] Control: 10c5387d Table: acbcc04a DAC: 00000051 > [ 7.884770] Process S04udev (pid: 175, stack limit = 0xec8bc210) > [ 7.890798] Stack: (0xec8bdef8 to 0xec8be000) > [ 7.895180] dee0: 00422030 00000000 > [ 7.903387] df00: 000000c3 00000004 ec79d940 ffffff9c 0178f780 c0108104 > ec8bc000 00000000 > [ 7.911592] df20: ec8bdf44 ec8bdf30 c014a21c c0226ddc 00000004 00000000 > ec8bdf94 ec8bdf48 > [ 7.919798] df40: c022bf2c c014a1fc 00422030 00000000 0000000d 00000004 > 000003e8 000003e8 > [ 7.928004] df60: 0000a990 00000000 5a41ff5b 00000004 00000000 0178f780 > 00000021 c0108104 > [ 7.936209] df80: ec8bc000 00000000 ec8bdfa4 ec8bdf98 c022c120 c022bf0c > 00000000 ec8bdfa8 > [ 7.944414] dfa0: c0107f40 c022c110 00000004 00000000 0178f780 00000004 > be92eca8 00008000 > [ 7.952619] dfc0: 00000004 00000000 0178f780 00000021 00000000 00000000 > 00000024 be92edac > [ 7.960826] dfe0: 000e51e4 be92eca4 b6eac97c b6eac87c 60000010 0178f780 > 00000000 00000000 > [ 7.969018] Backtrace: > [ 7.971519] [] (kmem_cache_alloc) from [] > (prepare_creds+0x2c/0x120) > [ 7.979642] r10:00000000 r9:ec8bc000 r8:c0108104 r7:0178f780 r6:ffffff9c > r5:ec79d940 > [ 7.987492] r4:00000004 > [ 7.990060] [] (prepare_creds) from [] > (SyS_faccessat+0x2c/0x204) > [ 7.997911] r5:00000000 r4:00000004 > [ 8.001517] [] (SyS_faccessat) from [] > (SyS_access+0x1c/0x20) > [ 8.009028] r10:00000000 r9:ec8bc000 r8:c0108104 r7:00000021 r6:0178f780 > r5:00000000 > [ 8.016875] r4:00000004 > [ 8.019448] [] (SyS_access) from [] > (ret_fast_syscall+0x0/0x28) > [ 8.027135] Code: e121f008 e3590000 0a000002 e5943014 (e7993003) > [ 8.033525] ---[ end trace 5829484d9a98b0fd ]--- > /etc/init.d/rc: line 45: 175 Se[ 8.042776] Unable to handle kernel NULL > pointer dereference at virtual address 00000001 > > Regards > Dong Aisheng > > > Regards > > Dong Aisheng > > > > > Shawn