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
2d7b2832
Commit
2d7b2832
authored
Nov 04, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge davem@nuts.ninka.net:/disk1/davem/BK/net-2.5
into kernel.bkbits.net:/home/davem/net-2.5
parents
dbde2ea6
4154cebf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
arch/i386/mm/ioremap.c
arch/i386/mm/ioremap.c
+16
-5
No files found.
arch/i386/mm/ioremap.c
View file @
2d7b2832
...
@@ -190,16 +190,27 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag
...
@@ -190,16 +190,27 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag
void
*
ioremap_nocache
(
unsigned
long
phys_addr
,
unsigned
long
size
)
void
*
ioremap_nocache
(
unsigned
long
phys_addr
,
unsigned
long
size
)
{
{
unsigned
long
last_addr
;
void
*
p
=
__ioremap
(
phys_addr
,
size
,
_PAGE_PCD
);
void
*
p
=
__ioremap
(
phys_addr
,
size
,
_PAGE_PCD
);
if
(
!
p
)
if
(
!
p
)
return
p
;
return
p
;
if
(
phys_addr
+
size
<
virt_to_phys
(
high_memory
))
{
/* Guaranteed to be > phys_addr, as per __ioremap() */
last_addr
=
phys_addr
+
size
-
1
;
if
(
last_addr
<
virt_to_phys
(
high_memory
))
{
struct
page
*
ppage
=
virt_to_page
(
__va
(
phys_addr
));
struct
page
*
ppage
=
virt_to_page
(
__va
(
phys_addr
));
unsigned
long
npages
=
(
size
+
PAGE_SIZE
-
1
)
>>
PAGE_SHIFT
;
unsigned
long
npages
;
phys_addr
&=
PAGE_MASK
;
/* This might overflow and become zero.. */
last_addr
=
PAGE_ALIGN
(
last_addr
);
BUG_ON
(
phys_addr
+
size
>
(
unsigned
long
)
high_memory
);
/* .. but that's ok, because modulo-2**n arithmetic will make
BUG_ON
(
phys_addr
+
size
<
phys_addr
);
* the page-aligned "last - first" come out right.
*/
npages
=
(
last_addr
-
phys_addr
)
>>
PAGE_SHIFT
;
if
(
change_page_attr
(
ppage
,
npages
,
PAGE_KERNEL_NOCACHE
)
<
0
)
{
if
(
change_page_attr
(
ppage
,
npages
,
PAGE_KERNEL_NOCACHE
)
<
0
)
{
iounmap
(
p
);
iounmap
(
p
);
...
...
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