diff options
| author | Patrick Mochel <mochel@osdl.org> | 2002-12-30 00:58:05 -0600 |
|---|---|---|
| committer | Patrick Mochel <mochel@osdl.org> | 2002-12-30 00:58:05 -0600 |
| commit | d6855047db037c11826be1e9a64c468614bdb1b0 (patch) | |
| tree | 997fdbf442bb06923ca185c9ba027936baf0a6b7 | |
| parent | 61f53a3c83622a876d219e5b7b09ab97cc189d39 (diff) | |
| parent | d5a246fc1d862cf702b5faea7d2c26655d58fc31 (diff) | |
Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin
into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core
| -rw-r--r-- | drivers/pci/Kconfig | 30 | ||||
| -rw-r--r-- | drivers/pci/proc.c | 38 |
2 files changed, 51 insertions, 17 deletions
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 76bbcc6cb4df..34026e3dc6be 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -1,18 +1,36 @@ # # PCI configuration # +config PCI_LEGACY_PROC + bool "Legacy /proc/pci interface" + ---help--- + This feature enables a procfs file -- /proc/pci -- that provides a + summary of PCI devices in the system. + + This feature has been deprecated as of v2.5.53, in favor of using the + tool lspci(8). This feature may be removed at a future date. + + lspci can provide the same data, as well as much more. lspci is a part of + the pci-utils package, which should be installed by your distribution. + See Documentation/Changes for information on where to get the latest + version. + + When in doubt, say N. + config PCI_NAMES bool "PCI device name database" depends on PCI ---help--- By default, the kernel contains a database of all known PCI device names to make the information in /proc/pci, /proc/ioports and - similar files comprehensible to the user. This database increases - size of the kernel image by about 80KB, but it gets freed after the - system boots up, so it doesn't take up kernel memory. Anyway, if you - are building an installation floppy or kernel for an embedded system - where kernel image size really matters, you can disable this feature - and you'll get device ID numbers instead of names. + similar files comprehensible to the user. + + This database increases size of the kernel image by about 80KB. This + memory is freed after the system boots up if CONFIG_HOTPLUG is not set. + + Anyway, if you are building an installation floppy or kernel for an + embedded system where kernel image size really matters, you can disable + this feature and you'll get device ID numbers instead of names. When in doubt, say Y. diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 6328dbe2bb1a..bbc437e54a0b 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c @@ -472,6 +472,7 @@ int pci_proc_detach_bus(struct pci_bus* bus) return 0; } +#ifdef CONFIG_PCI_LEGACY_PROC /* * Backward compatible /proc/pci interface. @@ -573,22 +574,39 @@ static struct seq_operations proc_pci_op = { .show = show_dev_config }; -static int proc_bus_pci_dev_open(struct inode *inode, struct file *file) +static int proc_pci_open(struct inode *inode, struct file *file) { - return seq_open(file, &proc_bus_pci_devices_op); + return seq_open(file, &proc_pci_op); } -static struct file_operations proc_bus_pci_dev_operations = { - .open = proc_bus_pci_dev_open, +static struct file_operations proc_pci_operations = { + .open = proc_pci_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, }; -static int proc_pci_open(struct inode *inode, struct file *file) + +static void legacy_proc_init(void) { - return seq_open(file, &proc_pci_op); + struct proc_dir_entry * entry = create_proc_entry("pci", 0, NULL); + if (entry) + entry->proc_fops = &proc_pci_operations; } -static struct file_operations proc_pci_operations = { - .open = proc_pci_open, + +#else + +static void legacy_proc_init(void) +{ + +} + +#endif /* CONFIG_PCI_LEGACY_PROC */ + +static int proc_bus_pci_dev_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &proc_bus_pci_devices_op); +} +static struct file_operations proc_bus_pci_dev_operations = { + .open = proc_bus_pci_dev_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, @@ -607,9 +625,7 @@ static int __init pci_proc_init(void) pci_for_each_dev(dev) { pci_proc_attach_device(dev); } - entry = create_proc_entry("pci", 0, NULL); - if (entry) - entry->proc_fops = &proc_pci_operations; + legacy_proc_init(); } return 0; } |
