1. 28 Jun, 2012 1 commit
  2. 27 Mar, 2012 1 commit
  3. 24 Nov, 2011 2 commits
  4. 31 Oct, 2011 1 commit
    • Paul Gortmaker's avatar
      powerpc: Fix up implicit sched.h users · 62fe91bb
      Paul Gortmaker authored
      They are getting it through device.h --> module.h path, but we want
      to clean that up.  This is a sample of what will happen if we don't:
        pseries/iommu.c: In function 'tce_build_pSeriesLP':
        pseries/iommu.c:136: error: implicit declaration of function 'show_stack'
        pseries/eeh.c: In function 'eeh_token_to_phys':
        pseries/eeh.c:359: error: 'init_mm' undeclared (first use in this function)
        pseries/eeh_event.c: In function 'eeh_event_handler':
        pseries/eeh_event.c:63: error: implicit declaration of function 'daemonize'
        pseries/eeh_event.c:64: error: implicit declaration of function 'set_current_state'
        pseries/eeh_event.c:64: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
        pseries/eeh_event.c:64: error: (Each undeclared identifier is reported only once
        pseries/eeh_event.c:64: error: for each function it appears in.)
        pseries/eeh_event.c: In function 'eeh_thread_launcher':
        pseries/eeh_event.c:109: error: 'CLONE_KERNEL' undeclared (first use in this function)
        hotplug-cpu.c: In function 'pseries_mach_cpu_die':
        hotplug-cpu.c:115: error: implicit declaration of function 'idle_task_exit'
        kernel/swsusp_64.c: In function 'do_after_copyback':
        kernel/swsusp_64.c:17: error: implicit declaration of function 'touch_softlockup_watchdog'
        cell/spufs/context.c: In function 'alloc_spu_context':
        cell/spufs/context.c:60: error: implicit declaration of function 'get_task_mm'
        cell/spufs/context.c:60: warning: assignment makes pointer from integer without a cast
        cell/spufs/context.c: In function 'spu_forget':
        cell/spufs/context.c:127: error: implicit declaration of function 'mmput'
        pasemi/dma_lib.c: In function 'pasemi_dma_stop_chan':
        pasemi/dma_lib.c:332: error: implicit declaration of function 'cond_resched'
        sysdev/fsl_lbc.c: In function 'fsl_lbc_ctrl_irq':
        sysdev/fsl_lbc.c:247: error: 'TASK_NORMAL' undeclared (first use in this function)
      Add in sched.h so these get the definitions they are looking for.
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
  5. 19 Sep, 2011 2 commits
  6. 01 Sep, 2011 1 commit
    • Milton Miller's avatar
      powerpc: Override dma_get_required_mask by platform hook and ops · 6a5c7be5
      Milton Miller authored
      The hook dma_get_required_mask is supposed to return the mask required
      by the platform to operate efficently.  The generic version of
      dma_get_required_mask in driver/base/platform.c returns a mask based
      only on max_pfn.  However, this is likely too big for iommu systems
      and could be too small for platforms that require a dma offset or have
      a secondary window at a high offset.
      Override the default, provide a hook in ppc_md used by pseries lpar and
      cell, and provide the default answer based on memblock_end_of_DRAM(),
      with hooks for get_dma_offset, and provide an implementation for iommu
      that looks at the defined table size.  Coverting from the end address
      to the required bit mask is based on the generic implementation.
      The need for this was discovered when the qla2xxx driver switched to
      64 bit dma then reverted to 32 bit when dma_get_required_mask said
      32 bits was sufficient.
      Signed-off-by: default avatarMilton Miller <miltonm@bga.com>
      Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-kernel@vger.kernel.org
      Cc: benh@kernel.crashing.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
  7. 19 May, 2011 5 commits
  8. 18 May, 2011 2 commits
    • Nishanth Aravamudan's avatar
      pseries/iommu: Restore iommu table pointer when restoring iommu ops · eb0dd411
      Nishanth Aravamudan authored
      When we swtich to direct dma ops, we set the dma data union to have the
      dma offset.  When we switch back to iommu table ops because of a later
      dma_set_mask, we need to restore the iommu table pointer. Without this
      change, crashes have been observed on kexec where (for reasons still
      being investigated) we fall back to a 32-bit dma mask on a particular
      device and then panic because the table pointer is not valid.
      The easiset way to find this value is to call
      pci_dma_dev_setup_pSeriesLP which will search up the pci tree until it
      finds the node with the table.
      Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
      Cc: Milton Miller <miltonm@bga.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Nishanth Aravamudan's avatar
      powerpc: Fix kexec with dynamic dma windows · 76730334
      Nishanth Aravamudan authored
      When we kexec we look for a particular property added by the first
      kernel, "linux,direct64-ddr-window-info", per-device where we already
      have set up dynamic dma windows. The current code, though, wasn't
      initializing the size of this property and thus when we kexec'd, we
      would find the property but read uninitialized memory resulting in
      garbage ddw values for the kexec'd kernel and panics. Fix this by
      setting the size at enable_ddw() time and ensuring that the size of the
      found property is valid at dupe_ddw_if_kexec() time.
      Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
  9. 31 Mar, 2011 1 commit
  10. 04 Mar, 2011 1 commit
  11. 08 Dec, 2010 4 commits
  12. 28 Nov, 2010 2 commits
  13. 23 Aug, 2010 1 commit
    • Anton Blanchard's avatar
      powerpc: Fix bogus it_blocksize in VIO iommu code · 7aa241fd
      Anton Blanchard authored
      When looking at some issues with the virtual ethernet driver I noticed
      that TCE allocation was following a very strange pattern:
      address 00e9000 length 2048
      address 0409000 length 2048 <-----
      address 0429000 length 2048
      address 0449000 length 2048
      address 0469000 length 2048
      address 0489000 length 2048
      address 04a9000 length 2048
      address 04c9000 length 2048
      address 04e9000 length 2048
      address 4009000 length 2048 <-----
      address 4029000 length 2048
      Huge unexplained gaps in what should be an empty TCE table. It turns out
      it_blocksize, the amount we want to align the next allocation to, was
      c0000000fe903b20. Completely bogus.
      Initialise it to something reasonable in the VIO IOMMU code, and use kzalloc
      everywhere to protect against this when we next add a non compulsary
      field to iommu code and forget to initialise it.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
  14. 14 Jul, 2010 1 commit
  15. 18 May, 2010 1 commit
    • Grant Likely's avatar
      of: eliminate of_device->node and dev_archdata->{of,prom}_node · 58f9b0b0
      Grant Likely authored
      This patch eliminates the node pointer from struct of_device and the
      of_node (or prom_node) pointer from struct dev_archdata since the node
      pointer is now part of struct device proper when CONFIG_OF is set, and
      all users of the old pointer locations have already been converted over
      to use device->of_node.
      Also remove dev_archdata_{get,set}_node() as it is no longer used by
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
  16. 23 Sep, 2009 1 commit
  17. 09 Jun, 2009 1 commit
  18. 12 Jan, 2009 1 commit
  19. 30 Oct, 2008 1 commit
  20. 21 Oct, 2008 1 commit
    • Mohan Kumar M's avatar
      powerpc: Support for relocatable kdump kernel · 54622f10
      Mohan Kumar M authored
      This adds relocatable kernel support for kdump. With this one can
      use the same regular kernel to capture the kdump. A signature (0xfeed1234)
      is passed in r6 from panic code to the next kernel through kexec_sequence
      and purgatory code. The signature is used to differentiate between
      kdump kernel and non-kdump kernels.
      The purgatory code compares the signature and sets the __kdump_flag in
      head_64.S.  During the boot up, kernel code checks __kdump_flag and if it
      is set, the kernel will behave as relocatable kdump kernel. This kernel
      will boot at the address where it was loaded by kexec-tools ie. at the
      address reserved through crashkernel boot parameter.
      CONFIG_CRASH_DUMP depends on CONFIG_RELOCATABLE option to build kdump
      kernel as relocatable. So the same kernel can be used as production and
      kdump kernel.
      This patch incorporates the changes suggested by Paul Mackerras to avoid
      GOT use and to avoid two copies of the code.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarMohan Kumar M <mohan@in.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
  21. 24 Jul, 2008 1 commit
    • Robert Jennings's avatar
      powerpc/pseries: iommu enablement for CMO · 6490c490
      Robert Jennings authored
      To support Cooperative Memory Overcommitment (CMO), we need to check
      for failure from some of the tce hcalls.
      These changes for the pseries platform affect the powerpc architecture;
      patches for the other affected platforms are included in this patch.
      pSeries platform IOMMU code changes:
       * platform TCE functions must handle H_NOT_ENOUGH_RESOURCES errors and
         return an error.
      Architecture IOMMU code changes:
       * Calls to ppc_md.tce_build need to check return values and return
         DMA_MAPPING_ERROR for transient errors.
      Architecture changes:
       * struct machdep_calls for tce_build*_pSeriesLP functions need to change
         to indicate failure.
       * all other platforms will need updates to iommu functions to match the new
         calling semantics; they will return 0 on success.  The other platforms
         default configs have been built, but no further testing was performed.
      Signed-off-by: default avatarRobert Jennings <rcj@linux.vnet.ibm.com>
      Acked-by: default avatarOlof Johansson <olof@lixom.net>
      Acked-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
  22. 21 Jul, 2008 1 commit
  23. 14 May, 2008 1 commit
  24. 24 Apr, 2008 1 commit
  25. 10 Dec, 2007 3 commits
  26. 10 May, 2007 1 commit
  27. 02 May, 2007 1 commit
    • Linas Vepstas's avatar
      [POWERPC] pseries: Handle null iommu dma-window property correctly · 650f7b3b
      Linas Vepstas authored
      Some versions of pSeries firmware fail to set up a
      dma-window property for PCI slots that are unoccupied.
      As a result, the loop searching for this propery, in
      pci_dma_dev_setup_pSeriesLP(), can run to the end, resulting
      in a NULL pointer dereference later in the routine. This
      patch prevents the crash, and prints a warning message.
      This is theoretically a rare error, as it occurs on what
      is hopefully just beta levels of firmware. But just in case
      this firmware escapes into the wild, this patch will avoid
      the crash.
      Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>