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
d0e775af
Commit
d0e775af
authored
Oct 27, 2010
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: move freeing of highmem pages out of mem_init()
Signed-off-by:
Russell King
<
rmk+kernel@arm.linux.org.uk
>
parent
47ea3c15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
arch/arm/mm/init.c
arch/arm/mm/init.c
+17
-10
No files found.
arch/arm/mm/init.c
View file @
d0e775af
...
...
@@ -436,6 +436,22 @@ static void __init free_unused_memmap(struct meminfo *mi)
}
}
static
void
__init
free_highpages
(
void
)
{
#ifdef CONFIG_HIGHMEM
int
i
;
/* set highmem page free */
for_each_bank
(
i
,
&
meminfo
)
{
unsigned
long
start
=
bank_pfn_start
(
&
meminfo
.
bank
[
i
]);
unsigned
long
end
=
bank_pfn_end
(
&
meminfo
.
bank
[
i
]);
if
(
start
>=
max_low_pfn
+
PHYS_PFN_OFFSET
)
totalhigh_pages
+=
free_area
(
start
,
end
,
NULL
);
}
totalram_pages
+=
totalhigh_pages
;
#endif
}
/*
* mem_init() marks the free areas in the mem_map and tells us how much
* memory is free. This is done after various parts of the system have
...
...
@@ -465,16 +481,7 @@ void __init mem_init(void)
__phys_to_pfn
(
__pa
(
swapper_pg_dir
)),
NULL
);
#endif
#ifdef CONFIG_HIGHMEM
/* set highmem page free */
for_each_bank
(
i
,
&
meminfo
)
{
unsigned
long
start
=
bank_pfn_start
(
&
meminfo
.
bank
[
i
]);
unsigned
long
end
=
bank_pfn_end
(
&
meminfo
.
bank
[
i
]);
if
(
start
>=
max_low_pfn
+
PHYS_PFN_OFFSET
)
totalhigh_pages
+=
free_area
(
start
,
end
,
NULL
);
}
totalram_pages
+=
totalhigh_pages
;
#endif
free_highpages
();
reserved_pages
=
free_pages
=
0
;
...
...
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