1. 10 6月, 2013 1 次提交
  2. 10 9月, 2012 4 次提交
    • G
      powerpc/eeh: Probe mode support · d7bb8862
      Gavin Shan 提交于
      While EEH module is installed, PCI devices is checked one by one
      to see if it supports eeh. On different platforms, the PCI devices
      are referred through different ways when the EEH module is loaded.
      For example, on pSeries platform, that is done by OF node. However,
      we would do that by real PCI devices (struct pci_dev) on PowerNV
      platform in future. So we needs some mechanism to differentiate
      those cases by classifying them to probe modes, either from OF
      nodes or real PCI devices.
      
      The patch implements the support to eeh probe mode. Also, the
      EEH on pSeries has set it into EEH_PROBE_MODE_DEVTREE. That means
      the probe will be done based on OF nodes on pSeries platform.
      
      In addition, On pSeries platform, it's done by OF nodes. The patch
      moves the the probe function from EEH core to platform dependent
      backend and some cleanup applied.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d7bb8862
    • G
      powerpc/eeh: Make EEH operations based on PE · 371a395d
      Gavin Shan 提交于
      Originally, all the EEH operations were implemented based on OF node.
      
      Actually, it explicitly breaks the rules that the operation target
      is PE instead of device. Therefore, the patch makes all the operations
      based on PE instead of device.
      
      Unfortunately, the backend for config space has to be kept as original
      because it doesn't depend on PE.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      371a395d
    • G
      powerpc/eeh: More logs for EEH initialization · 3ea1ae98
      Gavin Shan 提交于
      The patch adds more logs to EEH initialization functions for
      debugging purpose. Also, the machine type (pSeries) is checked
      in the platform initialization to assure it's the correct platform
      to invoke it.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3ea1ae98
    • G
      powerpc/eeh: Move EEH initialization around · 35e5cfe2
      Gavin Shan 提交于
      Currently, we have 3 phases for EEH initialization on pSeries platform.
      All of them are done through builtin functions: platform initialization,
      EEH device creation, and EEH subsystem enablement. All of them are done
      no later than ppc_md.setup_arch. That means that the slab/slub isn't ready
      yet, so we have to allocate memory chunks on basis of PAGE_SIZE for those
      dynamically created EEH devices. That's pretty expensive.
      
      In order to utilize slab/slub for memory allocation, we have to move the EEH
      initialization functions around, but all of them should be called after slab
      is ready.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      35e5cfe2
  3. 10 7月, 2012 1 次提交
  4. 09 3月, 2012 11 次提交
    • G
      powerpc/eeh: pseries platform config space access in EEH · 3780444c
      Gavin Shan 提交于
      With the original EEH implementation, the access to config space of
      the corresponding PCI device is done by RTAS sensitive function. That
      depends on pci_dn heavily. That would limit EEH extension to other
      platforms like powernv because other platforms might have different
      ways to access PCI config space.
      
      The patch splits those functions used to access PCI config space
      and implement them in platform related EEH component. It would be
      helpful to support EEH on multiple platforms simutaneously in future.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3780444c
    • G
      powerpc/eeh: Replace pci_dn with eeh_dev for EEH on pSeries · 54793d0e
      Gavin Shan 提交于
      The pci_dn has been replaced with eeh_dev. In order to comply with
      the rule, the EEH platform implementation on pSeries should also
      be adjusted for a little bit so that it will depend on eeh_dev instead
      of pci_dn.
      
      The patch replaces pci_dn with eeh_dev. The corresponding information
      will be retrieved from eeh_dev instead of pci_dn.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      54793d0e
    • G
      powerpc/eeh: pseries platform EEH configure bridge · 1823fbf1
      Gavin Shan 提交于
      In order to enable particular PCI device, which has been included
      in the parent PE. The involved PCI bridges should be enabled explicitly
      if there has. On pSeries platform, there're dedicated RTAS calls
      to fulfil the purpose.
      
      The patch implements the function of configuring PCI bridges through
      the dedicated RTAS calls. Besides, the function has been abstracted
      by struct eeh_ops::configure_bridge so that the EEH core components
      could support multiple platforms in future.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      1823fbf1
    • G
      powerpc/eeh: pseries platform EEH error log retrieval · 8d633291
      Gavin Shan 提交于
      On RTAS compliant pSeries platform, one dedicated RTAS call has
      been introduced to retrieve EEH temporary or permanent error log.
      
      The patch implements the function of retriving EEH error log through
      RTAS call. Besides, it has been abstracted by struct eeh_ops::get_log
      so that EEH core components could support multiple platforms in future.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8d633291
    • G
      powerpc/eeh: pseries platform EEH reset PE · 2652481f
      Gavin Shan 提交于
      On RTAS compliant pSeries platform, there is a dedicated RTAS call
      (ibm,set-slot-reset) to reset the specified PE. Furthermore, two
      types of resets are supported: hot and fundamental. the type of
      reset is to be used actually depends on the included PCI device's
      requirements.
      
      The patch implements resetting PE on pSeries platform through RTAS
      call. Besides, it has been abstracted through struct eeh_ops::reset
      so that EEH core components could support multiple platforms in future.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      2652481f
    • G
      powerpc/eeh: pseries platform EEH wait PE state · b0e5f742
      Gavin Shan 提交于
      On pSeries platform, the PE state might be temporarily unavailable.
      In that case, the firmware will return the corresponding wait time.
      That means the kernel has to wait for appropriate time in order to
      get the PE state.
      
      The patch does the implementation for that. Besides, the function
      has been abstracted through struct eeh_ops::wait_state so that EEH core
      components could support multiple platforms in future.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      b0e5f742
    • G
      powerpc/eeh: pseries platform PE state retrieval · eb594a47
      Gavin Shan 提交于
      On pSeries platform, there're 2 dedicated RTAS calls introduced to
      retrieve the corresponding PE's state: ibm,read-slot-reset-state and
      ibm,read-slot-reset-state2.
      
      The patch implements the retrieval of PE's state according to the
      given PE address. Besides, the implementation has been abstracted by
      struct eeh_ops::get_state so that EEH core components could support
      multiple platforms in future.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      eb594a47
    • G
      powerpc/eeh: pseries platform EEH PE address retrieval · c8c29b38
      Gavin Shan 提交于
      There're 2 types of addresses used for EEH operations. The first
      one would be BDF (Bus/Device/Function) address which is retrieved
      from the reg property of the corresponding FDT node. Another one
      is PE address that should be enquired from firmware through RTAS
      call on pSeries platform. When issuing EEH operation, the PE address
      has precedence over BDF address.
      
      The patch implements retrieving PE address according to the given
      BDF address on pSeries platform. Also, the struct eeh_early_enable_info
      has been removed since the information can be figured out from
      dn->pdn->phb->buid directly and that simplifies the code.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c8c29b38
    • G
      powerpc/eeh: pseries platform EEH operations · 8fb8f709
      Gavin Shan 提交于
      There're 4 EEH operations that are covered by the dedicated RTAS
      call <ibm,set-eeh-option>: enable or disable EEH, enable MMIO and
      enable DMA. At early stage of system boot, the EEH would be tried
      to enable on PCI device related device node. MMIO and DMA for
      particular PE should be enabled when doing recovery on EEH errors
      so that the PE could function properly again.
      
      The patch implements it and abstract that through struct
      eeh_ops::set_eeh. It would be help for EEH to support multiple
      platforms in future.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8fb8f709
    • G
      powerpc/eeh: pseries platform EEH initialization · e2af155c
      Gavin Shan 提交于
      The platform specific EEH operations have been abstracted by
      struct eeh_ops. The individual platroms, including pSeries, needs
      doing necessary initialization before the platform dependent EEH
      operations work properly.
      
      The patch is addressing that and do necessary platform initialization
      for pSeries platform. More specificly, it will figure out the tokens
      of EEH related RTAS calls.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e2af155c
    • G
      powerpc/eeh: Platform dependent EEH operations · aa1e6374
      Gavin Shan 提交于
      EEH has been implemented on RTAS-compliant pSeries platform.
      That's to say, the EEH operations will be implemented through RTAS
      calls eventually. The situation limited feasible extension on EEH.
      In order to support EEH on multiple platforms like pseries and powernv
      simutaneously. We have to split the platform dependent EEH options
      up out of current implementation.
      
      The patch addresses supporting EEH on multiple platforms. The pseries
      platform dependent EEH operations will be abstracted by struct eeh_ops.
      EEH core components will be built based on the registered EEH operations.
      With the mechanism, what the individual platform needs to do is implement
      platform dependent EEH operations.
      
      For now, the pseries platform is covered under the mechanism. That means
      we have to think about other platforms to support EEH, like powernv.
      Besides, we only have framework for the mechanism and we have to implement
      it for pseries platform later.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      aa1e6374