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
adfe67dd
Commit
adfe67dd
authored
Dec 11, 2009
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sparc64: Use free_bootmem_late() in mdesc_lmb_free().
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
121dd5f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
15 deletions
+6
-15
arch/sparc/kernel/mdesc.c
arch/sparc/kernel/mdesc.c
+6
-15
No files found.
arch/sparc/kernel/mdesc.c
View file @
adfe67dd
...
...
@@ -10,6 +10,7 @@
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/miscdevice.h>
#include <linux/bootmem.h>
#include <asm/cpudata.h>
#include <asm/hypervisor.h>
...
...
@@ -108,25 +109,15 @@ static struct mdesc_handle * __init mdesc_lmb_alloc(unsigned int mdesc_size)
static
void
mdesc_lmb_free
(
struct
mdesc_handle
*
hp
)
{
unsigned
int
alloc_size
,
handle_size
=
hp
->
handle_size
;
unsigned
long
start
,
end
;
unsigned
int
alloc_size
;
unsigned
long
start
;
BUG_ON
(
atomic_read
(
&
hp
->
refcnt
)
!=
0
);
BUG_ON
(
!
list_empty
(
&
hp
->
list
));
alloc_size
=
PAGE_ALIGN
(
handle_size
);
start
=
(
unsigned
long
)
hp
;
end
=
start
+
alloc_size
;
while
(
start
<
end
)
{
struct
page
*
p
;
p
=
virt_to_page
(
start
);
ClearPageReserved
(
p
);
__free_page
(
p
);
start
+=
PAGE_SIZE
;
}
alloc_size
=
PAGE_ALIGN
(
hp
->
handle_size
);
start
=
__pa
(
hp
);
free_bootmem_late
(
start
,
alloc_size
);
}
static
struct
mdesc_mem_ops
lmb_mdesc_ops
=
{
...
...
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