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
nexedi
linux
Commits
f66525a4
Commit
f66525a4
authored
Oct 08, 2003
by
Jesse Barnes
Committed by
David Mosberger
Oct 08, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ia64: fix NUMA page table allocation to get memory from the right node
parent
2ea73f8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
arch/ia64/mm/init.c
arch/ia64/mm/init.c
+6
-3
include/asm-ia64/numa.h
include/asm-ia64/numa.h
+4
-0
No files found.
arch/ia64/mm/init.c
View file @
f66525a4
...
...
@@ -24,6 +24,7 @@
#include <asm/ia32.h>
#include <asm/io.h>
#include <asm/machvec.h>
#include <asm/numa.h>
#include <asm/patch.h>
#include <asm/pgalloc.h>
#include <asm/sal.h>
...
...
@@ -342,6 +343,7 @@ create_mem_map_page_table (u64 start, u64 end, void *arg)
{
unsigned
long
address
,
start_page
,
end_page
;
struct
page
*
map_start
,
*
map_end
;
int
node
;
pgd_t
*
pgd
;
pmd_t
*
pmd
;
pte_t
*
pte
;
...
...
@@ -351,19 +353,20 @@ create_mem_map_page_table (u64 start, u64 end, void *arg)
start_page
=
(
unsigned
long
)
map_start
&
PAGE_MASK
;
end_page
=
PAGE_ALIGN
((
unsigned
long
)
map_end
);
node
=
paddr_to_nid
(
__pa
(
start
));
for
(
address
=
start_page
;
address
<
end_page
;
address
+=
PAGE_SIZE
)
{
pgd
=
pgd_offset_k
(
address
);
if
(
pgd_none
(
*
pgd
))
pgd_populate
(
&
init_mm
,
pgd
,
alloc_bootmem_pages
(
PAGE_SIZE
));
pgd_populate
(
&
init_mm
,
pgd
,
alloc_bootmem_pages
_node
(
NODE_DATA
(
node
),
PAGE_SIZE
));
pmd
=
pmd_offset
(
pgd
,
address
);
if
(
pmd_none
(
*
pmd
))
pmd_populate_kernel
(
&
init_mm
,
pmd
,
alloc_bootmem_pages
(
PAGE_SIZE
));
pmd_populate_kernel
(
&
init_mm
,
pmd
,
alloc_bootmem_pages
_node
(
NODE_DATA
(
node
),
PAGE_SIZE
));
pte
=
pte_offset_kernel
(
pmd
,
address
);
if
(
pte_none
(
*
pte
))
set_pte
(
pte
,
pfn_pte
(
__pa
(
alloc_bootmem_pages
(
PAGE_SIZE
))
>>
PAGE_SHIFT
,
set_pte
(
pte
,
pfn_pte
(
__pa
(
alloc_bootmem_pages
_node
(
NODE_DATA
(
node
),
PAGE_SIZE
))
>>
PAGE_SHIFT
,
PAGE_KERNEL
));
}
return
0
;
...
...
include/asm-ia64/numa.h
View file @
f66525a4
...
...
@@ -61,6 +61,10 @@ extern int paddr_to_nid(unsigned long paddr);
#define local_nodeid (cpu_to_node_map[smp_processor_id()])
#else
/* !CONFIG_NUMA */
#define paddr_to_nid(addr) 0
#endif
/* CONFIG_NUMA */
#endif
/* _ASM_IA64_NUMA_H */
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