Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
5c29ea44
Commit
5c29ea44
authored
Jan 05, 2003
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Plain 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
parents
efd526ef
9462b3e6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
17 deletions
+51
-17
drivers/pci/Kconfig
drivers/pci/Kconfig
+24
-6
drivers/pci/proc.c
drivers/pci/proc.c
+27
-11
No files found.
drivers/pci/Kconfig
View file @
5c29ea44
#
#
# PCI configuration
# 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
config PCI_NAMES
bool "PCI device name database"
bool "PCI device name database"
depends on PCI
depends on PCI
---help---
---help---
By default, the kernel contains a database of all known PCI device
By default, the kernel contains a database of all known PCI device
names to make the information in /proc/pci, /proc/ioports and
names to make the information in /proc/pci, /proc/ioports and
similar files comprehensible to the user. This database increases
similar files comprehensible to the user.
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
This database increases size of the kernel image by about 80KB. This
are building an installation floppy or kernel for an embedded system
memory is freed after the system boots up if CONFIG_HOTPLUG is not set.
where kernel image size really matters, you can disable this feature
and you'll get device ID numbers instead of names.
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.
When in doubt, say Y.
drivers/pci/proc.c
View file @
5c29ea44
...
@@ -472,6 +472,7 @@ int pci_proc_detach_bus(struct pci_bus* bus)
...
@@ -472,6 +472,7 @@ int pci_proc_detach_bus(struct pci_bus* bus)
return
0
;
return
0
;
}
}
#ifdef CONFIG_PCI_LEGACY_PROC
/*
/*
* Backward compatible /proc/pci interface.
* Backward compatible /proc/pci interface.
...
@@ -573,22 +574,39 @@ static struct seq_operations proc_pci_op = {
...
@@ -573,22 +574,39 @@ static struct seq_operations proc_pci_op = {
.
show
=
show_dev_config
.
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
=
{
static
struct
file_operations
proc_
pci
_operations
=
{
.
open
=
proc_
bus_pci_dev
_open
,
.
open
=
proc_
pci
_open
,
.
read
=
seq_read
,
.
read
=
seq_read
,
.
llseek
=
seq_lseek
,
.
llseek
=
seq_lseek
,
.
release
=
seq_release
,
.
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
,
.
read
=
seq_read
,
.
llseek
=
seq_lseek
,
.
llseek
=
seq_lseek
,
.
release
=
seq_release
,
.
release
=
seq_release
,
...
@@ -607,9 +625,7 @@ static int __init pci_proc_init(void)
...
@@ -607,9 +625,7 @@ static int __init pci_proc_init(void)
pci_for_each_dev
(
dev
)
{
pci_for_each_dev
(
dev
)
{
pci_proc_attach_device
(
dev
);
pci_proc_attach_device
(
dev
);
}
}
entry
=
create_proc_entry
(
"pci"
,
0
,
NULL
);
legacy_proc_init
();
if
(
entry
)
entry
->
proc_fops
=
&
proc_pci_operations
;
}
}
return
0
;
return
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment