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
dc339743
Commit
dc339743
authored
Feb 15, 2011
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'iomem' into release
parents
ed764e7c
884b821f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
drivers/acpi/osl.c
drivers/acpi/osl.c
+18
-7
No files found.
drivers/acpi/osl.c
View file @
dc339743
...
@@ -636,17 +636,21 @@ EXPORT_SYMBOL(acpi_os_write_port);
...
@@ -636,17 +636,21 @@ EXPORT_SYMBOL(acpi_os_write_port);
acpi_status
acpi_status
acpi_os_read_memory
(
acpi_physical_address
phys_addr
,
u32
*
value
,
u32
width
)
acpi_os_read_memory
(
acpi_physical_address
phys_addr
,
u32
*
value
,
u32
width
)
{
{
u32
dummy
;
void
__iomem
*
virt_addr
;
void
__iomem
*
virt_addr
;
int
size
=
width
/
8
,
unmap
=
0
;
unsigned
int
size
=
width
/
8
;
bool
unmap
=
false
;
u32
dummy
;
rcu_read_lock
();
rcu_read_lock
();
virt_addr
=
acpi_map_vaddr_lookup
(
phys_addr
,
size
);
virt_addr
=
acpi_map_vaddr_lookup
(
phys_addr
,
size
);
rcu_read_unlock
();
if
(
!
virt_addr
)
{
if
(
!
virt_addr
)
{
rcu_read_unlock
();
virt_addr
=
acpi_os_ioremap
(
phys_addr
,
size
);
virt_addr
=
acpi_os_ioremap
(
phys_addr
,
size
);
unmap
=
1
;
if
(
!
virt_addr
)
return
AE_BAD_ADDRESS
;
unmap
=
true
;
}
}
if
(
!
value
)
if
(
!
value
)
value
=
&
dummy
;
value
=
&
dummy
;
...
@@ -666,6 +670,8 @@ acpi_os_read_memory(acpi_physical_address phys_addr, u32 * value, u32 width)
...
@@ -666,6 +670,8 @@ acpi_os_read_memory(acpi_physical_address phys_addr, u32 * value, u32 width)
if
(
unmap
)
if
(
unmap
)
iounmap
(
virt_addr
);
iounmap
(
virt_addr
);
else
rcu_read_unlock
();
return
AE_OK
;
return
AE_OK
;
}
}
...
@@ -674,14 +680,17 @@ acpi_status
...
@@ -674,14 +680,17 @@ acpi_status
acpi_os_write_memory
(
acpi_physical_address
phys_addr
,
u32
value
,
u32
width
)
acpi_os_write_memory
(
acpi_physical_address
phys_addr
,
u32
value
,
u32
width
)
{
{
void
__iomem
*
virt_addr
;
void
__iomem
*
virt_addr
;
int
size
=
width
/
8
,
unmap
=
0
;
unsigned
int
size
=
width
/
8
;
bool
unmap
=
false
;
rcu_read_lock
();
rcu_read_lock
();
virt_addr
=
acpi_map_vaddr_lookup
(
phys_addr
,
size
);
virt_addr
=
acpi_map_vaddr_lookup
(
phys_addr
,
size
);
rcu_read_unlock
();
if
(
!
virt_addr
)
{
if
(
!
virt_addr
)
{
rcu_read_unlock
();
virt_addr
=
acpi_os_ioremap
(
phys_addr
,
size
);
virt_addr
=
acpi_os_ioremap
(
phys_addr
,
size
);
unmap
=
1
;
if
(
!
virt_addr
)
return
AE_BAD_ADDRESS
;
unmap
=
true
;
}
}
switch
(
width
)
{
switch
(
width
)
{
...
@@ -700,6 +709,8 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width)
...
@@ -700,6 +709,8 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width)
if
(
unmap
)
if
(
unmap
)
iounmap
(
virt_addr
);
iounmap
(
virt_addr
);
else
rcu_read_unlock
();
return
AE_OK
;
return
AE_OK
;
}
}
...
...
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