1. 17 10月, 2015 9 次提交
  2. 15 10月, 2015 14 次提交
    • M
      powerpc/xmon: Add some more elements to the existing PACA dump list · ad987fc8
      Michael Ellerman 提交于
      This patch adds a set of new elements to the existing PACA dump list
      inside an xmon session which can be listed below improving the overall
      xmon debug support.
      
      With this patch, a typical xmon PACA dump looks something like this.
      
      paca for cpu 0x0 @ c00000000fdc0000:
       possible             = yes
       present              = yes
       online               = yes
       lock_token           = 0x8000            	(0xa)
       paca_index           = 0x0               	(0x8)
       kernel_toc           = 0xc000000001393200	(0x10)
       kernelbase           = 0xc000000000000000	(0x18)
       kernel_msr           = 0xb000000000001033	(0x20)
       emergency_sp         = 0xc00000003fff0000	(0x28)
       mc_emergency_sp      = 0xc00000003ffec000	(0x2e0)
       in_mce               = 0x0               	(0x2e8)
       hmi_event_available  = 0x0               	(0x2ea)
       data_offset          = 0x1fe7b0000       	(0x30)
       hw_cpu_id            = 0x0               	(0x38)
       cpu_start            = 0x1               	(0x3a)
       kexec_state          = 0x0               	(0x3b)
       slb_shadow[0]:       = 0xc000000008000000 0x40016e7779000510
       slb_shadow[1]:       = 0xd000000008000001 0x400142add1000510
       vmalloc_sllp         = 0x510             	(0x1b8)
       slb_cache_ptr        = 0x4               	(0x1ba)
       slb_cache[0]:        = 0x000000000003f000
       slb_cache[1]:        = 0x0000000000000001
       slb_cache[2]:        = 0x0000000000000003
       slb_cache[3]:        = 0x0000000000001000
       slb_cache[4]:        = 0x0000000000001000
       slb_cache[5]:        = 0x0000000000000000
       slb_cache[6]:        = 0x0000000000000000
       slb_cache[7]:        = 0x0000000000000000
       dscr_default         = 0x0               	(0x58)
       __current            = 0xc000000001331e80	(0x290)
       kstack               = 0xc000000001393e30	(0x298)
       stab_rr              = 0x11              	(0x2a0)
       saved_r1             = 0xc0000001fffef5e0	(0x2a8)
       trap_save            = 0x0               	(0x2b8)
       soft_enabled         = 0x0               	(0x2ba)
       irq_happened         = 0x1               	(0x2bb)
       io_sync              = 0x0               	(0x2bc)
       irq_work_pending     = 0x0               	(0x2bd)
       nap_state_lost       = 0x0               	(0x2be)
       sprg_vdso            = 0x0               	(0x2c0)
       tm_scratch           = 0x8000000100009033	(0x2c8)
       core_idle_state_ptr  = (null)            	(0x2d0)
       thread_idle_state    = 0x0               	(0x2d8)
       thread_mask          = 0x0               	(0x2d9)
       subcore_sibling_mask = 0x0               	(0x2da)
       user_time            = 0x0               	(0x2f0)
       system_time          = 0x0               	(0x2f8)
       user_time_scaled     = 0x0               	(0x300)
       starttime            = 0x3f462418b5cf4   	(0x308)
       starttime_user       = 0x3f4622a57092a   	(0x310)
       startspurr           = 0xd62a5718        	(0x318)
       utime_sspurr         = 0x0               	(0x320)
       stolen_time          = 0x0               	(0x328)
      Signed-off-by: NAnshuman Khandual <khandual@linux.vnet.ibm.com>
      [mpe: Endian swap slb_shadow before display, minor formatting]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      ad987fc8
    • S
      powerpc/xmon: Paginate kernel log buffer display · 0c23a88c
      Sam bobroff 提交于
      The kernel log buffer is often much longer than the size of a terminal
      so paginate it's output.
      Signed-off-by: NSam Bobroff <sam.bobroff@au1.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      0c23a88c
    • S
      powerpc/xmon: Paged output for paca display · 958b7c80
      Sam bobroff 提交于
      The paca display is already more than 24 lines, which can be problematic
      if you have an old school 80x24 terminal, or more likely you are on a
      virtual terminal which does not scroll for whatever reason.
      
      This patch adds a new command "#", which takes a single (hex) numeric
      argument: lines per page. It will cause the output of "dp" and "dpa"
      to be broken into pages, if necessary.
      
      Sample output:
      
      0:mon> # 10
      0:mon> dp1
      paca for cpu 0x1 @ c00000000fdc0480:
       possible         = yes
       present          = yes
       online           = yes
       lock_token       = 0x8000            	(0x8)
       paca_index       = 0x1               	(0xa)
       kernel_toc       = 0xc000000000eb2400	(0x10)
       kernelbase       = 0xc000000000000000	(0x18)
       kernel_msr       = 0xb000000000001032	(0x20)
       emergency_sp     = 0xc00000003ffe8000	(0x28)
       mc_emergency_sp  = 0xc00000003ffe4000	(0x2e0)
       in_mce           = 0x0               	(0x2e8)
       data_offset      = 0x7f170000        	(0x30)
       hw_cpu_id        = 0x8               	(0x38)
       cpu_start        = 0x1               	(0x3a)
       kexec_state      = 0x0               	(0x3b)
      [Hit a key (a:all, q:truncate, any:next page)]
      0:mon>
       __current        = 0xc00000007e696620	(0x290)
       kstack           = 0xc00000007e6ebe30	(0x298)
       stab_rr          = 0xb               	(0x2a0)
       saved_r1         = 0xc00000007ef37860	(0x2a8)
       trap_save        = 0x0               	(0x2b8)
       soft_enabled     = 0x0               	(0x2ba)
       irq_happened     = 0x1               	(0x2bb)
       io_sync          = 0x0               	(0x2bc)
       irq_work_pending = 0x0               	(0x2bd)
       nap_state_lost   = 0x0               	(0x2be)
      0:mon>
      Signed-off-by: NSam Bobroff <sam.bobroff@au1.ibm.com>
      [mpe: Use bool, make some variables static]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      958b7c80
    • C
      powerpc/mpc5xxx: Use of_get_next_parent to simplify code · b340587e
      Christophe Jaillet 提交于
      of_get_next_parent can be used to simplify the while() loop and
      avoid the need of a temp variable.
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      b340587e
    • C
      powerpc/numa: Use of_get_next_parent to simplify code · 1def3758
      Christophe Jaillet 提交于
      of_get_next_parent can be used to simplify the while() loop and
      avoid the need of a temp variable.
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      1def3758
    • P
      powerpc: Delete old orphaned PrPMC 280/2800 DTS and boot file. · 5fab1d1c
      Paul Gortmaker 提交于
      In commit 3c8464a9 ("powerpc:
      Delete old PrPMC 280/2800 support") we got rid of most of the C
      code, and the Makefile/Kconfig hooks, but it seems I left the
      platform's DTS file orphaned in the tree as well as the boot code.
      Here we get rid of them both.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      5fab1d1c
    • S
      powerpc: discard .exit.data at runtime · 4c812318
      Stephen Rothwell 提交于
      .exit.text is discarded at run time and there are some references from
      that to .exit.data, so we need to discard .exit.data at run time as well.
      
      Fixes these errors:
      
      `.exit.data' referenced in section `.exit.text' of drivers/built-in.o: defined in discarded section `.exit.data' of drivers/built-in.o
      `.exit.data' referenced in section `.exit.text' of drivers/built-in.o: defined in discarded section `.exit.data' of drivers/built-in.o
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      4c812318
    • G
      powerpc/eeh: atomic_dec_if_positive() to update passthru count · 54f9a64a
      Gavin Shan 提交于
      No need to have two atomic opertions (update and fetch/check) when
      decreasing PE's number of passed devices as one atomic operation
      is enough.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      54f9a64a
    • A
      powerpc/pci: export pcibios_free_controller() · 6b8b252f
      Andrew Donnellan 提交于
      Export pcibios_free_controller(), so it can be used by the cxl module to
      free virtual PHBs.
      Signed-off-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      6b8b252f
    • S
      powerpc: Individual System V IPC system calls · a3423615
      Sam bobroff 提交于
      This patch provides individual system call numbers for the following
      System V IPC system calls, on PowerPC, so that they do not need to be
      multiplexed:
      * semop, semget, semctl, semtimedop
      * msgsnd, msgrcv, msgget, msgctl
      * shmat, shmdt, shmget, shmctl
      Signed-off-by: NSam Bobroff <sam.bobroff@au1.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      a3423615
    • M
      powerpc/pseries: Drop always true CONFIG_PSERIES_MSI · f7688056
      Michael Ellerman 提交于
      Now that pseries selects PCI_MSI && PCI, EEH will always be true, and
      therefore CONFIG_PSERIES_MSI will always be true. So drop it, and move
      msi.o to obj-y.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      f7688056
    • M
      powerpc/pseries: Move PCI objects to obj-y · 44f2aecf
      Michael Ellerman 提交于
      Make it entirely clear in the Makefile that we always build the pci
      related files by moving them to obj-y.
      
      Note that CONFIG_EEH is now always enabled on pseries, because it
      depends on PSERIES && PCI.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      44f2aecf
    • M
      powerpc/pseries: Remove use of CONFIG_PCI · 84eb9e61
      Michael Ellerman 提交于
      Now that we always have CONFIG_PCI=y for pseries, we can stop guarding
      code with CONFIG_PCI ifdefs.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      84eb9e61
    • M
      powerpc/pseries: Make PCI non-optional · 4c9cd468
      Michael Ellerman 提交于
      The pseries build with PCI=n looks to have been broken for at least 5
      years, and no one's noticed or cared.
      
      Following the obvious breakages backward, the first commit I can find
      that builds is the parent of 2eb4afb6 ("powerpc/pci: Move pseries
      code into pseries platform specific area") from April 2009.
      
      A distro would never ship a PCI=n kernel, so it is only useful for folks
      building custom kernels. Also on KVM the virtio devices appear on PCI,
      so it would only be useful if you were building kernels specifically to
      run on PowerVM and with no PCI devices.
      
      The added code complexity, and testing load (which we've clearly not
      been doing), is not justified by the small reduction in kernel size for
      such a niche use case.
      
      So just make PCI non-optional on pseries.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      4c9cd468
  3. 12 10月, 2015 2 次提交
  4. 09 10月, 2015 2 次提交
  5. 06 10月, 2015 2 次提交
  6. 05 10月, 2015 6 次提交
  7. 02 10月, 2015 2 次提交
  8. 01 10月, 2015 3 次提交
    • M
      powerpc: Add ppc64le_defconfig · 2adc48a6
      Michael Ellerman 提交于
      Based directly on ppc64_defconfig using merge_config.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      2adc48a6
    • A
      powerpc/mm: Add virt_to_pfn and use this instead of opencoding · 65d3223a
      Aneesh Kumar K.V 提交于
      This add helper virt_to_pfn and remove the opencoded usage of the
      same.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      65d3223a
    • M
      powerpc/vdso: Avoid link stack corruption in __get_datapage() · c974809a
      Michael Neuling 提交于
      powerpc has a link register (lr) used for calling functions. We "bl
      <func>" to call a function, and "blr" to return back to the call site.
      
      The lr is only a single register, so if we call another function from
      inside this function (ie. nested calls), software must save away the
      lr on the software stack before calling the new function. Before
      returning (ie. before the "blr"), the lr is restored by software from
      the software stack.
      
      This makes branch prediction quite difficult for the processor as it
      will only know the branch target just before the "blr".
      
      To help with this, modern powerpc processors keep a (non-architected)
      hardware stack of lr called a "link stack". When a "bl <func>" is
      run, the lr is pushed onto this stack. When a "blr" is called, the
      branch predictor pops the lr value from the top of the link stack, and
      uses it to predict the branch target. Hence the processor pipeline
      knows a lot earlier the branch target.
      
      This works great but there are some cases where you call "bl" but
      without a matching "blr". Once such case is when trying to determine
      the program counter (which can't be read directly). Here you "bl+4;
      mflr" to get the program counter. If you do this, the link stack will
      get out of sync with reality, causing the branch predictor to
      mis-predict subsequent function returns.
      
      To avoid this, modern micro-architectures have a special case of bl.
      Using the form "bcl 20,31,+4", ensures the processor doesn't push to
      the link stack.
      
      The 32 and 64 bit variants of __get_datapage() use a "bl; mflr" to
      determine the loaded address of the VDSO. The current versions of
      these attempt to use this special bl variant.
      
      Unfortunately they use +8 rather than the required +4. Hence the
      current code results in the link stack getting out of sync with
      reality and hence the resulting performance degradation.
      
      This patch moves it to bcl+4 by moving __kernel_datapage_offset out of
      __get_datapage().
      
      With this patch, running a gettimeofday() (which uses
      __get_datapage()) microbenchmark we get a decent bump in performance
      on POWER7/8.
      
      For the benchmark in tools/testing/selftests/powerpc/benchmarks/gettimeofday.c
        POWER8:
          64bit gets ~4% improvement
          32bit gets ~9% improvement
        POWER7:
          64bit gets ~7% improvement
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Reported-by: NAaron Sawdey <sawdey@us.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      c974809a