1. 23 8月, 2017 1 次提交
  2. 30 6月, 2016 1 次提交
  3. 14 6月, 2016 1 次提交
  4. 11 5月, 2016 1 次提交
  5. 01 5月, 2016 1 次提交
  6. 24 11月, 2014 1 次提交
  7. 10 11月, 2014 1 次提交
  8. 15 4月, 2014 2 次提交
    • M
      powerpc/PCI: Fix NULL dereference in sys_pciconfig_iobase() list traversal · 140ab645
      Mike Qiu 提交于
      3bc95598 ("powerpc/PCI: Use list_for_each_entry() for bus traversal")
      caused a NULL pointer dereference because the loop body set the iterator to
      NULL:
      
        Unable to handle kernel paging request for data at address 0x00000000
        Faulting instruction address: 0xc000000000041d78
        Oops: Kernel access of bad area, sig: 11 [#1]
        ...
        NIP [c000000000041d78] .sys_pciconfig_iobase+0x68/0x1f0
        LR [c000000000041e0c] .sys_pciconfig_iobase+0xfc/0x1f0
        Call Trace:
        [c0000003b4787db0] [c000000000041e0c] .sys_pciconfig_iobase+0xfc/0x1f0 (unreliable)
        [c0000003b4787e30] [c000000000009ed8] syscall_exit+0x0/0x98
      
      Fix it by using a temporary variable for the iterator.
      
      [bhelgaas: changelog, drop tmp_bus initialization]
      Fixes: 3bc95598 powerpc/PCI: Use list_for_each_entry() for bus traversal
      Signed-off-by: NMike Qiu <qiudayu@linux.vnet.ibm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      140ab645
    • M
      powerpc/PCI: Fix NULL dereference in sys_pciconfig_iobase() list traversal · ff0c41b2
      Mike Qiu 提交于
      3bc95598 ("powerpc/PCI: Use list_for_each_entry() for bus traversal")
      caused a NULL pointer dereference because the loop body set the iterator to
      NULL:
      
        Unable to handle kernel paging request for data at address 0x00000000
        Faulting instruction address: 0xc000000000041d78
        Oops: Kernel access of bad area, sig: 11 [#1]
        ...
        NIP [c000000000041d78] .sys_pciconfig_iobase+0x68/0x1f0
        LR [c000000000041e0c] .sys_pciconfig_iobase+0xfc/0x1f0
        Call Trace:
        [c0000003b4787db0] [c000000000041e0c] .sys_pciconfig_iobase+0xfc/0x1f0 (unreliable)
        [c0000003b4787e30] [c000000000009ed8] syscall_exit+0x0/0x98
      
      Fix it by using a temporary variable for the iterator.
      
      [bhelgaas: changelog, drop tmp_bus initialization]
      Fixes: 3bc95598 powerpc/PCI: Use list_for_each_entry() for bus traversal
      Signed-off-by: NMike Qiu <qiudayu@linux.vnet.ibm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      ff0c41b2
  9. 15 2月, 2014 1 次提交
  10. 14 8月, 2013 2 次提交
  11. 24 5月, 2013 1 次提交
  12. 06 5月, 2013 1 次提交
    • B
      powerpc/pci: Support per-aperture memory offset · 3fd47f06
      Benjamin Herrenschmidt 提交于
      The PCI core supports an offset per aperture nowadays but our arch
      code still has a single offset per host bridge representing the
      difference betwen CPU memory addresses and PCI MMIO addresses.
      
      This is a problem as new machines and hypervisor versions are
      coming out where the 64-bit windows will have a different offset
      (basically mapped 1:1) from the 32-bit windows.
      
      This fixes it by using separate offsets. In the long run, we probably
      want to get rid of that intermediary struct pci_controller and have
      those directly stored into the pci_host_bridge as they are parsed
      but this will be a more invasive change.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3fd47f06
  13. 04 1月, 2013 1 次提交
    • G
      POWERPC: drivers: remove __dev* attributes. · cad5cef6
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cad5cef6
  14. 29 11月, 2012 1 次提交
  15. 14 6月, 2012 1 次提交
  16. 21 3月, 2012 1 次提交
  17. 24 2月, 2012 2 次提交
  18. 07 1月, 2012 1 次提交
  19. 01 11月, 2011 1 次提交
  20. 12 7月, 2011 1 次提交
  21. 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
  22. 09 12月, 2010 1 次提交
  23. 09 2月, 2010 1 次提交
  24. 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
  25. 10 9月, 2009 1 次提交
  26. 02 9月, 2009 1 次提交
  27. 28 8月, 2009 1 次提交
  28. 09 6月, 2009 2 次提交
  29. 21 5月, 2009 1 次提交
  30. 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
  31. 11 2月, 2009 1 次提交
  32. 13 1月, 2009 1 次提交
  33. 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
  34. 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
  35. 05 11月, 2008 2 次提交