20 Apr, 2017
2 commits
-
This was setting vma->vm_flags |= VM_LOCKED. Not sure why...
Signed-off-by: David Woodhouse
Signed-off-by: Bjorn Helgaas
Reviewed-by: David Howells -
In all cases we know which BAR it is. Passing it in means that arch code
(or generic code; watch this space) won't have to go looking for it again.Signed-off-by: David Woodhouse
Signed-off-by: Bjorn Helgaas
16 Sep, 2015
1 commit
-
Revert dff22d2054b5 ("PCI: Call pci_read_bridge_bases() from core instead
of arch code").Reading PCI bridge windows is not arch-specific in itself, but there is PCI
core code that doesn't work correctly if we read them too early. For
example, Hannes found this case on an ARM Freescale i.mx6 board:pci_bus 0000:00: root bus resource [mem 0x01000000-0x01efffff]
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
pci 0000:00:00.0: BAR 8: no space for [mem size 0x01000000] (mem window)
pci 0000:01:00.0: BAR 2: failed to assign [mem size 0x00200000]
pci 0000:01:00.0: BAR 1: failed to assign [mem size 0x00004000]
pci 0000:01:00.0: BAR 0: failed to assign [mem size 0x00000100]The 00:00.0 mem window needs to be at least 3MB: the 01:00.0 device needs
0x204100 of space, and mem windows are megabyte-aligned.Bus sizing can increase a bridge window size, but never *decrease* it (see
d65245c3297a ("PCI: don't shrink bridge resources")). Prior to
dff22d2054b5, ARM didn't read bridge windows at all, so the "original size"
was zero, and we assigned a 3MB window.After dff22d2054b5, we read the bridge windows before sizing the bus. The
firmware programmed a 16MB window (size 0x01000000) in 00:00.0, and since
we never decrease the size, we kept 16MB even though we only needed 3MB.
But 16MB doesn't fit in the host bridge aperture, so we failed to assign
space for the window and the downstream devices.I think this is a defect in the PCI core: we shouldn't rely on the firmware
to assign sensible windows.Ray reported a similar problem, also on ARM, with Broadcom iProc.
Issues like this are too hard to fix right now, so revert dff22d2054b5.
Reported-by: Hannes
Reported-by: Ray Jui
Link: http://lkml.kernel.org/r/CAAa04yFQEUJm7Jj1qMT57-LG7ZGtnhNDBe=PpSRa70Mj+XhW-A@mail.gmail.com
Link: http://lkml.kernel.org/r/55F75BB8.4070405@broadcom.com
Signed-off-by: Bjorn Helgaas
Acked-by: Yinghai Lu
Acked-by: Lorenzo Pieralisi
05 Aug, 2015
1 commit
-
* pci/irq:
PCI/MSI: Free legacy IRQ when enabling MSI/MSI-X
PCI: Add helpers to manage pci_dev->irq and pci_dev->irq_managed
PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()
PCI: Add pcibios_alloc_irq() and pcibios_free_irq()* pci/misc:
PCI: Remove unused "pci_probe" flags
PCI: Add VPD function 0 quirk for Intel Ethernet devices
PCI: Add dev_flags bit to access VPD through function 0
PCI / ACPI: Fix pci_acpi_optimize_delay() comment
PCI: Remove a broken link in quirks.c
PCI: Remove useless redundant code
PCI: Simplify pci_find_(ext_)capability() return value checks
PCI: Move PCI_FIND_CAP_TTL to pci.h and use it in quirks
PCI: Add pcie_downstream_port() (true for Root and Switch Downstream Ports)
PCI: Fix pcie_port_device_resume() comment
PCI: Shift PCI_CLASS_NOT_DEFINED consistently with other classes
PCI: Revert aeb30016fec3 ("PCI: add Intel USB specific reset method")
PCI: Fix TI816X class code quirk
PCI: Fix generic NCR 53c810 class code quirk
PCI: Use PCI_CLASS_SERIAL_USB instead of bare number
PCI: Add quirk for Intersil/Techwell TW686[4589] AV capture cards
PCI: Remove Intel Cherrytrail D3 delays* pci/resource:
PCI: Call pci_read_bridge_bases() from core instead of arch code* pci/virtualization:
PCI: Restore ACS configuration as part of pci_restore_state()
28 Jul, 2015
1 commit
-
The following flags are only used on x86, but they got copied to FR-V,
MN10300, and SuperH:PCI_PROBE_BIOS
PCI_PROBE_CONF1
PCI_PROBE_CONF2
PCI_ASSIGN_ROMS
PCI_NO_CHECKS
PCI_BIOS_IRQ_SCAN
PCI_ASSIGN_ALL_BUSSESFR-V and MN10300 do test for PCI_ASSIGN_ROMS, but they never set it, so
it's dead code.Remove the unused flags above.
Signed-off-by: Bjorn Helgaas
23 Jul, 2015
1 commit
-
When we scan a PCI bus, we read PCI-PCI bridge window registers with
pci_read_bridge_bases() so we can validate the resource hierarchy. Most
architectures call pci_read_bridge_bases() from pcibios_fixup_bus(), but
PCI-PCI bridges are not arch-specific, so this doesn't need to be in
arch-specific code.Call pci_read_bridge_bases() directly from the PCI core instead of from
arch code.For alpha and mips, we now call pci_read_bridge_bases() always; previously
we only called it if PCI_PROBE_ONLY was set.[bhelgaas: changelog]
Signed-off-by: Lorenzo Pieralisi
Signed-off-by: Bjorn Helgaas
CC: Ralf Baechle
CC: James E.J. Bottomley
CC: Michael Ellerman
CC: Bjorn Helgaas
CC: Richard Henderson
CC: Benjamin Herrenschmidt
CC: David Howells
CC: Russell King
CC: Tony Luck
CC: David S. Miller
CC: Ingo Molnar
CC: Guenter Roeck
CC: Michal Simek
CC: Chris Zankel
19 Mar, 2015
1 commit
-
Previously, pci_scan_root_bus() created a root PCI bus, enumerated the
devices on it, and called pci_bus_add_devices(), which made the devices
available for drivers to claim them.Most callers assigned resources to devices after pci_scan_root_bus()
returns, which may be after drivers have claimed the devices. This is
incorrect; the PCI core should not change device resources while a driver
is managing the device.Remove pci_bus_add_devices() from pci_scan_root_bus() and do it after any
resource assignment in the callers.Note that ARM's pci_common_init_dev() already called pci_bus_add_devices()
after pci_scan_root_bus(), so we only need to remove the first call:pci_common_init_dev
pcibios_init_hw
pci_scan_root_bus
pci_bus_add_devices # first call
pci_bus_assign_resources
pci_bus_add_devices # second call[bhelgaas: changelog, drop "root_bus" var in alpha common_init_pci(),
return failure earlier in mn10300, add "return" in x86 pcibios_scan_root(),
return early if xtensa platform_pcibios_fixup() fails]
Signed-off-by: Yijing Wang
Signed-off-by: Bjorn Helgaas
CC: Richard Henderson
CC: Ivan Kokshaysky
CC: Matt Turner
CC: David Howells
CC: Tony Luck
CC: Michal Simek
CC: Ralf Baechle
CC: Koichi Yasutake
CC: Sebastian Ott
CC: "David S. Miller"
CC: Chris Metcalf
CC: Chris Zankel
CC: Max Filippov
CC: Thomas Gleixner
19 Feb, 2015
1 commit
-
Pull virtio updates from Rusty Russell:
"OK, this has the big virtio 1.0 implementation, as specified by OASIS.On top of tht is the major rework of lguest, to use PCI and virtio
1.0, to double-check the implementation.Then comes the inevitable fixes and cleanups from that work"
* tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (80 commits)
virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice.
virtio_net: unconditionally define struct virtio_net_hdr_v1.
tools/lguest: don't use legacy definitions for net device in example launcher.
virtio: Don't expose legacy net features when VIRTIO_NET_NO_LEGACY defined.
tools/lguest: use common error macros in the example launcher.
tools/lguest: give virtqueues names for better error messages
tools/lguest: more documentation and checking of virtio 1.0 compliance.
lguest: don't look in console features to find emerg_wr.
tools/lguest: don't start devices until DRIVER_OK status set.
tools/lguest: handle indirect partway through chain.
tools/lguest: insert driver references from the 1.0 spec (4.1 Virtio Over PCI)
tools/lguest: insert device references from the 1.0 spec (4.1 Virtio Over PCI)
tools/lguest: rename virtio_pci_cfg_cap field to match spec.
tools/lguest: fix features_accepted logic in example launcher.
tools/lguest: handle device reset correctly in example launcher.
virtual: Documentation: simplify and generalize paravirt_ops.txt
lguest: remove NOTIFY call and eventfd facility.
lguest: remove NOTIFY facility from demonstration launcher.
lguest: use the PCI console device's emerg_wr for early boot messages.
lguest: always put console in PCI slot #1.
...
11 Feb, 2015
1 commit
-
Pull PCI changes from Bjorn Helgaas:
"Enumeration
- Move domain assignment from arm64 to generic code (Lorenzo Pieralisi)
- ARM: Remove artificial dependency on pci_sys_data domain (Lorenzo Pieralisi)
- ARM: Move to generic PCI domains (Lorenzo Pieralisi)
- Generate uppercase hex for modalias var in uevent (Ricardo Ribalda Delgado)
- Add and use generic config accessors on ARM, PowerPC (Rob Herring)Resource management
- Free resources on failure in of_pci_get_host_bridge_resources() (Lorenzo Pieralisi)
- Fix infinite loop with ROM image of size 0 (Michel Dänzer)PCI device hotplug
- Handle surprise add even if surprise removal isn't supported (Bjorn Helgaas)Virtualization
- Mark AMD/ATI VGA devices that don't reset on D3hot->D0 transition (Alex Williamson)
- Add DMA alias quirk for Adaptec 3405 (Alex Williamson)
- Add Wellsburg (X99) to Intel PCH root port ACS quirk (Alex Williamson)
- Add ACS quirk for Emulex NICs (Vasundhara Volam)MSI
- Fail MSI-X mappings if there's no space assigned to MSI-X BAR (Yijing Wang)Freescale Layerscape host bridge driver
- Fix platform_no_drv_owner.cocci warnings (Julia Lawall)NVIDIA Tegra host bridge driver
- Remove unnecessary tegra_pcie_fixup_bridge() (Lucas Stach)Renesas R-Car host bridge driver
- Fix error handling of irq_of_parse_and_map() (Dmitry Torokhov)TI Keystone host bridge driver
- Fix error handling of irq_of_parse_and_map() (Dmitry Torokhov)
- Fix misspelling of current function in debug output (Julia Lawall)Xilinx AXI host bridge driver
- Fix harmless format string warning (Arnd Bergmann)Miscellaneous
- Use standard parsing functions for ASPM sysfs setters (Chris J Arges)
- Add pci_device_to_OF_node() stub for !CONFIG_OF (Kevin Hao)
- Delete unnecessary NULL pointer checks (Markus Elfring)
- Add and use defines for PCIe Max_Read_Request_Size (Rafał Miłecki)
- Include clk.h instead of clk-private.h (Stephen Boyd)"* tag 'pci-v3.20-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (48 commits)
PCI: Add pci_device_to_OF_node() stub for !CONFIG_OF
PCI: xilinx: Convert to use generic config accessors
PCI: xgene: Convert to use generic config accessors
PCI: tegra: Convert to use generic config accessors
PCI: rcar: Convert to use generic config accessors
PCI: generic: Convert to use generic config accessors
powerpc/powermac: Convert PCI to use generic config accessors
powerpc/fsl_pci: Convert PCI to use generic config accessors
ARM: ks8695: Convert PCI to use generic config accessors
ARM: sa1100: Convert PCI to use generic config accessors
ARM: integrator: Convert PCI to use generic config accessors
PCI: versatile: Add DT-based ARM Versatile PB PCIe host driver
ARM: dts: versatile: add PCI controller binding
of/pci: Free resources on failure in of_pci_get_host_bridge_resources()
PCI: versatile: Add DT docs for ARM Versatile PB PCIe driver
PCI: Fail MSI-X mappings if there's no space assigned to MSI-X BAR
r8169: use PCI define for Max_Read_Request_Size
[SCSI] esas2r: use PCI define for Max_Read_Request_Size
tile: use PCI define for Max_Read_Request_Size
rapidio/tsi721: use PCI define for Max_Read_Request_Size
...
23 Jan, 2015
1 commit
-
Some instances of pci_ops initialization rely on the read/write members'
location in the struct. This is fragile and may break when adding new
members to the beginning of the struct.No functional change.
Signed-off-by: Rob Herring
Signed-off-by: Bjorn Helgaas
CC: David Howells
CC: Koichi Yasutake
CC: linux-am33-list@redhat.com
21 Jan, 2015
1 commit
-
pci-iomap.c was (apparently, mistakenly) reintroduced as part of
commit 83c2dc15ce824450e7044b9f90cd529c25747ae0
MN10300: Handle cacheable PCI regions in pci_iomap()
probably as side-effect of forward-porting the patch
from an old kernel.It's not really needed: the generic pci_iomap does the right thing here.
The new file isn't compiled so it's safe to drop.
Cc: Bjorn Helgaas
Cc: linux-pci@vger.kernel.org
Cc: trivial@kernel.org
Cc: David Howells
Signed-off-by: Michael S. Tsirkin
Signed-off-by: Rusty Russell
17 Jan, 2015
1 commit
-
Every PCI-PCI bridge window should fit inside an upstream bridge window
because orphaned address space is unreachable from the primary side of the
upstream bridge. If we inherit invalid bridge windows that overlap an
upstream window from firmware, clip them to fit and update the bridge
accordingly.[bhelgaas: changelog]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
Reported-by: Marek Kordik
Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
Signed-off-by: Yinghai Lu
Signed-off-by: Bjorn Helgaas
CC: David Howells
CC: Koichi Yasutake
CC: linux-am33-list@redhat.com
28 May, 2014
1 commit
-
pcibios_penalize_isa_irq() is only implemented by x86 now, and legacy ISA
is not used by some architectures. Make pcibios_penalize_isa_irq() a
__weak function to simplify the code. This removes the need for new
platforms to add stub implementations of pcibios_penalize_isa_irq().[bhelgaas: changelog, comments]
Signed-off-by: Hanjun Guo
Signed-off-by: Bjorn Helgaas
Acked-by: Arnd Bergmann
30 Oct, 2013
1 commit
-
pcibios_last_bus was apparently copied from x86. On mn10300, it is
statically initialized to -1 and may be set with the "pci=lastbus="
boot option, but it is never tested. This patch removes everything
related to pcibios_last_bus.Signed-off-by: Bjorn Helgaas
29 Jun, 2013
1 commit
-
io_remap_pfn_range() sets it
Signed-off-by: Al Viro
30 May, 2013
1 commit
-
The code for PCI in the ASB2305 needs the definition of XIRQ1 from proc/irq.h
otherwise the following error appears:arch/mn10300/unit-asb2305/pci.c: In function 'unit_pci_init':
arch/mn10300/unit-asb2305/pci.c:481: error: 'XIRQ1' undeclared (first use in this function)
arch/mn10300/unit-asb2305/pci.c:481: error: (Each undeclared identifier is reported only once
arch/mn10300/unit-asb2305/pci.c:481: error: for each function it appears in.)Signed-off-by: David Howells
Acked-by: Ken Cox
Signed-off-by: Linus Torvalds
26 Feb, 2013
1 commit
-
Pull PCI changes from Bjorn Helgaas:
"Host bridge hotplug
- Major overhaul of ACPI host bridge add/start (Rafael Wysocki, Yinghai Lu)
- Major overhaul of PCI/ACPI binding (Rafael Wysocki, Yinghai Lu)
- Split out ACPI host bridge and ACPI PCI device hotplug (Yinghai Lu)
- Stop caching _PRT and make independent of bus numbers (Yinghai Lu)PCI device hotplug
- Clean up cpqphp dead code (Sasha Levin)
- Disable ARI unless device and upstream bridge support it (Yijing Wang)
- Initialize all hot-added devices (not functions 0-7) (Yijing Wang)Power management
- Don't touch ASPM if disabled (Joe Lawrence)
- Fix ASPM link state management (Myron Stowe)Miscellaneous
- Fix PCI_EXP_FLAGS accessor (Alex Williamson)
- Disable Bus Master in pci_device_shutdown (Konstantin Khlebnikov)
- Document hotplug resource and MPS parameters (Yijing Wang)
- Add accessor for PCIe capabilities (Myron Stowe)
- Drop pciehp suspend/resume messages (Paul Bolle)
- Make pci_slot built-in only (not a module) (Jiang Liu)
- Remove unused PCI/ACPI bind ops (Jiang Liu)
- Removed used pci_root_bus (Bjorn Helgaas)"* tag 'pci-v3.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (51 commits)
PCI/ACPI: Don't cache _PRT, and don't associate them with bus numbers
PCI: Fix PCI Express Capability accessors for PCI_EXP_FLAGS
ACPI / PCI: Make pci_slot built-in only, not a module
PCI/PM: Clear state_saved during suspend
PCI: Use atomic_inc_return() rather than atomic_add_return()
PCI: Catch attempts to disable already-disabled devices
PCI: Disable Bus Master unconditionally in pci_device_shutdown()
PCI: acpiphp: Remove dead code for PCI host bridge hotplug
PCI: acpiphp: Create companion ACPI devices before creating PCI devices
PCI: Remove unused "rc" in virtfn_add_bus()
PCI: pciehp: Drop suspend/resume ENTRY messages
PCI/ASPM: Don't touch ASPM if forcibly disabled
PCI/ASPM: Deallocate upstream link state even if device is not PCIe
PCI: Document MPS parameters pci=pcie_bus_safe, pci=pcie_bus_perf, etc
PCI: Document hpiosize= and hpmemsize= resource reservation parameters
PCI: Use PCI Express Capability accessor
PCI: Introduce accessor to retrieve PCIe Capabilities Register
PCI: Put pci_dev in device tree as early as possible
PCI: Skip attaching driver in device_add()
PCI: acpiphp: Keep driver loaded even if no slots found
...
22 Feb, 2013
1 commit
-
Signed-off-by: Wei Yongjun
Cc: David Howells
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
05 Jan, 2013
1 commit
-
pci_root_bus is unused, so remove all references to it.
Signed-off-by: Bjorn Helgaas
04 Jan, 2013
1 commit
-
This fixes up all of the smaller arches that had __dev* markings for
their platform-specific drivers.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
Cc: Peter Zijlstra
Cc: Paul Mackerras
Cc: Ingo Molnar
Cc: Arnaldo Carvalho de Melo
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Haavard Skinnemoen
Cc: Hans-Christian Egtvedt
Cc: Mike Frysinger
Cc: Mikael Starvik
Cc: Jesper Nilsson
Cc: David Howells
Cc: Hirokazu Takata
Cc: Geert Uytterhoeven
Cc: Michal Simek
Cc: Koichi Yasutake
Cc: Jonas Bonn
Cc: "James E.J. Bottomley"
Cc: Helge Deller
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Cc: Chen Liqin
Cc: Lennox Wu
Cc: Paul Mundt
Cc: Chris Metcalf
Cc: Guan Xuetao
Cc: Bob Liu
Cc: Srinivas Kandagatla
Cc: Bjorn Helgaas
Cc: Myron Stowe
Cc: Thomas Gleixner
Cc: Andrew Morton
Cc: Andi Kleen
Cc: Jesse Barnes
Cc: Sebastian Andrzej Siewior
Cc: Yinghai Lu
Cc: Thierry Reding
Cc: Greg Ungerer
Cc: Grant Likely
Cc: "Srivatsa S. Bhat"
Cc: Mark Salter
Cc: Yong Zhang
Cc: Michael Holzheu
Cc: Cornelia Huck
Cc: Jan Glauber
Cc: Wei Yongjun
Cc: Nobuhiro Iwamatsu
Signed-off-by: Greg Kroah-Hartman
12 Dec, 2012
3 commits
-
Get rid of an unused variable in pcibios_fixup_device_resources() which leads
to the following warning:arch/mn10300/unit-asb2305/pci.c: In function 'pcibios_fixup_device_resources':
arch/mn10300/unit-asb2305/pci.c:324:24: warning: unused variable 'region' [-Wunused-variable]Whilst we're at it, merge the two integer variable declarations into one line.
Signed-off-by: David Howells
-
ASB2305 PCI code needs to #include linux/irq.h for XIRQ1 so that it can set
the CPU interrupt priority level on the PCI interrupt.Signed-off-by: David Howells
-
Handle cacheable PCI regions in pci_iomap(). If IORESOURCE_CACHEABLE is set
then we AND away the 0x20000000 "flag".Signed-off-by: David Howells
12 Jul, 2012
1 commit
-
Move the static inline function setup_jiffies_interrupt() from
to arch/mn10300/kernel/cevt-mn10300.c, which is its only
callsite.This allows to remove the inclusion of and
from and , fixing include hell like:include/linux/jiffies.h:260:31: warning: "CLOCK_TICK_RATE" is not defined [-Wundef]
include/linux/jiffies.h:260:31: warning: "CLOCK_TICK_RATE" is not defined [-Wundef]
include/linux/jiffies.h:46:42: error: division by zero in #if
...
make[4]: *** [arch/mn10300/kernel/asm-offsets.s] Error 1and (after a quick hack for the above by defining CLOCK_TICK_RATE in
):In file included from include/linux/notifier.h:15:0,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:718,
from include/linux/gfp.h:4,
from include/linux/irq.h:20,
from arch/mn10300/unit-asb2303/include/unit/timex.h:15,
from arch/mn10300/include/asm/timex.h:15,
from include/linux/timex.h:174,
from include/linux/jiffies.h:8,
from include/linux/ktime.h:25,
from include/linux/timer.h:5,
from include/linux/workqueue.h:8,
include/linux/srcu.h:55:22: error: field 'work' has incomplete typeAs a consequence, we do need a few more inclusions of , namely
in arch/mn10300/unit-asb2303/smc91111.c and
arch/mn10300/unit-asb2305/unit-init.c.Signed-off-by: Geert Uytterhoeven
Cc: David Howells
Cc: Koichi Yasutake
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 Feb, 2012
1 commit
-
Tell the PCI core about host bridge address translation so it can take
care of bus-to-resource conversion for us.CC: David Howells
Signed-off-by: Bjorn Helgaas
12 Jan, 2012
1 commit
-
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: (80 commits)
x86/PCI: Expand the x86_msi_ops to have a restore MSIs.
PCI: Increase resource array mask bit size in pcim_iomap_regions()
PCI: DEVICE_COUNT_RESOURCE should be equal to PCI_NUM_RESOURCES
PCI: pci_ids: add device ids for STA2X11 device (aka ConneXT)
PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB
x86/PCI: amd: factor out MMCONFIG discovery
PCI: Enable ATS at the device state restore
PCI: msi: fix imbalanced refcount of msi irq sysfs objects
PCI: kconfig: English typo in pci/pcie/Kconfig
PCI/PM/Runtime: make PCI traces quieter
PCI: remove pci_create_bus()
xtensa/PCI: convert to pci_scan_root_bus() for correct root bus resources
x86/PCI: convert to pci_create_root_bus() and pci_scan_root_bus()
x86/PCI: use pci_scan_bus() instead of pci_scan_bus_parented()
x86/PCI: read Broadcom CNB20LE host bridge info before PCI scan
sparc32, leon/PCI: convert to pci_scan_root_bus() for correct root bus resources
sparc/PCI: convert to pci_create_root_bus()
sh/PCI: convert to pci_scan_root_bus() for correct root bus resources
powerpc/PCI: convert to pci_create_root_bus()
powerpc/PCI: split PHB part out of pcibios_map_io_space()
...Fix up conflicts in drivers/pci/msi.c and include/linux/pci_regs.h due
to the same patches being applied in other branches.
07 Jan, 2012
3 commits
-
Convert from pci_scan_bus() to pci_scan_root_bus() and remove root bus
resource fixups. This fixes the problem of "early" and "header" quirks
seeing incorrect root bus resources.CC: David Howells
Signed-off-by: Bjorn Helgaas
Signed-off-by: Jesse Barnes -
This patch removes mn10300's architecture-specific 'pcibios_set_master()'
routine for ASB2305 and lets the default PCI core based implementation
handle PCI device 'latency timer' setup.No functional change.
Signed-off-by: Myron Stowe
Signed-off-by: Jesse Barnes -
The 'latency timer' of PCI devices, both Type 0 and Type 1,
is setup in architecture-specific code [see: 'pcibios_set_master()'].
There are two approaches being taken by all the architectures - check
if the 'latency timer' is currently set between 16 and 255 and if not
bring it within bounds, or, do nothing (and then there is the
gratuitously different PA-RISC implementation).There is nothing architecture-specific about PCI's 'latency timer' so
this patch pulls its setup functionality up into the PCI core by
creating a generic 'pcibios_set_master()' function using the '__weak'
attribute which can be used by all architectures as a default which,
if necessary, can then be over-ridden by architecture-specific code.No functional change.
Signed-off-by: Myron Stowe
Signed-off-by: Jesse Barnes
04 Dec, 2011
1 commit
-
The pci_iomap variant that arch/mn10300/unit-asb2305/pci-iomap.c
uses differs from the generic one in that it does
not use ioremap_nocache for PCI addresses.
However, it turns out that PCI addresses are
automatically noncached, so switching to ioremap_nocache
and to the generic implementation is safe.Signed-off-by: Michael S. Tsirkin
28 Oct, 2010
4 commits
-
Implement generic time support for MN10300.
Signed-off-by: Mark Salter
Signed-off-by: David Howells -
Implement the Panasonic MN10300 AM34 CPU subarch and implement SMP support for
MN10300. Also implement support for the MN2WS0060 processor and the ASB2364
evaluation board which are AM34 based.Signed-off-by: Akira Takeuchi
Signed-off-by: Kiyoshi Owada
Signed-off-by: David Howells -
Instead of open-coding pci_find_parent_resource and request_resource,
just call pci_claim_resource.Signed-off-by: Matthew Wilcox
Signed-off-by: David Howells -
Signed-off-by: Stoyan Gaydarov
Signed-off-by: David Howells
12 Jun, 2010
1 commit
-
Yannick found that video does not work with 2.6.34. The cause of this
bug was that the BIOS had assigned the wrong range to the PCI bridge
above the video device. Before 2.6.34 the kernel would have shrunk
the size of the bridge window, but since
d65245c PCI: don't shrink bridge resources
the kernel will avoid shrinking BIOS ranges.So zero out the old range if we fail to claim it at boot time; this will
cause us to allocate a new range at startup, restoring the 2.6.34
behavior.Fixes regression https://bugzilla.kernel.org/show_bug.cgi?id=16009.
Reported-by: Yannick
Acked-by: Bjorn Helgaas
Signed-off-by: Yinghai Lu
Signed-off-by: Jesse Barnes
30 Mar, 2010
1 commit
-
…it slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
24 Feb, 2010
1 commit
-
No functional change; this converts loops that iterate from 0 to
PCI_BUS_NUM_RESOURCES through pci_bus resource[] table to use the
pci_bus_for_each_resource() iterator instead.This doesn't change the way resources are stored; it merely removes
dependencies on the fact that they're in a table.Signed-off-by: Bjorn Helgaas
Signed-off-by: Jesse Barnes
23 Feb, 2010
2 commits
-
Now that we return the new resource start position, there is no
need to update "struct resource" inside the align function.
Therefore, mark the struct resource as const.Cc: Bjorn Helgaas
Cc: Yinghai Lu
Signed-off-by: Dominik Brodowski
Signed-off-by: Jesse Barnes -
As suggested by Linus, align functions should return the start
of a resource, not void. An update of "res->start" is no longer
necessary.Cc: Bjorn Helgaas
Cc: Yinghai Lu
Signed-off-by: Dominik Brodowski
Signed-off-by: Jesse Barnes
12 Jan, 2010
1 commit
-
Insert PCI root bus resources for the MN10300-based ASB2305 development
kit motherboard. This is required because the CPU's window onto the PCI
bus address space is considerably smaller than the CPU's full address
space and non-PCI devices lie outside of the PCI window that we might want
to access.Without this patch, the PCI root bus uses the platform-level bus
resources, and these are then confined to the PCI window, thus making
platform_device_add() reject devices outside of this window.We also add a reservation for the PCI SRAM region.
Signed-off-by: David Howells
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds