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
Kirill Smelkov
linux
Commits
9472d8ce
Commit
9472d8ce
authored
Oct 28, 2005
by
Tony Luck
Browse files
Options
Browse Files
Download
Plain Diff
Pull acpi-produce-consume into release branch
parents
3168c31a
463eb297
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
8 deletions
+27
-8
arch/ia64/pci/pci.c
arch/ia64/pci/pci.c
+27
-8
No files found.
arch/ia64/pci/pci.c
View file @
9472d8ce
...
...
@@ -168,6 +168,29 @@ add_io_space (struct acpi_resource_address64 *addr)
return
IO_SPACE_BASE
(
i
);
}
static
acpi_status
__devinit
resource_to_window
(
struct
acpi_resource
*
resource
,
struct
acpi_resource_address64
*
addr
)
{
acpi_status
status
;
/*
* We're only interested in _CRS descriptors that are
* - address space descriptors for memory or I/O space
* - non-zero size
* - producers, i.e., the address space is routed downstream,
* not consumed by the bridge itself
*/
status
=
acpi_resource_to_address64
(
resource
,
addr
);
if
(
ACPI_SUCCESS
(
status
)
&&
(
addr
->
resource_type
==
ACPI_MEMORY_RANGE
||
addr
->
resource_type
==
ACPI_IO_RANGE
)
&&
addr
->
address_length
&&
addr
->
producer_consumer
==
ACPI_PRODUCER
)
return
AE_OK
;
return
AE_ERROR
;
}
static
acpi_status
__devinit
count_window
(
struct
acpi_resource
*
resource
,
void
*
data
)
{
...
...
@@ -175,11 +198,9 @@ count_window (struct acpi_resource *resource, void *data)
struct
acpi_resource_address64
addr
;
acpi_status
status
;
status
=
acpi_resource_to_address64
(
resource
,
&
addr
);
status
=
resource_to_window
(
resource
,
&
addr
);
if
(
ACPI_SUCCESS
(
status
))
if
(
addr
.
resource_type
==
ACPI_MEMORY_RANGE
||
addr
.
resource_type
==
ACPI_IO_RANGE
)
(
*
windows
)
++
;
(
*
windows
)
++
;
return
AE_OK
;
}
...
...
@@ -198,13 +219,11 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
unsigned
long
flags
,
offset
=
0
;
struct
resource
*
root
;
status
=
acpi_resource_to_address64
(
res
,
&
addr
);
/* Return AE_OK for non-window resources to keep scanning for more */
status
=
resource_to_window
(
res
,
&
addr
);
if
(
!
ACPI_SUCCESS
(
status
))
return
AE_OK
;
if
(
!
addr
.
address_length
)
return
AE_OK
;
if
(
addr
.
resource_type
==
ACPI_MEMORY_RANGE
)
{
flags
=
IORESOURCE_MEM
;
root
=
&
iomem_resource
;
...
...
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