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
a2c54d2a
Commit
a2c54d2a
authored
Oct 27, 2010
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: memblock: use memblock when initializing memory allocators
Signed-off-by:
Russell King
<
rmk+kernel@arm.linux.org.uk
>
parent
7dc50ec7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
arch/arm/mm/init.c
arch/arm/mm/init.c
+16
-9
No files found.
arch/arm/mm/init.c
View file @
a2c54d2a
...
...
@@ -192,11 +192,11 @@ static void __init arm_bootmem_init(struct meminfo *mi,
}
}
static
void
__init
arm_bootmem_free
(
struct
meminfo
*
mi
,
unsigned
long
min
,
unsigned
long
max_
low
,
unsigned
long
max_
high
)
static
void
__init
arm_bootmem_free
(
unsigned
long
min
,
unsigned
long
max_low
,
unsigned
long
max_high
)
{
unsigned
long
zone_size
[
MAX_NR_ZONES
],
zhole_size
[
MAX_NR_ZONES
];
int
i
;
struct
memblock_region
*
reg
;
/*
* initialise the zones.
...
...
@@ -218,13 +218,20 @@ static void __init arm_bootmem_free(struct meminfo *mi, unsigned long min,
* holes = node_size - sum(bank_sizes)
*/
memcpy
(
zhole_size
,
zone_size
,
sizeof
(
zhole_size
));
for_each_bank
(
i
,
mi
)
{
int
idx
=
0
;
for_each_memblock
(
memory
,
reg
)
{
unsigned
long
start
=
memblock_region_memory_base_pfn
(
reg
);
unsigned
long
end
=
memblock_region_memory_end_pfn
(
reg
);
if
(
start
<
max_low
)
{
unsigned
long
low_end
=
min
(
end
,
max_low
);
zhole_size
[
0
]
-=
low_end
-
start
;
}
#ifdef CONFIG_HIGHMEM
if
(
mi
->
bank
[
i
].
highmem
)
idx
=
ZONE_HIGHMEM
;
if
(
end
>
max_low
)
{
unsigned
long
high_start
=
max
(
start
,
max_low
);
zhole_size
[
ZONE_HIGHMEM
]
-=
end
-
high_start
;
}
#endif
zhole_size
[
idx
]
-=
bank_pfn_size
(
&
mi
->
bank
[
i
]);
}
/*
...
...
@@ -327,7 +334,7 @@ void __init bootmem_init(void)
* the sparse mem_map arrays initialized by sparse_init()
* for memmap_init_zone(), otherwise all PFNs are invalid.
*/
arm_bootmem_free
(
mi
,
mi
n
,
max_low
,
max_high
);
arm_bootmem_free
(
min
,
max_low
,
max_high
);
high_memory
=
__va
((
max_low
<<
PAGE_SHIFT
)
-
1
)
+
1
;
...
...
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