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
20f937be
Commit
20f937be
authored
Jun 04, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: kcore support
parent
e69dbde5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
arch/ppc64/mm/init.c
arch/ppc64/mm/init.c
+31
-0
No files found.
arch/ppc64/mm/init.c
View file @
20f937be
...
...
@@ -36,6 +36,7 @@
#include <linux/delay.h>
#include <linux/bootmem.h>
#include <linux/highmem.h>
#include <linux/proc_fs.h>
#ifdef CONFIG_BLK_DEV_INITRD
#include <linux/blk.h>
/* for initrd_* */
#endif
...
...
@@ -509,6 +510,34 @@ void __init paging_init(void)
}
#endif
static
struct
kcore_list
kcore_vmem
;
static
void
setup_kcore
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<
lmb
.
memory
.
cnt
;
i
++
)
{
unsigned
long
physbase
,
size
;
unsigned
long
type
=
lmb
.
memory
.
region
[
i
].
type
;
struct
kcore_list
*
kcore_mem
;
if
(
type
!=
LMB_MEMORY_AREA
)
continue
;
physbase
=
lmb
.
memory
.
region
[
i
].
physbase
;
size
=
lmb
.
memory
.
region
[
i
].
size
;
/* GFP_ATOMIC to avoid might_sleep warnings during boot */
kcore_mem
=
kmalloc
(
sizeof
(
struct
kcore_list
),
GFP_ATOMIC
);
if
(
!
kcore_mem
)
panic
(
"mem_init: kmalloc failed
\n
"
);
kclist_add
(
kcore_mem
,
__va
(
physbase
),
size
);
}
kclist_add
(
&
kcore_vmem
,
(
void
*
)
VMALLOC_START
,
VMALLOC_END
-
VMALLOC_START
);
}
void
initialize_paca_hardware_interrupt_stack
(
void
);
void
__init
mem_init
(
void
)
...
...
@@ -577,6 +606,8 @@ void __init mem_init(void)
#endif
mem_init_done
=
1
;
setup_kcore
();
/* set the last page of each hardware interrupt stack to be protected */
initialize_paca_hardware_interrupt_stack
();
...
...
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