1. 07 Sep, 2012 7 commits
    • Suzuki Poulose's avatar
      powerpc: Export memory limit via device tree · 4bc77a5e
      Suzuki Poulose authored
      The powerpc kernel doesn't export the memory limit enforced by 'mem='
      kernel parameter. This is required for building the ELF header in
      kexec-tools to limit the vmcore to capture only the used memory. On
      powerpc the kexec-tools depends on the device-tree for memory related
      information, unlike /proc/iomem on the x86.
      
      Without this information, the kexec-tools assumes the entire System
      RAM and vmcore creates an unnecessarily larger dump.
      
      This patch exports the memory limit, if present, via
      chosen/linux,memory-limit
      property, so that the vmcore can be limited to the memory limit.
      
      The prom_init seems to export this value in the same node. But doesn't
      really
      appear there.  Also the memory_limit gets adjusted with the processing of
      crashkernel= parameter. This patch makes sure we get the actual limit.
      
      The kexec-tools will use the value to limit the 'end' of the memory
      regions.
      
      Tested this patch on ppc64 and ppc32(ppc440) with a kexec-tools
      patch by Mahesh.
      Signed-off-by: default avatarSuzuki K. Poulose <suzuki@in.ibm.com>
      Tested-by: default avatarMahesh J. Salgaonkar <mahesh@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4bc77a5e
    • Suzuki Poulose's avatar
      powerpc: Change memory_limit from phys_addr_t to unsigned long long · a84fcd46
      Suzuki Poulose authored
      There are some device-tree nodes, whose values are of type phys_addr_t.
      The phys_addr_t is variable sized based on the CONFIG_PHSY_T_64BIT.
      
      Change these to a fixed unsigned long long for consistency.
      
      This patch does the change only for memory_limit.
      
      The following is a list of such variables which need the change:
      
       1) kernel_end, crashk_size - in arch/powerpc/kernel/machine_kexec.c
      
       2) (struct resource *)crashk_res.start - We could export a local static
          variable from machine_kexec.c.
      
      Changing the above values might break the kexec-tools. So, I will
      fix kexec-tools first to handle the different sized values and then change
       the above.
      Suggested-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarSuzuki K. Poulose <suzuki@in.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a84fcd46
    • Matthew McClintock's avatar
      powerpc: Fix build dependencies for c files requiring libfdt.h · 0090e02b
      Matthew McClintock authored
      Several files in obj-plat depend on libfdt header file. Sometimes
      when building one can see the following issue. This patch adds
      libfdt as dependency to those object files
      
      | In file included from arch/powerpc/boot/treeboot-iss4xx.c:33:0:
      | arch/powerpc/boot/libfdt.h:854:1: error: unterminated comment
      | In file included from arch/powerpc/boot/treeboot-iss4xx.c:33:0:
      | arch/powerpc/boot/libfdt.h:1:0: error: unterminated #ifndef
      |   BOOTCC  arch/powerpc/boot/inffast.o
      | make[1]: *** [arch/powerpc/boot/treeboot-iss4xx.o] Error 1
      | make[1]: *** Waiting for unfinished jobs....
      |   BOOTCC  arch/powerpc/boot/inflate.o
      | make: *** [uImage] Error 2
      | ERROR: oe_runmake failed
      | ERROR: Function failed: do_compile (see /srv/home/pokybuild/yocto-autobuilder/yocto-slave/p1022ds/build/build/tmp/work/p1022ds-poky-linux-gnuspe/linux-qoriq-sdk-3.0.34-r5/temp/log.do_compile.2167 for further information)
      NOTE: recipe linux-qoriq-sdk-3.0.34-r5: task do_compile: Failed
      Signed-off-by: default avatarMatthew McClintock <msm@freescale.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      0090e02b
    • Carl E. Love's avatar
      powerpc/oprofile: Fix marked events support on Power7+ not set. · adbf115d
      Carl E. Love authored
      Starting with Power 7+ we need to check for marked events if the SIAR
      register is valid, i.e. it contains the correct address of the instruction
      at the time the performance counter overflowed.  The mmcra register on
      Power 7+, contains a new bit to indicate that the contents of the SIAR
      is valid. If the event is not marked, then the sample is recorded
      independently of the SIAR valid bit setting.  For older processors, there
      is no SIAR valid bit to check so the samples are always recorded.  This is
      done by forcing the cntr_marked_events bit mask to zero.  The code will
      always record the sample in this case since the bit mask says the event is
      not a marked event even if it really is a marked event.
      Signed-off-by: default avatarCarl Love <cel@us.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      adbf115d
    • sukadev@linux.vnet.ibm.com's avatar
      powerpc: Define Power7+ PV constant PV_POWER7p · 22d8ce88
      sukadev@linux.vnet.ibm.com authored
      This definition will be used by subsequent perf and oprofile patches
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      22d8ce88
    • Anton Blanchard's avatar
      powerpc/pseries: Round up MSI-X requests · 752f5216
      Anton Blanchard authored
      The pseries firmware currently refuses any non power of two MSI-X
      request. Unfortunately most network drivers end up asking for that
      because they want a power of two for RX queues and one or two extra
      for everything else.
      
      This patch rounds up the firmware request to the next power of two
      if the quota allows it. If this fails we fall back to using the
      original request size.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      752f5216
    • Gavin Shan's avatar
      powerpc/pci: Save P2P bridge resource if possible · cf1a4cf8
      Gavin Shan authored
      When PCI probe flag PCI_REASSIGN_ALL_RSRC has been passed into PCI
      core, it's hoped that all resources to be reassigned by PCI core.
      As to particular P2P (PCI-to-PCI) bridge, the size of the corresponding
      BAR (I/O, MMIO, prefetchable MMIO) is calculated by the resources
      required by the PCI devices behind the P2P bridge. That means that
      the information like start/end address retrieved from the hardware
      registers of the P2P bridge is meainingless in the case. However,
      we still count that in and the BARs might have been configured by
      firmware with non-zero size. That leads to space waste.
      
      The patch explicitly sets the size of P2P bridge BARs to zero in
      case that resource reassignment is expected with PCI probe flag
      PCI_REASSIGN_ALL_RSRC. In the result, it will save overall resource
      required by the system without waste.
      Signed-off-by: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      cf1a4cf8
  2. 06 Sep, 2012 3 commits
  3. 05 Sep, 2012 30 commits