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
3835f6cb
Commit
3835f6cb
authored
Sep 17, 2008
by
Nicolas Pitre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] mem_init(): make highmem pages available for use
Signed-off-by:
Nicolas Pitre
<
nico@marvell.com
>
parent
d73cd428
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
arch/arm/mm/init.c
arch/arm/mm/init.c
+18
-3
No files found.
arch/arm/mm/init.c
View file @
3835f6cb
...
...
@@ -15,6 +15,7 @@
#include <linux/mman.h>
#include <linux/nodemask.h>
#include <linux/initrd.h>
#include <linux/highmem.h>
#include <asm/mach-types.h>
#include <asm/sections.h>
...
...
@@ -485,7 +486,7 @@ void __init mem_init(void)
int
i
,
node
;
#ifndef CONFIG_DISCONTIGMEM
max_mapnr
=
virt_to_page
(
high_memory
)
-
mem_map
;
max_mapnr
=
pfn_to_page
(
max_pfn
+
PHYS_PFN_OFFSET
)
-
mem_map
;
#endif
/* this will put all unused low memory onto the freelists */
...
...
@@ -504,6 +505,19 @@ void __init mem_init(void)
__phys_to_pfn
(
__pa
(
swapper_pg_dir
)),
NULL
);
#endif
#ifdef CONFIG_HIGHMEM
/* set highmem page free */
for_each_online_node
(
node
)
{
for_each_nodebank
(
i
,
&
meminfo
,
node
)
{
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
/*
* Since our memory may not be contiguous, calculate the
* real number of pages we have in this system
...
...
@@ -521,9 +535,10 @@ void __init mem_init(void)
initsize
=
__init_end
-
__init_begin
;
printk
(
KERN_NOTICE
"Memory: %luKB available (%dK code, "
"%dK data, %dK init)
\n
"
,
"%dK data, %dK init
, %luK highmem
)
\n
"
,
(
unsigned
long
)
nr_free_pages
()
<<
(
PAGE_SHIFT
-
10
),
codesize
>>
10
,
datasize
>>
10
,
initsize
>>
10
);
codesize
>>
10
,
datasize
>>
10
,
initsize
>>
10
,
(
unsigned
long
)
(
totalhigh_pages
<<
(
PAGE_SHIFT
-
10
)));
if
(
PAGE_SIZE
>=
16384
&&
num_physpages
<=
128
)
{
extern
int
sysctl_overcommit_memory
;
...
...
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