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
c88f4d31
Commit
c88f4d31
authored
Feb 19, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] PCI i386: remove large stack usage in pcibios_fixup_peer_bridges()
parent
2b6412de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
arch/i386/pci/legacy.c
arch/i386/pci/legacy.c
+19
-8
No files found.
arch/i386/pci/legacy.c
View file @
c88f4d31
...
...
@@ -12,28 +12,39 @@
static
void
__devinit
pcibios_fixup_peer_bridges
(
void
)
{
int
n
;
struct
pci_bus
bus
;
struct
pci_dev
dev
;
struct
pci_bus
*
bus
;
struct
pci_dev
*
dev
;
u16
l
;
if
(
pcibios_last_bus
<=
0
||
pcibios_last_bus
>=
0xff
)
return
;
DBG
(
"PCI: Peer bridge fixup
\n
"
);
bus
=
kmalloc
(
sizeof
(
*
bus
),
GFP_ATOMIC
);
dev
=
kmalloc
(
sizeof
(
*
dev
),
GFP_ATOMIC
);
if
(
!
bus
||
!
dev
)
{
printk
(
KERN_ERR
"Out of memory in %s
\n
"
,
__FUNCTION__
);
goto
exit
;
}
for
(
n
=
0
;
n
<=
pcibios_last_bus
;
n
++
)
{
if
(
pci_bus_exists
(
&
pci_root_buses
,
n
))
continue
;
bus
.
number
=
n
;
bus
.
ops
=
pci_root_ops
;
dev
.
bus
=
&
bus
;
for
(
dev
.
devfn
=
0
;
dev
.
devfn
<
256
;
dev
.
devfn
+=
8
)
if
(
!
pci_read_config_word
(
&
dev
,
PCI_VENDOR_ID
,
&
l
)
&&
bus
->
number
=
n
;
bus
->
ops
=
pci_root_ops
;
dev
->
bus
=
bus
;
for
(
dev
->
devfn
=
0
;
dev
->
devfn
<
256
;
dev
->
devfn
+=
8
)
if
(
!
pci_read_config_word
(
dev
,
PCI_VENDOR_ID
,
&
l
)
&&
l
!=
0x0000
&&
l
!=
0xffff
)
{
DBG
(
"Found device at %02x:%02x [%04x]
\n
"
,
n
,
dev
.
devfn
,
l
);
DBG
(
"Found device at %02x:%02x [%04x]
\n
"
,
n
,
dev
->
devfn
,
l
);
printk
(
KERN_INFO
"PCI: Discovered peer bus %02x
\n
"
,
n
);
pci_scan_bus
(
n
,
pci_root_ops
,
NULL
);
break
;
}
}
exit:
kfree
(
dev
);
kfree
(
bus
);
}
static
int
__init
pci_legacy_init
(
void
)
...
...
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