1. 27 10月, 2017 1 次提交
    • L
      alpha/PCI: Move pci_map_irq()/pci_swizzle() out of initdata · 814eae59
      Lorenzo Pieralisi 提交于
      The introduction of {map/swizzle}_irq() hooks in the struct pci_host_bridge
      allowed to replace the pci_fixup_irqs() PCI IRQ allocation in alpha arch
      PCI code with per-bridge map/swizzle functions with commit 0e4c2eeb
      ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping
      hooks").
      
      As a side effect of converting PCI IRQ allocation to the struct
      pci_host_bridge {map/swizzle}_irq() hooks mechanism, the actual PCI IRQ
      allocation function (ie pci_assign_irq()) is carried out per-device in
      pci_device_probe() that is called when a PCI device driver is about to be
      probed.
      
      This means that, for drivers compiled as loadable modules, the actual PCI
      device IRQ allocation can now happen after the system has booted so the
      struct pci_host_bridge {map/swizzle}_irq() hooks pci_assign_irq() relies on
      must stay valid after the system has booted so that PCI core can carry out
      PCI IRQ allocation correctly.
      
      Most of the alpha board structures pci_map_irq() and pci_swizzle() hooks
      (that are used to initialize their struct pci_host_bridge equivalent
      through the alpha_mv global variable - that represents the struct
      alpha_machine_vector of the running kernel) are marked as
      __init/__initdata; this causes freed memory dereferences when PCI IRQ
      allocation is carried out after the kernel has booted (ie when loading PCI
      drivers as loadable module) because when the kernel tries to bind the PCI
      device to its (module) driver, the function pci_assign_irq() is called,
      that in turn retrieves the struct pci_host_bridge {map/swizzle}_irq() hooks
      to carry out PCI IRQ allocation; if those hooks are marked as __init
      code/__initdata they point at freed/invalid memory.
      
      Fix the issue by removing the __init/__initdata markers from all subarch
      struct alpha_machine_vector.pci_map_irq()/pci_swizzle() functions (and
      data).
      
      Fixes: 0e4c2eeb ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks")
      Link: http://lkml.kernel.org/r/alpine.LRH.2.21.1710251043170.7098@math.ut.eeReported-by: NMeelis Roos <mroos@linux.ee>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Meelis Roos <mroos@linux.ee>
      Cc: Matt Turner <mattst88@gmail.com>
      814eae59
  2. 29 3月, 2012 1 次提交
  3. 22 7月, 2011 1 次提交
    • R
      PCI: Make the struct pci_dev * argument of pci_fixup_irqs const. · d5341942
      Ralf Baechle 提交于
      Aside of the usual motivation for constification,  this function has a
      history of being abused a hook for interrupt and other fixups so I turned
      this function const ages ago in the MIPS code but it should be done
      treewide.
      
      Due to function pointer passing in varous places a few other functions
      had to be constified as well.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      To: Anton Vorontsov <avorontsov@mvista.com>
      To: Chris Metcalf <cmetcalf@tilera.com>
      To: Colin Cross <ccross@android.com>
      Acked-by: N"David S. Miller" <davem@davemloft.net>
      To: Eric Miao <eric.y.miao@gmail.com>
      To: Erik Gilling <konkers@android.com>
      Acked-by: NGuan Xuetao <gxt@mprc.pku.edu.cn>
      To: "H. Peter Anvin" <hpa@zytor.com>
      To: Imre Kaloz <kaloz@openwrt.org>
      To: Ingo Molnar <mingo@redhat.com>
      To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      To: Jesse Barnes <jbarnes@virtuousgeek.org>
      To: Krzysztof Halasa <khc@pm.waw.pl>
      To: Lennert Buytenhek <kernel@wantstofly.org>
      To: Matt Turner <mattst88@gmail.com>
      To: Nicolas Pitre <nico@fluxnic.net>
      To: Olof Johansson <olof@lixom.net>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      To: Richard Henderson <rth@twiddle.net>
      To: Russell King <linux@arm.linux.org.uk>
      To: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-alpha@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Cc: linux-pci@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      Cc: linux-tegra@vger.kernel.org
      Cc: sparclinux@vger.kernel.org
      Cc: x86@kernel.org
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      d5341942
  4. 18 4月, 2007 1 次提交
  5. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4