1. 18 9月, 2012 9 次提交
    • 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
    • T
      powerpc/kprobe: Don't emulate store when kprobe stwu r1 · 8e9f6937
      Tiejun Chen 提交于
      We don't do the real store operation for kprobing 'stwu Rx,(y)R1'
      since this may corrupt the exception frame, now we will do this
      operation safely in exception return code after migrate current
      exception frame below the kprobed function stack.
      
      So we only update gpr[1] here and trigger a thread flag to mask
      this.
      
      Note we should make sure if we trigger kernel stack over flow.
      Signed-off-by: NTiejun Chen <tiejun.chen@windriver.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8e9f6937
    • T
      powerpc/kprobe: Complete kprobe and migrate exception frame · a9c4e541
      Tiejun Chen 提交于
      We can't emulate stwu since that may corrupt current exception stack.
      So we will have to do real store operation in the exception return code.
      
      Firstly we'll allocate a trampoline exception frame below the kprobed
      function stack and copy the current exception frame to the trampoline.
      Then we can do this real store operation to implement 'stwu', and reroute
      the trampoline frame to r1 to complete this exception migration.
      Signed-off-by: NTiejun Chen <tiejun.chen@windriver.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a9c4e541
    • T
      powerpc/kprobe: Introduce a new thread flag · f0d1128f
      Tiejun Chen 提交于
      We need to add a new thread flag, TIF_EMULATE_STACK_STORE,
      for emulating stack store operation while exiting exception.
      Signed-off-by: NTiejun Chen <tiejun.chen@windriver.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f0d1128f
    • B
      powerpc: Remove unused __get_user64() and __put_user64() · 52ab3b2b
      Bharat Bhushan 提交于
      __get_user64()  and __put_user64() are not used.
      Signed-off-by: NBharat Bhushan <bharat.bhushan@freescale.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      52ab3b2b
    • G
      powerpc/eeh: Global mutex to protect PE tree · ea81245c
      Gavin Shan 提交于
      We have missed lots of situations where the PE hierarchy tree need
      protection through the EEH global mutex. The patch fixes that for
      those public APIs implemented in eeh_pe.c. The only exception is
      eeh_pe_restore_bars() because it calls eeh_pe_dev_traverse(), which
      has been protected by the mutex.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ea81245c
    • 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
    • G
      powerpc/eeh: Introduce EEH_PE_INVALID type PE · 5efc3ad7
      Gavin Shan 提交于
      When EEH error happens on the PE whose PCI devices don't have
      attached drivers. In function eeh_handle_event(), the default
      value PCI_ERS_RESULT_NONE will be returned after iterating all
      drivers of those PCI devices belonging to the PE. Actually, we
      don't have installed drivers for the PCI devices. Under the
      circumstance, we will remove the corresponding PCI bus of the PE,
      including the associated EEH devices and PE instance. However,
      we still need the information stored in the PE instance to do PE
      reset after that. So it's unsafe to free the PE instance.
      
      The patch introduces EEH_PE_INVALID type PE to address the issue.
      When the PCI bus and the corresponding attached EEH devices are
      removed, we will mark the PE as EEH_PE_INVALID. At later point,
      the PE will be changed to EEH_PE_DEVICE or EEH_PE_BUS when the
      corresponding EEH devices are attached again.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5efc3ad7
    • M
      powerpc: Add an xmon command to dump one or all pacas · ddadb6b8
      Michael Ellerman 提交于
      This was originally motivated by a desire to see the mapping between
      logical and hardware cpu numbers.
      
      But it seemed that it made more sense to just add a command to dump
      (most of) the paca.
      
      With no arguments "dp" will dump the paca for the current cpu.
      
      It also takes an argument, eg. "dp 3" which is the logical cpu number
      in hex. This form does not check if the cpu is possible, but displays
      the paca regardless, as well as the cpu's state in the possible, present
      and online masks.
      
      Thirdly, "dpa" will display the paca for all possible cpus. If there are
      no possible cpus, like early in boot, it will tell you that.
      
      Sample output, number in brackets is the offset into the struct:
      
      2:mon> dp 3
      paca for cpu 0x3 @ c00000000ff20a80:
       possible         = yes
       present          = yes
       online           = yes
       lock_token       = 0x8000            	(0x8)
       paca_index       = 0x3               	(0xa)
       kernel_toc       = 0xc00000000144f990	(0x10)
       kernelbase       = 0xc000000000000000	(0x18)
       kernel_msr       = 0xb000000000001032	(0x20)
       stab_real        = 0x0               	(0x28)
       stab_addr        = 0x0               	(0x30)
       emergency_sp     = 0xc00000003ffe4000	(0x38)
       data_offset      = 0xa40000          	(0x40)
       hw_cpu_id        = 0x9               	(0x50)
       cpu_start        = 0x1               	(0x52)
       kexec_state      = 0x0               	(0x53)
       __current        = 0xc00000007e568680	(0x218)
       kstack           = 0xc00000007e5a3e30	(0x220)
       stab_rr          = 0x1a              	(0x228)
       saved_r1         = 0xc00000007e7cb450	(0x230)
       trap_save        = 0x0               	(0x240)
       soft_enabled     = 0x0               	(0x242)
       irq_happened     = 0x0               	(0x243)
       io_sync          = 0x0               	(0x244)
       irq_work_pending = 0x0               	(0x245)
       nap_state_lost   = 0x0               	(0x246)
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ddadb6b8
  2. 17 9月, 2012 23 次提交
  3. 14 9月, 2012 1 次提交
    • B
      Merge commit 'v3.6-rc5' into pci/gavin-window-alignment · 9a5d5bd8
      Bjorn Helgaas 提交于
      * commit 'v3.6-rc5': (1098 commits)
        Linux 3.6-rc5
        HID: tpkbd: work even if the new Lenovo Keyboard driver is not configured
        Remove user-triggerable BUG from mpol_to_str
        xen/pciback: Fix proper FLR steps.
        uml: fix compile error in deliver_alarm()
        dj: memory scribble in logi_dj
        Fix order of arguments to compat_put_time[spec|val]
        xen: Use correct masking in xen_swiotlb_alloc_coherent.
        xen: fix logical error in tlb flushing
        xen/p2m: Fix one-off error in checking the P2M tree directory.
        powerpc: Don't use __put_user() in patch_instruction
        powerpc: Make sure IPI handlers see data written by IPI senders
        powerpc: Restore correct DSCR in context switch
        powerpc: Fix DSCR inheritance in copy_thread()
        powerpc: Keep thread.dscr and thread.dscr_inherit in sync
        powerpc: Update DSCR on all CPUs when writing sysfs dscr_default
        powerpc/powernv: Always go into nap mode when CPU is offline
        powerpc: Give hypervisor decrementer interrupts their own handler
        powerpc/vphn: Fix arch_update_cpu_topology() return value
        ARM: gemini: fix the gemini build
        ...
      
      Conflicts:
      	drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
      	drivers/rapidio/devices/tsi721.c
      9a5d5bd8
  4. 12 9月, 2012 5 次提交
  5. 10 9月, 2012 2 次提交