Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1103811imu; Wed, 28 Nov 2018 04:47:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/WetJVBdtrDJQ1DVPATHsZ/82BQmYz0xgtKVWIt6zUlrThPRqAibOsnuVRjzRuLQudN948y X-Received: by 2002:a65:6392:: with SMTP id h18mr33622155pgv.107.1543409240176; Wed, 28 Nov 2018 04:47:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543409240; cv=none; d=google.com; s=arc-20160816; b=ddm00u6snVCWerfNmNXDgJto/NVOKGMKpcWymJZepAXyl/0Dhi9+9zQW6FIztpLaWd 1NPIHqYpLvH/06kfgyHXi0kpE0e+N9nP9zGpqpGWurH09u0mkVHptvU+F/EBdBomhtX9 HSxpr4cufoOUfetJaDDzgZYoOTsdzl2ypA7axVRYdDAX9Xsoglvz2xCF4PFPFnyXL2hs glM/X8ysbtxblN+DAkzVjeUvRq0zA4InwNHTMe0oIvm+IIAuSWZ2QsSWxl000muL9UdT 9PqPnz6CzGWsojbjo6zh0312/PA77LKqxv/HMQGEJFPBEXSEdkyF79k8zOYK07VKzUhk IpYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=i37+8Zmu7QIa2sTS41oBI+kGzorEJQk3OyenywtQJRg=; b=RhMO3/nBuzkQeFqOMBujdHtyK3pebD1GyE+8okfbv91p2K4xvlnvdD1r3aKeybncH/ hJh1lzp2N/oWWfGluExGysjqErMvENoUgk8Ble0nJoMoqjqLkLhBMYIVQXsaMp8VTR+4 CUxmVku73yc7DK1zXwYf5gFDcRrRwQNbGLEqU8im+h7GM/vWI3aJ21Zse13iG1jR67vY SyIFQzXwyFg8qyTq2FlIg6cKDEUzU8Kku5gz90d6IWie+I4HBptGmvT1r7FcZR8t2PD+ nQNV18l3av4TAc/6MsdU5NUNjYXiVOmBZGVsISGaj7k+XOs9lHkl929sag0WkNXr6B1O KlSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=YRdXvqfx; 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 t11si7041355plo.293.2018.11.28.04.47.05; Wed, 28 Nov 2018 04:47:20 -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; dkim=pass header.i=@agner.ch header.s=dkim header.b=YRdXvqfx; 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 S1728357AbeK1Xqv (ORCPT + 99 others); Wed, 28 Nov 2018 18:46:51 -0500 Received: from mail.kmu-office.ch ([178.209.48.109]:41468 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727811AbeK1Xqv (ORCPT ); Wed, 28 Nov 2018 18:46:51 -0500 Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 603B95C03BB; Wed, 28 Nov 2018 13:45:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1543409115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i37+8Zmu7QIa2sTS41oBI+kGzorEJQk3OyenywtQJRg=; b=YRdXvqfx3U6i0WuVn7huD1kD42AjA5zjH44RKeBEoHg8ZAXBuzfbtHtFEaLq2kI5NU3TBc xqy2jdsxdPbugpLhpHE88qqr9Ojy1wQwXqFNMrNQbl3N1cQH7oH2aiebfFF9UnkgReu7nc UcYdh95awa1Hnrv11nYdwbpRYPAthSM= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Wed, 28 Nov 2018 13:45:15 +0100 From: Stefan Agner To: Andrey Smirnov Cc: Fabio Estevam , Jingoo Han , gustavo.pimentel@synopsys.com, Lucas Stach , Trent Piepho , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel , Leonard Crestez Subject: Re: [PATCH v2 3/3] PCI: imx6: limit DBI register length In-Reply-To: References: <20181120132705.6917-1-stefan@agner.ch> <20181120132705.6917-3-stefan@agner.ch> Message-ID: <482dc823b1567c9a933104b02a6bfeac@agner.ch> X-Sender: stefan@agner.ch User-Agent: Roundcube Webmail/1.3.7 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28.11.2018 02:28, Andrey Smirnov wrote: > On Tue, Nov 27, 2018 at 5:12 PM Fabio Estevam wrote: >> >> Hi Andrey, >> >> On Tue, Nov 27, 2018 at 10:57 PM Andrey Smirnov >> wrote: >> >> > Could this be a regression? Prior to 415b6185c541 ("PCI: imx6: Fix >> > config read timeout handling") all of the imprecise aborts were caught >> > and handled via no-op handler. I did an experiment on i.MX6Q board >> > that I have (ZII RDU2) and adding a simple no-op for imprecise aborts >> > via >> > >> > hook_fault_code(16 + 6, imx6q_pcie_no_op_handler, SIGBUS, 0, >> > "imprecise external abort"); Unsurprisingly, introducing this handler also "fixes" the issue in my setup. FWIW, during my investigation with the Thumb2 issue, I was looking at the abort handler and its history a bit more closely too. I was about to suggest readding this handler too, you just beat me by some hours :-) The current 4.9 downstream BSP still has the old fault handler, and hence this issue does not happen in the downstream BSP. >> > >> > seems to "resolve" this problem: >> >> Please check https://patchwork.kernel.org/patch/9720313/ >> >> This commit fixed a kernel crash on mx6q boards with a PCI switch. >> >> So we can't go back to the simple no-op. > > It's probably not exactly clear form my message, but I wasn't > proposing to go back to a no-op. What I had in mind is having a no-op > handler for imprecise aborts _alongside_ the non-linefetch handlers > that is already there when running against i.MX6Q type of the IP > block. > Agreed, it should be alongside the "external abort on non-linefetch" handler. I actually encountered another issue when I had a Intel e1000e running yesterday. Unfortunately I wasn't able to reproduce the issue, so maybe it was just a fluke. It probably would be solved by the additional "imprecise external abort" too: [ 37.644300] fec 2188000.ethernet eth0: Link is Down [ 38.077383] Unhandled fault: imprecise external abort (0x1406) at 0xb64e8000 [ 38.084638] pgd = ac4709d6 [ 38.087434] [b64e8000] *pgd=00000000 [ 38.091129] Internal error: : 1406 [#1] PREEMPT SMP ARM [ 38.096508] CPU: 0 PID: 468 Comm: kworker/0:2 Not tainted 4.19.4-00044-ged7a0cc2ef01-dirty #479 [ 38.105428] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 38.112143] Workqueue: events e1000_watchdog_task [ 38.116993] PC is at e1000e_update_stats+0x68/0xa7c [ 38.122008] LR is at e1000_watchdog_task+0xe8/0x71c [ 38.127021] pc : [] lr : [] psr: 60010013 [ 38.133449] sp : ed185ea0 ip : 00007374 fp : ec83ece4 [ 38.138814] r10: ec71f700 r9 : ec83c500 r8 : ec83c000 [ 38.144180] r7 : ec83c924 r6 : ec83c000 r5 : c1104cc8 r4 : ec83c500 [ 38.150875] r3 : f14c4000 r2 : 000003e8 r1 : 00000000 r0 : ec83c500 [ 38.157573] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 38.164890] Control: 10c5387d Table: 3d1c004a DAC: 00000051 [ 38.170789] Process kworker/0:2 (pid: 468, stack limit = 0xbc71b316) [ 38.177306] Stack: (0xed185ea0 to 0xed186000) [ 38.181794] 5ea0: ef7a9100 c0619ba3 ec0870e0 ec087068 ec0870e0 00000000 60010013 c0619ba3 [ 38.190184] 5ec0: ef7a8d00 ec83c54c c1104cc8 ec83e54c ec83c924 ec83c000 ec83c500 ec71f700 [ 38.198573] 5ee0: ec83ece4 c0628d0c ecbd16c0 c0c0237c ed185f3c c0b26de0 ec131c04 c0619ba3 [ 38.206966] 5f00: c1153fe4 ec83c54c ecdcc100 ef7a8d00 ef7a9e00 00000000 ec83c550 00000000 [ 38.221770] 5f20: ef7a8d00 c0136aec c1103d00 ef7a8d18 ecdcc100 ef7a8d00 ecdcc114 c1103d00 [ 38.236801] 5f40: ef7a8d18 ffffe000 00000008 c0136d40 ec521c70 c1176068 c0e4213c ed184000 [ 38.251874] 5f60: ecfecfdc ecfecfc0 ed0db1c0 00000000 ed184000 ecdcc100 c0136cfc ec0a3ea4 [ 38.267199] 5f80: ecfecfdc c013c810 00000000 ed0db1c0 c013c6c8 00000000 00000000 00000000 [ 38.282612] 5fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 [ 38.298080] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 38.313792] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 38.329716] [] (e1000e_update_stats) from [] (e1000_watchdog_task+0xe8/0x71c) [ 38.346597] [] (e1000_watchdog_task) from [] (process_one_work+0x1f0/0x400) [ 38.363493] [] (process_one_work) from [] (worker_thread+0x44/0x584) [ 38.379844] [] (worker_thread) from [] (kthread+0x148/0x150) [ 38.395575] [] (kthread) from [] (ret_from_fork+0x14/0x2c) [ 38.411119] Exception stack(0xed185fb0 to 0xed185ff8) [ 38.420331] 5fa0: 00000000 00000000 00000000 00000000 [ 38.436662] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 38.452933] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 38.463661] Code: e590641c e2833901 e5931000 f57ff04f (e280ad9f) -- Stefan