1. 09 12月, 2015 1 次提交
    • A
      Revert "powerpc/eeh: Don't unfreeze PHB PE after reset" · dc9c41bd
      Andrew Donnellan 提交于
      This reverts commit 527d10ef.
      
      The reverted commit breaks cxlflash devices following an EEH reset (and
      possibly other cxl devices, however this has not been tested).
      
      The reverted commit changed the behaviour of eeh_reset_device() so that PHB
      PEs are not unfrozen following the completion of the reset. This should not
      be problematic, as no device resources should have been associated with the
      PHB PE.
      
      However, when attempting to load the cxlflash driver after a reset, the
      driver attempts to read Vital Product Data through a call to
      pci_read_vpd() (which is called on the physical cxl device, not on the
      virtual AFU device). pci_read_vpd() in turn attempts to read from the cxl
      device's config space. This fails, as the PE it's trying to read from is
      still frozen. In turn, the driver gets an -ENODEV and fails to initialise.
      
      It appears this issue only affects some parts of the VPD area, as "lspci
      -vvv", which only reads a subset of the VPD bytes, is not broken by the
      original patch.
      
      At this stage, we don't fully understand why we're trying to read a frozen
      PE, and we don't know how this affects other cxl devices. It is possible
      that there is an underlying bug in the cxl driver or the powerpc CAPI
      support code, or alternatively a bug in the PCI resource allocation/mapping
      code that is incorrectly mapping resources to PE#0.
      
      As such, this fix is incomplete, however it is necessary to prevent a
      serious regression in CAPI support.
      
      In the meantime, revert the commit, especially as it was intended to be a
      non-functional change.
      
      Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>
      Cc: Ian Munsie <imunsie@au1.ibm.com>
      Cc: Daniel Axtens <dja@axtens.net>
      Signed-off-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      dc9c41bd
  2. 21 10月, 2015 3 次提交
    • G
      powerpc/eeh: Force reset on fenced PHB · 8234fced
      Gavin Shan 提交于
      On fenced PHB, the error handlers in the drivers of its subordinate
      devices could return PCI_ERS_RESULT_CAN_RECOVER, indicating no reset
      will be issued during the recovery. It's conflicting with the fact
      that fenced PHB won't be recovered without reset.
      
      This limits the return value from the error handlers in the drivers
      of the fenced PHB's subordinate devices to PCI_ERS_RESULT_NEED_NONE
      or PCI_ERS_RESULT_NEED_RESET, to ensure reset will be issued during
      recovery.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Reviewed-by: NDaniel Axtens <dja@axtens.net>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      8234fced
    • G
      powerpc/eeh: More relaxed hotplug criterion · f2da4ccf
      Gavin Shan 提交于
      Currently, we rely on the existence of struct pci_driver::err_handler
      to decide if the corresponding PCI device should be unplugged during
      EEH recovery (partially hotplug case). However that check is not
      sufficient. Some device drivers implement only some of the EEH error
      handlers to collect diag-data. That means the driver still expects a
      hotplug to recover from the EEH error.
      
      This makes the hotplug criterion more relaxed: if the device driver
      doesn't provide all necessary EEH error handlers, it will experience
      hotplug during EEH recovery.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      [mpe: Minor change log rewording]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      f2da4ccf
    • G
      powerpc/eeh: Don't unfreeze PHB PE after reset · 527d10ef
      Gavin Shan 提交于
      On PowerNV platform, the PE is kept in frozen state until the PE
      reset is completed to avoid recursive EEH error caused by MMIO
      access during the period of EEH reset. The PE's frozen state is
      cleared after BARs of PCI device included in the PE are restored
      and enabled. However, we needn't clear the frozen state for PHB PE
      explicitly at this point as there is no real PE for PHB PE. As the
      PHB PE is always binding with PE#0, we actually clear PE#0, which
      is wrong. It doesn't incur any problem though.
      
      This checks if the PE is PHB PE and doesn't clear the frozen state
      if it is.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      527d10ef
  3. 13 5月, 2015 1 次提交
  4. 24 3月, 2015 1 次提交
  5. 23 1月, 2015 2 次提交
  6. 02 12月, 2014 1 次提交
  7. 15 10月, 2014 1 次提交
  8. 30 9月, 2014 2 次提交
    • G
      powerpc/eeh: Emulate EEH recovery for VFIO devices · 5cfb20b9
      Gavin Shan 提交于
      When enabling EEH functionality on passed through devices (PE)
      with VFIO, the devices in the PE would be removed permanently
      from guest side. In that case, the PE remains frozen state.
      When returning PE to host, or restarting the guest again, we
      had mechanism unfreezing the PE by clearing PESTA/B frozen
      bits. However, that's not enough for some adapters, which are
      indicated as following "lspci" shows. Those adapters require
      hot reset on the parent bus to bring their firmware back to
      workable state. Otherwise, those adaptrs won't be operative
      and the host (for returning case) or the guest will fail to
      load the drivers for those adapters without exception.
      
      0000:01:00.0 Ethernet controller: Emulex Corporation OneConnect \
                   10Gb NIC (be3) (rev 02)
      0000:01:00.0 0200: 19a2:0710 (rev 02)
      0001:03:00.0 Ethernet controller: Emulex Corporation OneConnect \
                   NIC (Lancer) (rev 10)
      0001:03:00.0 0200: 10df:e220 (rev 10)
      
      The patch adds mechanism to emulate EEH recovery (for hot reset
      on parent PCI bus) on 3 gates to fix the issue: open/release one
      adapter of the PE, enable EEH functionality on one adapter of the
      PE.
      Reported-by: NMurilo Fossa Vicentini <muvic@br.ibm.com>
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      5cfb20b9
    • G
      powerpc/eeh: Use eeh_unfreeze_pe() · c9dd0143
      Gavin Shan 提交于
      The patch uses eeh_unfreeze_pe() to replace the logic clearing
      frozen IO and DMA, in order to simplify the code.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      c9dd0143
  9. 05 8月, 2014 1 次提交
  10. 11 6月, 2014 2 次提交
    • G
      powerpc/powernv: Fix killed EEH event · 5c7a35e3
      Gavin Shan 提交于
      On PowerNV platform, EEH errors are reported by IO accessors or poller
      driven by interrupt. After the PE is isolated, we won't produce EEH
      event for the PE. The current implementation has possibility of EEH
      event lost in this way:
      
      The interrupt handler queues one "special" event, which drives the poller.
      EEH thread doesn't pick the special event yet. IO accessors kicks in, the
      frozen PE is marked as "isolated" and EEH event is queued to the list.
      EEH thread runs because of special event and purge all existing EEH events.
      However, we never produce an other EEH event for the frozen PE. Eventually,
      the PE is marked as "isolated" and we don't have EEH event to recover it.
      
      The patch fixes the issue to keep EEH events for PEs that have been
      marked as "isolated" with the help of additional "force" help to
      eeh_remove_event().
      Reported-by: NRolf Brudeseth <rolfb@us.ibm.com>
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5c7a35e3
    • G
      powerpc/eeh: Clear frozen state for child PE · 2c665992
      Gavin Shan 提交于
      Since commit cb523e09 ("powerpc/eeh: Avoid I/O access during PE
      reset"), the PE is kept as frozen state on hardware level until
      the PE reset is done completely. After that, we explicitly clear
      the frozen state of the affected PE. However, there might have
      frozen child PEs of the affected PE and we also need clear their
      frozen state as well. Otherwise, the recovery is going to fail.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      2c665992
  11. 28 4月, 2014 5 次提交
    • G
      powerpc/eeh: Can't recover from non-PE-reset case · 35845a78
      Gavin Shan 提交于
      When PCI_ERS_RESULT_CAN_RECOVER returned from device drivers, the
      EEH core should enable I/O and DMA for the affected PE. However,
      it was missed to have DMA enabled in eeh_handle_normal_event().
      Besides, the frozen state of the affected PE should be cleared
      after successful recovery, but we didn't.
      
      The patch fixes both of the issues as above.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      35845a78
    • G
      powerpc/eeh: No hotplug on permanently removed dev · d2b0f6f7
      Gavin Shan 提交于
      The issue was detected in a bit complicated test case where
      we have multiple hierarchical PEs shown as following figure:
      
                      +-----------------+
                      | PE#3     p2p#0  |
                      |          p2p#1  |
                      +-----------------+
                              |
                      +-----------------+
                      | PE#4     pdev#0 |
                      |          pdev#1 |
                      +-----------------+
      
      PE#4 (have 2 PCI devices) is the child of PE#3, which has 2 p2p
      bridges. We accidentally had less-known scenario: PE#4 was removed
      permanently from the system because of permanent failure (e.g.
      exceeding the max allowd failure times in last hour), then we detects
      EEH errors on PE#3 and tried to recover it. However, eeh_dev instances
      for pdev#0/1 were not detached from PE#4, which was still connected to
      PE#3. All of that was because of the fact that we rely on count-based
      pcibios_release_device(), which isn't reliable enough. When doing
      recovery for PE#3, we still apply hotplug on PE#4 and pdev#0/1, which
      are not valid any more. Eventually, we run into kernel crash.
      
      The patch fixes above issue from two aspects. For unplug, we simply
      skip those permanently removed PE, whose state is (EEH_PE_STATE_ISOLATED
      && !EEH_PE_STATE_RECOVERING) and its frozen count should be greater
      than EEH_MAX_ALLOWED_FREEZES. For plug, we marked all permanently
      removed EEH devices with EEH_DEV_REMOVED and return 0xFF's on read
      its PCI config so that PCI core will omit them.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d2b0f6f7
    • G
      powerpc/eeh: Avoid I/O access during PE reset · 78954700
      Gavin Shan 提交于
      We have suffered recrusive frozen PE a lot, which was caused
      by IO accesses during the PE reset. Ben came up with the good
      idea to keep frozen PE until recovery (BAR restore) gets done.
      With that, IO accesses during PE reset are dropped by hardware
      and wouldn't incur the recrusive frozen PE any more.
      
      The patch implements the idea. We don't clear the frozen state
      until PE reset is done completely. During the period, the EEH
      core expects unfrozen state from backend to keep going. So we
      have to reuse EEH_PE_RESET flag, which has been set during PE
      reset, to return normal state from backend. The side effect is
      we have to clear frozen state for towice (PE reset and clear it
      explicitly), but that's harmless.
      
      We have some limitations on pHyp. pHyp doesn't allow to enable
      IO or DMA for unfrozen PE. So we don't enable them on unfrozen PE
      in eeh_pci_enable(). We have to enable IO before grabbing logs on
      pHyp. Otherwise, 0xFF's is always returned from PCI config space.
      Also, we had wrong return value from eeh_pci_enable() for
      EEH_OPT_THAW_DMA case. The patch fixes it too.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      78954700
    • G
      powerpc/eeh: Block PCI-CFG access during PE reset · d0914f50
      Gavin Shan 提交于
      We've observed multiple PE reset failures because of PCI-CFG
      access during that period. Potentially, some device drivers
      can't support EEH very well and they can't put the device to
      motionless state before PE reset. So those device drivers might
      produce PCI-CFG accesses during PE reset. Also, we could have
      PCI-CFG access from user space (e.g. "lspci"). Since access to
      frozen PE should return 0xFF's, we can block PCI-CFG access
      during the period of PE reset so that we won't get recrusive EEH
      errors.
      
      The patch adds flag EEH_PE_RESET, which is kept during PE reset.
      The PowerNV/pSeries PCI-CFG accessors reuse the flag to block
      PCI-CFG accordingly.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d0914f50
    • G
      powerpc/eeh: Remove EEH_PE_PHB_DEAD · 9e049375
      Gavin Shan 提交于
      The PE state (for eeh_pe instance) EEH_PE_PHB_DEAD is duplicate to
      EEH_PE_ISOLATED. Originally, those PHBs (PHB PE) with EEH_PE_PHB_DEAD
      would be removed from the system. However, it's safe to replace
      that with EEH_PE_ISOLATED.
      
      The patch also clear EEH_PE_RECOVERING after fenced PHB has been handled,
      either failure or success. It makes the PHB PE state consistent with:
      
      	PHB functions normally		  NONE
      	PHB has been removed		  EEH_PE_ISOLATED
      	PHB fenced, recovery in progress  EEH_PE_ISOLATED | RECOVERING
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      9e049375
  12. 05 3月, 2014 2 次提交
    • T
      powerpc: eeh: Fixup the brown paperbag fallout of the "cleanup" · 57310c3c
      Thomas Gleixner 提交于
      Commit b8a9a11b (powerpc: eeh: Kill another abuse of irq_desc) is
      missing some brackets .....
      
      It's not a good idea to write patches in grumpy mode and then forget
      to at least compile test them or rely on the few eyeballs discussing
      that patch to spot it.....
      
      Reported-by: fengguang.wu@intel.com
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: ppc <linuxppc-dev@lists.ozlabs.org>
      57310c3c
    • T
      powerpc: Eeh: Kill another abuse of irq_desc · b8a9a11b
      Thomas Gleixner 提交于
      commit 91150af3 (powerpc/eeh: Fix unbalanced enable for IRQ) is
      another brilliant example of trainwreck engineering.
      
      The patch "fixes" the issue of an unbalanced call to irq_enable()
      which causes a prominent warning by checking the disabled state of the
      interrupt line and call conditionally into the core code.
      
      This is wrong in two aspects:
      
      1) The warning is there to tell users, that they need to fix their
         asymetric enable/disable patterns by finding the root cause and
         solving it there.
      
         It's definitely not meant to work around it by conditionally
         calling into the core code depending on the random state of the irq
         line.
      
         Asymetric irq_disable/enable calls are a clear sign of wrong usage
         of the interfaces which have to be cured at the root and not by
         somehow hacking around it.
      
      2) The abuse of core internal data structure instead of using the
         proper interfaces for retrieving the information for the 'hack
         around'
      
         irq_desc is core internal and it's clear enough stated.
      
      Replace at least the irq_desc abuse with the proper functions and add
      a big fat comment why this is absurd and completely wrong.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: ppc <linuxppc-dev@lists.ozlabs.org>
      Link: http://lkml.kernel.org/r/20140223212736.562906212@linutronix.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      b8a9a11b
  13. 11 2月, 2014 1 次提交
  14. 16 1月, 2014 1 次提交
  15. 15 1月, 2014 2 次提交
    • G
      powerpc/eeh: Handle multiple EEH errors · 7e4e7867
      Gavin Shan 提交于
      For one PCI error relevant OPAL event, we possibly have multiple
      EEH errors for that. For example, multiple frozen PEs detected on
      different PHBs. Unfortunately, we didn't cover the case. The patch
      enumarates the return value from eeh_ops::next_error() and change
      eeh_handle_special_event() and eeh_ops::next_error() to handle all
      existing EEH errors.
      
      As Ben pointed out, we needn't list_for_each_entry_safe() since we
      are not deleting any PHB from the hose_list and the EEH serialized
      lock should be held while purging EEH events. The patch covers those
      suggestions as well.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      7e4e7867
    • G
      powerpc/eeh: Hotplug improvement · f26c7a03
      Gavin Shan 提交于
      When EEH error comes to one specific PCI device before its driver
      is loaded, we will apply hotplug to recover the error. During the
      plug time, the PCI device will be probed and its driver is loaded.
      Then we wrongly calls to the error handlers if the driver supports
      EEH explicitly.
      
      The patch intends to fix by introducing flag EEH_DEV_NO_HANDLER and
      set it before we remove the PCI device. In turn, we can avoid wrongly
      calls the error handlers of the PCI device after its driver loaded.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f26c7a03
  16. 05 12月, 2013 1 次提交
  17. 24 7月, 2013 3 次提交
    • G
      powerpc/eeh: Fix unbalanced enable for IRQ · 91150af3
      Gavin Shan 提交于
      The patch fixes following issue:
      
      Unbalanced enable for IRQ 23
      ------------[ cut here ]------------
      WARNING: at kernel/irq/manage.c:437
      :
      NIP [c00000000016de8c] .__enable_irq+0x11c/0x140
      LR [c00000000016de88] .__enable_irq+0x118/0x140
      Call Trace:
      [c000003ea1f23880] [c00000000016de88] .__enable_irq+0x118/0x140 (unreliable)
      [c000003ea1f23910] [c00000000016df08] .enable_irq+0x58/0xa0
      [c000003ea1f239a0] [c0000000000388b4] .eeh_enable_irq+0xc4/0xe0
      [c000003ea1f23a30] [c000000000038a28] .eeh_report_reset+0x78/0x130
      [c000003ea1f23ac0] [c000000000037508] .eeh_pe_dev_traverse+0x98/0x170
      [c000003ea1f23b60] [c0000000000391ac] .eeh_handle_normal_event+0x2fc/0x3d0
      [c000003ea1f23bf0] [c000000000039538] .eeh_handle_event+0x2b8/0x2c0
      [c000003ea1f23c90] [c000000000039600] .eeh_event_handler+0xc0/0x170
      [c000003ea1f23d30] [c0000000000da9a0] .kthread+0xf0/0x100
      [c000003ea1f23e30] [c00000000000a1dc] .ret_from_kernel_thread+0x5c/0x80
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      91150af3
    • G
      powerpc/eeh: Use partial hotplug for EEH unaware drivers · f5c57710
      Gavin Shan 提交于
      When EEH error happens to one specific PE, some devices with drivers
      supporting EEH won't except hotplug on the device. However, there
      might have other deivces without driver, or with driver without EEH
      support. For the case, we need do partial hotplug in order to make
      sure that the PE becomes absolutely quite during reset. Otherise,
      the PE reset might fail and leads to failure of error recovery.
      
      The current code doesn't handle that 'mixed' case properly, it either
      uses the error callbacks to the drivers, or tries hotplug, but doesn't
      handle a PE (EEH domain) composed of a combination of the two.
      
      The patch intends to support so-called "partial" hotplug for EEH:
      Before we do reset, we stop and remove those PCI devices without
      EEH sensitive driver. The corresponding EEH devices are not detached
      from its PE, but with special flag. After the reset is done, those
      EEH devices with the special flag will be scanned one by one.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f5c57710
    • G
      powerpc/eeh: Keep PE during hotplug · 807a827d
      Gavin Shan 提交于
      When we do normal hotplug, the PE (shadow EEH structure) shouldn't be
      kept around.
      
      However, we need to keep it if the hotplug an artifial one caused by
      EEH errors recovery.
      
      Since we remove EEH device through the PCI hook pcibios_release_device(),
      the flag "purge_pe" passed to various functions is meaningless. So the patch
      removes the meaningless flag and introduce new flag "EEH_PE_KEEP"
      to save the PE while doing hotplug during EEH error recovery.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      807a827d
  18. 01 7月, 2013 1 次提交
  19. 20 6月, 2013 4 次提交
  20. 18 9月, 2012 2 次提交
    • G
      powerpc/eeh: Lock module while handling EEH event · feadf7c0
      Gavin Shan 提交于
      The EEH core is talking with the PCI device driver to determine the
      action (purely reset, or PCI device removal). During the period, the
      driver might be unloaded and in turn causes kernel crash as follows:
      
      EEH: Detected PCI bus error on PHB#4-PE#10000
      EEH: This PCI device has failed 3 times in the last hour
      lpfc 0004:01:00.0: 0:2710 PCI channel disable preparing for reset
      Unable to handle kernel paging request for data at address 0x00000490
      Faulting instruction address: 0xd00000000e682c90
      cpu 0x1: Vector: 300 (Data Access) at [c000000fc75ffa20]
          pc: d00000000e682c90: .lpfc_io_error_detected+0x30/0x240 [lpfc]
          lr: d00000000e682c8c: .lpfc_io_error_detected+0x2c/0x240 [lpfc]
          sp: c000000fc75ffca0
         msr: 8000000000009032
         dar: 490
       dsisr: 40000000
        current = 0xc000000fc79b88b0
        paca    = 0xc00000000edb0380	 softe: 0	 irq_happened: 0x00
          pid   = 3386, comm = eehd
      enter ? for help
      [c000000fc75ffca0] c000000fc75ffd30 (unreliable)
      [c000000fc75ffd30] c00000000004fd3c .eeh_report_error+0x7c/0xf0
      [c000000fc75ffdc0] c00000000004ee00 .eeh_pe_dev_traverse+0xa0/0x180
      [c000000fc75ffe70] c00000000004ffd8 .eeh_handle_event+0x68/0x300
      [c000000fc75fff00] c0000000000503a0 .eeh_event_handler+0x130/0x1a0
      [c000000fc75fff90] c000000000020138 .kernel_thread+0x54/0x70
      1:mon>
      
      The patch increases the reference of the corresponding driver modules
      while EEH core does the negotiation with PCI device driver so that the
      corresponding driver modules can't be unloaded during the period and
      we're safe to refer the callbacks.
      
      Cc: stable@vger.kernel.org
      Reported-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      feadf7c0
    • G
      powerpc/eeh: Remove EEH PE for normal PCI hotplug · 20ee6a97
      Gavin Shan 提交于
      Function eeh_rmv_from_parent_pe() could be called by the path of
      either normal PCI hotplug, or EEH recovery. For the former case,
      we need purge the corresponding PE on removal of the associated
      PE bus.
      
      The patch tries to cover that by passing more information to function
      pcibios_remove_pci_devices() so that we know if the corresponding PE
      needs to be purged or be marked as "invalid".
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      20ee6a97
  21. 10 9月, 2012 2 次提交
  22. 09 3月, 2012 1 次提交
    • G
      powerpc/eeh: Replace pci_dn with eeh_dev for EEH aux components · 40a7cd92
      Gavin Shan 提交于
      The original EEH implementation is heavily depending on struct pci_dn.
      We have to put EEH related information to pci_dn. Actually, we could
      split struct pci_dn so that the EEH sensitive information to form an
      individual struct, then EEH looks more independent.
      
      The patch replaces pci_dn with eeh_dev for EEH aux components like
      event and driver. Also, the eeh_event struct has been adjusted for
      a little bit since eeh_dev has linked the associated FDT (Flat Device
      Tree) node and PCI device. It's not necessary for eeh_event struct to
      trace FDT node and PCI device. We can just simply to trace eeh_dev in
      eeh_event.
      
      The patch also renames function pcid_name() to eeh_pcid_name(), which
      should be missed in the previous patch where the EEH aux components
      have been cleaned up.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      40a7cd92