1. 12 7月, 2011 1 次提交
  2. 05 2月, 2011 1 次提交
    • G
      powerpc/pci: Make both ppc32 and ppc64 use sysdata for pci_controller · b5d937de
      Grant Likely 提交于
      Currently, ppc32 uses sysdata for the pci_controller pointer, and
      ppc64 uses it to hold the device_node pointer.  This patch moves the
      of_node pointer into (struct pci_bus*)->dev.of_node and
      (struct pci_dev*)->dev.of_node so that sysdata can be converted to always
      use the pci_controller pointer instead.  It also fixes up the
      allocating of pci devices so that the of_node pointer gets assigned
      consistently and increments the ref count.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      b5d937de
  3. 09 12月, 2010 1 次提交
  4. 09 2月, 2010 1 次提交
  5. 27 10月, 2009 1 次提交
    • K
      powerpc: Fix compile errors found by new ppc64e_defconfig · ce7a35c7
      Kumar Gala 提交于
      Fix the following 3 issues:
      
      arch/powerpc/kernel/process.c: In function 'arch_randomize_brk':
      arch/powerpc/kernel/process.c:1183: error: 'mmu_highuser_ssize' undeclared (first use in this function)
      arch/powerpc/kernel/process.c:1183: error: (Each undeclared identifier is reported only once
      arch/powerpc/kernel/process.c:1183: error: for each function it appears in.)
      arch/powerpc/kernel/process.c:1183: error: 'MMU_SEGSIZE_1T' undeclared (first use in this function)
      
      In file included from arch/powerpc/kernel/setup_64.c:60:
      arch/powerpc/include/asm/mmu-hash64.h:132: error: redefinition of 'struct mmu_psize_def'
      arch/powerpc/include/asm/mmu-hash64.h:159: error: expected identifier or '(' before numeric constant
      arch/powerpc/include/asm/mmu-hash64.h:396: error: conflicting types for 'mm_context_t'
      arch/powerpc/include/asm/mmu-book3e.h:184: error: previous declaration of 'mm_context_t' was here
      
      cc1: warnings being treated as errors
      arch/powerpc/kernel/pci_64.c: In function 'pcibios_unmap_io_space':
      arch/powerpc/kernel/pci_64.c:100: error: unused variable 'res'
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ce7a35c7
  6. 10 9月, 2009 1 次提交
  7. 02 9月, 2009 1 次提交
  8. 28 8月, 2009 1 次提交
  9. 09 6月, 2009 2 次提交
  10. 21 5月, 2009 1 次提交
  11. 15 5月, 2009 1 次提交
    • B
      powerpc: Fix PCI ROM access · ad892a63
      Benjamin Herrenschmidt 提交于
      A couple of issues crept in since about 2.6.27 related to accessing PCI
      device ROMs on various powerpc machines.
      
      First, historically, we don't allocate the ROM resource in the resource
      tree. I'm not entirely certain of why, I susepct they often contained
      garbage on x86 but it's hard to tell. This causes the current generic
      code to always call pci_assign_resource() when trying to access the said
      ROM from sysfs, which will try to re-assign some new address regardless
      of what the ROM BAR was already set to at boot time. This can be a
      problem on hypervisor platforms like pSeries where we aren't supposed
      to move PCI devices around (and in fact probably can't).
      
      Second, our code that generates the PCI tree from the OF device-tree
      (instead of doing config space probing) which we mostly use on pseries
      at the moment, didn't set the (new) flag IORESOURCE_SIZEALIGN on any
      resource. That means that any attempt at re-assigning such a resource
      with pci_assign_resource() would fail due to resource_alignment()
      returning 0.
      
      This fixes this by doing these two things:
      
       - The code that calculates resource flags based on the OF device-node
      is improved to set IORESOURCE_SIZEALIGN on any valid BAR, and while at
      it also set IORESOURCE_READONLY for ROMs since we were lacking that too
      
       - We now allocate ROM resources as part of the resource tree. However
      to limit the chances of nasty conflicts due to busted firmwares, we
      only do it on the second pass of our two-passes allocation scheme,
      so that all valid and enabled BARs get precedence.
      
      This brings pSeries back the ability to access PCI ROMs via sysfs (and
      thus initialize various video cards from X etc...).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ad892a63
  12. 11 2月, 2009 1 次提交
  13. 13 1月, 2009 1 次提交
  14. 08 1月, 2009 1 次提交
    • P
      powerpc: Fix pciconfig_iobase system call on PCI-Express powermac · 16124f10
      Paul Mackerras 提交于
      X has been failing to start on my quad G5 powermac since commit
      1fd0f525 ("powerpc: Fix domain numbers
      in /proc on 64-bit") went in.  The reason is that the change allows X
      to see the PCI-PCI bridge above the video card (previously it was
      obscured by the fact that there were two "00" directories in
      /proc/bus/pci), and the pciconfig_iobase system call on the bridge is
      failing because of a hack that we have to return information about the
      AGP bus when X asks about bus 0.  This machine doesn't have an AGP bus
      (it has PCI Express) and so the pciconfig_iobase call is returning -1,
      which ultimately causes X to fail to start.
      
      This fixes it by checking that we have an AGP bridge before
      redirecting the pciconfig_iobase call to return information about the
      AGP bus.  With this, X starts successfully both on a quad G5 with
      PCI Express and on an older dual G5 with AGP.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      16124f10
  15. 06 11月, 2008 1 次提交
    • B
      powerpc/pci: Split pcibios_fixup_bus() into bus setup and device setup · 8b8da358
      Benjamin Herrenschmidt 提交于
      Currently, our PCI code uses the pcibios_fixup_bus() callback, which
      is called by the generic code when probing PCI buses, for two
      different things.
      
      One is to set up things related to the bus itself, such as reading
      bridge resources for P2P bridges, fixing them up, or setting up the
      iommu's associated with bridges on some platforms.
      
      The other is some setup for each individual device under that bridge,
      mostly setting up DMA mappings and interrupts.
      
      The problem is that this approach doesn't work well with PCI hotplug
      when an existing bus is re-probed for new children.  We fix this
      problem by splitting pcibios_fixup_bus into two routines:
      
      	pcibios_setup_bus_self() is now called to setup the bus itself
      
      	pcibios_setup_bus_devices() is now called to setup devices
      
      pcibios_fixup_bus() is then modified to call these two after reading the
      bridge bases, and the OF based PCI probe is modified to avoid calling
      into the first one when rescanning an existing bridge.
      
      [paulus@samba.org - fixed eeh.h for 32-bit compile now that pci-common.c
      is including it unconditionally.]
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8b8da358
  16. 05 11月, 2008 4 次提交
  17. 31 10月, 2008 1 次提交
  18. 25 9月, 2008 2 次提交
    • B
      powerpc: Merge 32 and 64-bit dma code · 4fc665b8
      Becky Bruce 提交于
      We essentially adopt the 64-bit dma code, with some changes to support
      32-bit systems, including HIGHMEM.  dma functions on 32-bit are now
      invoked via accessor functions which call the correct op for a device based
      on archdata dma_ops.  If there is no archdata dma_ops, this defaults
      to dma_direct_ops.
      
      In addition, the dma_map/unmap_page functions are added to dma_ops
      because we can't just fall back on map/unmap_single when HIGHMEM is
      enabled. In the case of dma_direct_*, we stop using map/unmap_single
      and just use the page version - this saves a lot of ugly
      ifdeffing.  We leave map/unmap_single in the dma_ops definition,
      though, because they are needed by the iommu code, which does not
      implement map/unmap_page.  Ideally, going forward, we will completely
      eliminate map/unmap_single and just have map/unmap_page, if it's
      workable for 64-bit.
      Signed-off-by: NBecky Bruce <becky.bruce@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      4fc665b8
    • B
      powerpc: Drop archdata numa_node · 8fae0353
      Becky Bruce 提交于
      Use the struct device's numa_node instead; use accessor functions
      to get/set numa_node.
      Signed-off-by: NBecky Bruce <becky.bruce@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      8fae0353
  19. 09 6月, 2008 1 次提交
    • S
      [POWERPC] Use dev_set_name in pci_64.c · 420b5eea
      Stephen Rothwell 提交于
      During the next merge window, pci_name()'s return value will become
      const, so use the new dev_set_name() instead to avoid the warning (from
      linux-next):
      
      arch/powerpc/kernel/pci_64.c: In function 'of_create_pci_dev':
      arch/powerpc/kernel/pci_64.c:193: warning: passing argument 1 of 'sprintf' discards qualifiers from pointer target type
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      420b5eea
  20. 25 1月, 2008 1 次提交
  21. 17 1月, 2008 1 次提交
  22. 20 12月, 2007 8 次提交
  23. 11 12月, 2007 5 次提交
  24. 03 10月, 2007 1 次提交