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
ad072004
Commit
ad072004
authored
Feb 13, 2008
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Use lmb_alloc() for PROM device tree.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
b9709456
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
arch/sparc64/kernel/prom.c
arch/sparc64/kernel/prom.c
+9
-5
arch/sparc64/mm/init.c
arch/sparc64/mm/init.c
+2
-2
No files found.
arch/sparc64/kernel/prom.c
View file @
ad072004
...
...
@@ -19,8 +19,8 @@
#include <linux/types.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/bootmem.h>
#include <linux/module.h>
#include <linux/lmb.h>
#include <asm/prom.h>
#include <asm/of_device.h>
...
...
@@ -122,16 +122,20 @@ int of_find_in_proplist(const char *list, const char *match, int len)
}
EXPORT_SYMBOL
(
of_find_in_proplist
);
static
unsigned
int
prom_early_allocated
;
static
unsigned
int
prom_early_allocated
__initdata
;
static
void
*
__init
prom_early_alloc
(
unsigned
long
size
)
{
unsigned
long
paddr
=
lmb_alloc
(
size
,
SMP_CACHE_BYTES
);
void
*
ret
;
ret
=
__alloc_bootmem
(
size
,
SMP_CACHE_BYTES
,
0UL
);
if
(
ret
!=
NULL
)
memset
(
ret
,
0
,
size
);
if
(
!
paddr
)
{
prom_printf
(
"prom_early_alloc(%lu) failed
\n
"
);
prom_halt
();
}
ret
=
__va
(
paddr
);
memset
(
ret
,
0
,
size
);
prom_early_allocated
+=
size
;
return
ret
;
...
...
arch/sparc64/mm/init.c
View file @
ad072004
...
...
@@ -1214,6 +1214,8 @@ void __init paging_init(void)
*/
real_setup_per_cpu_areas
();
prom_build_devicetree
();
/* Setup bootmem... */
pages_avail
=
0
;
last_valid_pfn
=
end_pfn
=
bootmem_init
(
&
pages_avail
,
phys_base
);
...
...
@@ -1222,8 +1224,6 @@ void __init paging_init(void)
kernel_physical_mapping_init
();
prom_build_devicetree
();
if
(
tlb_type
==
hypervisor
)
sun4v_mdesc_init
();
...
...
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