login
Login
/
Register
Search
Header Space
Forums
News
Jobs
Blogs
Features
Man Pages
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
May
»
12
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memory allocation
view
thread
Score:
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Yinghai Lu <yhlu.kernel@...>
To: Gary Hade <garyhade@...>
Cc: <jbarnes@...>, <linux-kernel@...>, <linux-pci@...>
Subject:
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memory allocation
Date: Monday, May 12, 2008 - 5:43 pm
On Mon, May 12, 2008 at 1:57 PM, Gary Hade <garyhade@us.ibm.com> wrote:
quoted text
> From: Gary Hade <garyhade@us.ibm.com> > > Contention for scarce PCI memory resources has been growing > due to an increasing number of PCI slots in large multi-node > systems. The kernel currently attempts by default to > allocate memory for all PCI expansion ROMs so there has > also been an increasing number of PCI memory allocation > failures seen on these systems. This occurs because the > BIOS either (1) provides insufficient PCI memory resource > for all the expansion ROMs or (2) provides adequate PCI > memory resource for expansion ROMs but provides the > space in kernel unexpected BIOS assigned P2P non-prefetch > windows. > > The resulting PCI memory allocation failures may be benign > when related to memory requests for expansion ROMs themselves > but in some cases they can occur when attempting to allocate > space for more critical BARs. This can happen when a successful > expansion ROM allocation request consumes memory resource > that was intended for a non-ROM BAR. We have seen this > happen during PCI hotplug of an adapter that contains a > P2P bridge where successful memory allocation for an > expansion ROM BAR on device behind the bridge consumed > memory that was intended for a non-ROM BAR on the P2P bridge. > In all cases the allocation failure messages can be very > confusing for users. > > This patch provides a new 'pci=norom' kernel boot parameter > that can be used to disable the default PCI expansion ROM memory > resource allocation. This provides a way to avoid the above > described issues on systems that do not contain PCI devices > for which drivers or user-level applications depend on the > default PCI expansion ROM memory resource allocation behavior. > > Signed-off-by: Gary Hade <garyhade@us.ibm.com> > --- > > --- linux-2.6.26-rc2/arch/x86/pci/pci.h.orig 2008-05-12 10:53:04.000000000 -0700 > +++ linux-2.6.26-rc2/arch/x86/pci/pci.h 2008-05-12 10:54:39.000000000 -0700 > @@ -27,6 +27,7 @@ > #define PCI_CAN_SKIP_ISA_ALIGN 0x8000 > #define PCI_USE__CRS 0x10000 > #define PCI_CHECK_ENABLE_AMD_MMCONF 0x20000 > +#define PCI_NOASSIGN_ROMS 0x40000 > > extern unsigned int pci_probe; > extern unsigned long pirq_table_addr; > --- linux-2.6.26-rc2/Documentation/kernel-parameters.txt.orig 2008-05-12 10:55:30.000000000 -0700 > +++ linux-2.6.26-rc2/Documentation/kernel-parameters.txt 2008-05-12 10:57:49.000000000 -0700 > @@ -1493,6 +1493,9 @@ and is between 256 and 4096 characters. > Use with caution as certain devices share > address decoders between ROMs and other > resources. > + norom [X86-32,X86_64] Do not assign address space to > + expansion ROMs that do not already have > + BIOS assigned address ranges. > irqmask=0xMMMM [X86-32] Set a bit mask of IRQs allowed to be > assigned automatically to PCI devices. You can > make the kernel exclude IRQs of your ISA cards > --- linux-2.6.26-rc2/arch/x86/pci/common.c.orig 2008-05-12 10:59:58.000000000 -0700 > +++ linux-2.6.26-rc2/arch/x86/pci/common.c 2008-05-12 11:22:05.000000000 -0700 > @@ -121,6 +121,21 @@ void __init dmi_check_skip_isa_align(voi > dmi_check_system(can_skip_pciprobe_dmi_table); > } > > +static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) > +{ > + struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE]; > + > + if (pci_probe & PCI_NOASSIGN_ROMS) { > + if (rom_r->parent) > + return; > + if (rom_r->start) { > + /* we deal with BIOS assigned ROM later */ > + return; > + } > + rom_r->start = rom_r->end = rom_r->flags = 0; > + } > +} > + > /* > * Called after each bus is probed, but before its children > * are examined. > @@ -128,7 +143,11 @@ void __init dmi_check_skip_isa_align(voi > > void __devinit pcibios_fixup_bus(struct pci_bus *b) > { > + struct pci_dev *dev; > + > pci_read_bridge_bases(b); > + list_for_each_entry(dev, &b->devices, bus_list) > + pcibios_fixup_device_resources(dev); > }
or put check + if (pci_probe & PCI_NOASSIGN_ROMS) { out of loop? YH --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] PCI: boot parameter to avoid expansion ROM memory al...
, Gary Hade
, (Mon May 12, 4:57 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Yinghai Lu
, (Mon May 12, 5:43 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Gary Hade
, (Mon May 12, 6:30 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Yinghai Lu
, (Tue May 13, 1:48 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Gary Hade
, (Tue May 13, 5:00 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Yinghai Lu
, (Tue May 13, 5:11 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Jesse Barnes
, (Tue May 13, 6:28 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Yinghai Lu
, (Tue May 13, 7:23 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Gary Hade
, (Tue May 13, 8:07 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Gary Hade
, (Wed May 14, 12:20 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Jesse Barnes
, (Tue May 20, 1:57 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Gary Hade
, (Tue May 20, 4:00 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Jesse Barnes
, (Tue May 20, 4:16 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Gary Hade
, (Wed May 21, 1:29 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Jesse Barnes
, (Wed May 21, 1:40 pm)
Re: [RFC] which drivers need to map ROM BARs?
, Jesse Barnes
, (Wed May 14, 12:58 pm)
Re: [PATCH] PCI: boot parameter to avoid expansion ROM memor...
, Yinghai Lu
, (Tue May 13, 5:44 pm)
Navigation
Create content
Mailing list archives
Recent posts
Mail archive search
Enter your search terms.
all mailing lists
alsa-devel
dragonflybsd-bugs
dragonflybsd-commit
dragonflybsd-docs
dragonflybsd-kernel
dragonflybsd-submit
dragonflybsd-user
freebsd-announce
freebsd-bugs
freebsd-chat
freebsd-cluster
freebsd-current
freebsd-drivers
freebsd-embeded
freebsd-fs
freebsd-hackers
freebsd-hardware
freebsd-mobile
freebsd-net
freebsd-performance
freebsd-pf
freebsd-security
freebsd-security-notifications
freebsd-threads
git
git-commits-head
linux-activists
linux-arm
linux-ath5k-devel
linux-btrfs
linux-c-programming
linux-driver-devel
linux-ext4
linux-fsdevel
linux-ia64
linux-input
linux-kernel
linux-kernel-janitors
linux-kernel-mentors
linux-kernel-newbies
linux-kvm
linux-net
linux-netdev
linux-newbie
linux-nfs
linux-raid
linux-scsi
linux-security-module
linux-sparse
linux-usb
linux-usb-devel
madwifi-devel
netbsd-announce
netbsd-tech-kern
openbsd-announce
openbsd-bugs
openbsd-ipv6
openbsd-misc
openbsd-security-announce
openbsd-smp
openbsd-source-changes
openbsd-tech
openfabrics-general
openmoko-community
openmoko-devel
openmoko-kernel
reiserfs-devel
tux3
ucarp
Optionally limit your search to a specific mailing list.
advanced
Popular discussions
linux-kernel
:
Ryan Hope
reiser4 for 2.6.27-rc1
Ingo Molnar
Re: 2.6.24-rc6-mm1
Tim Tassonis
reiser4 for 2.6.27-rc1
Ingo Molnar
Re: [patch] MTD: fix DOC2000/2001/2001PLUS build error
git
:
Petko Manolov
git and binary files
Wink Saville
Resolving conflicts
Ken Pratt
pack operation is thrashing my server
Junio C Hamano
What's cooking in git.git (Aug 2008, #07; Sat, 23)
openbsd-misc
:
Richard Stallman
Real men don't attack straw men
Julien TOUCHE
setting up ssh tunnel/vpn
Jeffrey 'jf' Lim
Re: SSHJail patch for OpenBSD
Daniel Ouellet
identifying sparse files and get ride of them trick available?
linux-activists
:
Jim Winstead Jr.
Re: Root Disk/Book Disk Compatibility
Peter MacDonald
demand paging: proposal
Stephen Pierce
SLS
Drew Eckhardt
Re: 20MB drive & wdxt-gen2 controller on 386?
Latest forum posts
trouble with my Asus Mainboard
1 hour ago
Linux kernel
what is "callback function"?.can anyone explain me please..
21 hours ago
Linux general
unable to remove block device driver module
1 day ago
Linux kernel
Is there anything like Real-time drivers?
2 days ago
Linux general
I can't allocate more than 4 MB with pci_alloc_consistent
2 days ago
Linux kernel
Resetting the bios password for Toshiba Laptop
2 days ago
Hardware
Kernel panic while installing fedora core 5 or ubuntu
3 days ago
Hardware
Interactive Linux kernel map
3 days ago
Linux kernel
unable to add a variable in buffer_head struct
3 days ago
Linux kernel
Linux Input driver - setting scaling/resolution on USB mouse
4 days ago
Linux kernel
Show all forums...
Recent Tags
Linus Torvalds
release
Andrew Morton
-rc
Linux
performance
Ingo Molnar
Rik van Riel
Junio Hamano
filesystem
git 1.6
squashfs
cramfs
GCC
git
Jared Hulbert
git 1.6.0
AXFS
quote
2.6.27
more tags
Colocation donated by:
Who's online
There are currently
4 users
and
761 guests
online.
Online users
Jeremy
Raynus
Mr_Z
strcmp
Syndicate
speck-geostationary