1. 20 6月, 2013 16 次提交
    • G
      powerpc/eeh: EEH core to handle special event · 8a6b1bc7
      Gavin Shan 提交于
      On PowerNV platform, the EEH event caused by interrupt won't have
      binding PE. The patch enables EEH core to handle the special event.
      To avoid the current logic we have, The eeh_handle_event() is renamed
      to eeh_handle_normal_event(), and the eeh_handle_special_event() is
      introduced. The function eeh_handle_event() dispatches to above two
      functions according to the input parameter. Besides, new backend
      "next_error" added to eeh_ops and it's expected to have following
      return values:
      
              4 - Dead IOC           3 - Dead PHB
              2 - Fenced PHB         1 - Frozen PE
              0 - No error found
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8a6b1bc7
    • G
      powerpc/eeh: Export confirm_error_lock · 4907581d
      Gavin Shan 提交于
      An EEH event is created and queued to the event queue for each
      ingress EEH error. When there're mutiple EEH errors, we need serialize
      the process to keep consistent PE state (flags). The spinlock
      "confirm_error_lock" was introduced for the purpose. We'll inject
      EEH event upon error reporting interrupts on PowerNV platform. So
      we export the spinlock for that to use for consistent PE state.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4907581d
    • G
      powerpc/eeh: Allow to purge EEH events · 99866595
      Gavin Shan 提交于
      On PowerNV platform, we might run into the situation where subsequent
      events are duplicated events of former one, which is being processed.
      For the case, we need the function implemented by the patch to purge
      EEH events accordingly.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      99866595
    • G
      powerpc/eeh: Trace time on first error for PE · 5a71978e
      Gavin Shan 提交于
      We're not expecting that one specific PE got frozen for over 5
      times in last hour. Otherwise, the PE will be removed from the
      system upon newly coming EEH errors. The patch introduces time
      stamp to trace the first error on specific PE in last hour and
      function to update that accordingly. Besides, the time stamp
      is recovered during PE hotplug path as we did for frozen count.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5a71978e
    • G
      powerpc/eeh: Single kthread to handle events · c8608558
      Gavin Shan 提交于
      We possiblly have multiple kthreads running for multiple EEH errors
      (events) and use one spinlock to make the process of handling those
      EEH events serialized. That's unnecessary and the patch creates only
      one kthread, which is started during EEH core initialization time in
      eeh_init(). A new semaphore introduced to count the number of existing
      EEH events in the queue and the kthread waiting on the semaphore.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c8608558
    • G
      powerpc/eeh: EEH post initialization operation · 21fd21f5
      Gavin Shan 提交于
      The patch adds new EEH operation post_init. It's used to notify
      the platform that EEH core has completed the EEH probe. By that,
      PowerNV platform starts to use the services supplied by EEH
      functionality.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      21fd21f5
    • G
      powerpc/eeh: Make eeh_init() public · 51fb5f56
      Gavin Shan 提交于
      For EEH on PowerNV platform, we will do EEH probe based on the
      real PCI devices. The PCI devices are available after PCI probe.
      So we have to call eeh_init() explicitly on PowerNV platform
      after PCI probe. The patch also does EEH probe for PowerNV platform
      in eeh_init().
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      51fb5f56
    • G
      powerpc/eeh: Trace PCI bus from PE · 8cdb2833
      Gavin Shan 提交于
      There're several types of PEs can be supported for now: PHB, Bus
      and Device dependent PE. For PCI bus dependent PE, tracing the
      corresponding PCI bus from PE (struct eeh_pe) would make the code
      more efficient. The patch also enables the retrieval of PCI bus based
      on the PCI bus dependent PE.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8cdb2833
    • G
      powerpc/eeh: Make eeh_pe_get() public · 01566808
      Gavin Shan 提交于
      While processing EEH event interrupt from P7IOC, we need function
      to retrieve the PE according to the indicated EEH device. The patch
      makes function eeh_pe_get() public so that other source files can call
      it for that purpose. Also, the patch fixes referring to wrong BDF
      (Bus/Device/Function) address while searching PE in function
      __eeh_pe_get().
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      01566808
    • G
      powerpc/eeh: Make eeh_phb_pe_get() public · 9ff67433
      Gavin Shan 提交于
      One of the possible cases indicated by P7IOC interrupt is fenced
      PHB. For that case, we need fetch the PE corresponding to the PHB
      and disable the PHB and all subordinate PCI buses/devices, recover
      from the fenced state and eventually enable the whole PHB. We need
      one function to fetch the PHB PE outside eeh_pe.c and the patch is
      going to make eeh_phb_pe_get() public for that purpose.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      9ff67433
    • G
      powerpc/eeh: Enhance converting EEH dev · 2d5c1216
      Gavin Shan 提交于
      Under some special circumstances, the EEH device doesn't have the
      associated device tree node or PCI device. The patch enhances those
      functions converting EEH device to device tree node or PCI device
      accordingly to avoid unnecessary system crash.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      2d5c1216
    • A
      powerpc: Align thread->fpr to 16 bytes · 475e68cf
      Anton Blanchard 提交于
      On newer CPUs we use VSX loads and stores to the thread->fpr array.
      For best performance we need to ensure 16 byte alignment.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      475e68cf
    • B
    • A
      powerpc/vfio: Enable on PowerNV platform · 4e13c1ac
      Alexey Kardashevskiy 提交于
      This initializes IOMMU groups based on the IOMMU configuration
      discovered during the PCI scan on POWERNV (POWER non virtualized)
      platform.  The IOMMU groups are to be used later by the VFIO driver,
      which is used for PCI pass through.
      
      It also implements an API for mapping/unmapping pages for
      guest PCI drivers and providing DMA window properties.
      This API is going to be used later by QEMU-VFIO to handle
      h_put_tce hypercalls from the KVM guest.
      
      The iommu_put_tce_user_mode() does only a single page mapping
      as an API for adding many mappings at once is going to be
      added later.
      
      Although this driver has been tested only on the POWERNV
      platform, it should work on any platform which supports
      TCE tables.  As h_put_tce hypercall is received by the host
      kernel and processed by the QEMU (what involves calling
      the host kernel again), performance is not the best -
      circa 220MB/s on 10Gb ethernet network.
      
      To enable VFIO on POWER, enable SPAPR_TCE_IOMMU config
      option and configure VFIO as required.
      
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4e13c1ac
    • D
      powerpc/mm: Make mmap_64.c compile on 32bit powerpc · d5d8ec89
      Daniel Walker 提交于
      There appears to be no good reason to keep this as 64bit only. It works
      on 32bit also, and has checks so that it can work correctly with 32bit
      binaries on 64bit hardware which is why I think this works.
      
      I tested this on qemu using the virtex-ml507 machine type.
      
      Before,
      
      /bin2 # ./test & cat /proc/${!}/maps
      00100000-00103000 r-xp 00000000 00:00 0          [vdso]
      10000000-10007000 r-xp 00000000 00:01 454        /bin2/test
      10017000-10018000 rw-p 00007000 00:01 454        /bin2/test
      48000000-48020000 r-xp 00000000 00:01 224        /lib/ld-2.11.3.so
      48021000-48023000 rw-p 00021000 00:01 224        /lib/ld-2.11.3.so
      bfd03000-bfd24000 rw-p 00000000 00:00 0          [stack]
      /bin2 # ./test & cat /proc/${!}/maps
      00100000-00103000 r-xp 00000000 00:00 0          [vdso]
      0fe6e000-0ffd8000 r-xp 00000000 00:01 214        /lib/libc-2.11.3.so
      0ffd8000-0ffe8000 ---p 0016a000 00:01 214        /lib/libc-2.11.3.so
      0ffe8000-0ffed000 rw-p 0016a000 00:01 214        /lib/libc-2.11.3.so
      0ffed000-0fff0000 rw-p 00000000 00:00 0
      10000000-10007000 r-xp 00000000 00:01 454        /bin2/test
      10017000-10018000 rw-p 00007000 00:01 454        /bin2/test
      48000000-48020000 r-xp 00000000 00:01 224        /lib/ld-2.11.3.so
      48020000-48021000 rw-p 00000000 00:00 0
      48021000-48023000 rw-p 00021000 00:01 224        /lib/ld-2.11.3.so
      bf98a000-bf9ab000 rw-p 00000000 00:00 0          [stack]
      /bin2 # ./test & cat /proc/${!}/maps
      00100000-00103000 r-xp 00000000 00:00 0          [vdso]
      0fe6e000-0ffd8000 r-xp 00000000 00:01 214        /lib/libc-2.11.3.so
      0ffd8000-0ffe8000 ---p 0016a000 00:01 214        /lib/libc-2.11.3.so
      0ffe8000-0ffed000 rw-p 0016a000 00:01 214        /lib/libc-2.11.3.so
      0ffed000-0fff0000 rw-p 00000000 00:00 0
      10000000-10007000 r-xp 00000000 00:01 454        /bin2/test
      10017000-10018000 rw-p 00007000 00:01 454        /bin2/test
      48000000-48020000 r-xp 00000000 00:01 224        /lib/ld-2.11.3.so
      48020000-48021000 rw-p 00000000 00:00 0
      48021000-48023000 rw-p 00021000 00:01 224        /lib/ld-2.11.3.so
      bfa54000-bfa75000 rw-p 00000000 00:00 0          [stack]
      
      After,
      
      bash-4.1# ./test & cat /proc/${!}/maps
      [7] 803
      00100000-00103000 r-xp 00000000 00:00 0          [vdso]
      10000000-10007000 r-xp 00000000 00:01 454        /bin2/test
      10017000-10018000 rw-p 00007000 00:01 454        /bin2/test
      b7eb0000-b7ed0000 r-xp 00000000 00:01 224        /lib/ld-2.11.3.so
      b7ed1000-b7ed3000 rw-p 00021000 00:01 224        /lib/ld-2.11.3.so
      bfbc0000-bfbe1000 rw-p 00000000 00:00 0          [stack]
      bash-4.1# ./test & cat /proc/${!}/maps
      [8] 805
      00100000-00103000 r-xp 00000000 00:00 0          [vdso]
      10000000-10007000 r-xp 00000000 00:01 454        /bin2/test
      10017000-10018000 rw-p 00007000 00:01 454        /bin2/test
      b7b03000-b7b23000 r-xp 00000000 00:01 224        /lib/ld-2.11.3.so
      b7b24000-b7b26000 rw-p 00021000 00:01 224        /lib/ld-2.11.3.so
      bfc27000-bfc48000 rw-p 00000000 00:00 0          [stack]
      bash-4.1# ./test & cat /proc/${!}/maps
      [9] 807
      00100000-00103000 r-xp 00000000 00:00 0          [vdso]
      10000000-10007000 r-xp 00000000 00:01 454        /bin2/test
      10017000-10018000 rw-p 00007000 00:01 454        /bin2/test
      b7f37000-b7f57000 r-xp 00000000 00:01 224        /lib/ld-2.11.3.so
      b7f58000-b7f5a000 rw-p 00021000 00:01 224        /lib/ld-2.11.3.so
      bff96000-bffb7000 rw-p 00000000 00:00 0          [stack]
      Signed-off-by: NDaniel Walker <dwalker@fifo90.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d5d8ec89
    • S
      powerpc: Move the single step enable code to a generic path · 35fd219a
      Suzuki K. Poulose 提交于
      This patch moves the single step enable code used by kprobe to a generic
      routine header so that, it can be re-used by other code, in this case,
      uprobes. No functional changes.
      Signed-off-by: NSuzuki K. Poulose <suzuki@in.ibm.com>
      Cc:	Ananth N Mavinakaynahalli <ananth@in.ibm.com>
      Cc:	Kumar Gala <galak@kernel.crashing.org>
      Cc:	linuxppc-dev@ozlabs.org
      Acked-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      35fd219a
  2. 11 6月, 2013 1 次提交
  3. 10 6月, 2013 1 次提交
  4. 01 6月, 2013 6 次提交
  5. 24 5月, 2013 2 次提交
  6. 14 5月, 2013 6 次提交
  7. 10 5月, 2013 2 次提交
  8. 08 5月, 2013 1 次提交
  9. 07 5月, 2013 1 次提交
  10. 06 5月, 2013 4 次提交