lkml.org 
[lkml]   [2013]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] PCI: Reset PCIe devices to stop ongoing DMA
On Wed, Jul 24, 2013 at 12:29 AM, Takao Indoh
<indou.takao@jp.fujitsu.com> wrote:
> Sorry for letting this discussion slide, I was busy on other works:-(
> Anyway, the summary of previous discussion is:
> - My patch adds new initcall(fs_initcall) to reset all PCIe endpoints on
> boot. This expects PCI enumeration is done before IOMMU
> initialization as follows.
> (1) PCI enumeration
> (2) fs_initcall ---> device reset
> (3) IOMMU initialization
> - This works on x86, but does not work on other architecture because
> IOMMU is initialized before PCI enumeration on some architectures. So,
> device reset should be done where IOMMU is initialized instead of
> initcall.
> - Or, as another idea, we can reset devices in first kernel(panic kernel)
>
> Resetting devices in panic kernel is against kdump policy and seems not to
> be good idea. So I think adding reset code into iommu initialization is
> better. I'll post patches for that.

Of course nobody *wants* to do anything in the panic kernel. But
simply saying "it's against kdump policy and seems not to be a good
idea" is not a technical argument. There are things that are
impractical to do in the kdump kernel, so they have to be done in the
panic kernel even though we know the kernel is unreliable and the
attempt may fail.

My point about IOMMU and PCI initialization order doesn't go away just
because it doesn't fit "kdump policy." Having system initialization
occur in a logical order is far more important than making kdump work.

Bjorn


\
 
 \ /
  Last update: 2013-07-25 19:21    [W:0.071 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site