Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
54c23310
Commit
54c23310
authored
Dec 05, 2005
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "[PATCH] powerpc: Minor numa memory code cleanup"
This reverts f1fdc0117004d343698b9830e141491d5ae320d1 commit.
parent
d2dd482b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
11 deletions
+24
-11
arch/powerpc/mm/numa.c
arch/powerpc/mm/numa.c
+24
-11
No files found.
arch/powerpc/mm/numa.c
View file @
54c23310
...
...
@@ -254,17 +254,29 @@ static int __init find_min_common_depth(void)
return
depth
;
}
static
void
__init
get_n_mem_cells
(
int
*
n_addr_cells
,
int
*
n_size_cells
)
static
int
__init
get_mem_addr_cells
(
void
)
{
struct
device_node
*
memory
=
NULL
;
int
rc
;
memory
=
of_find_node_by_type
(
memory
,
"memory"
);
if
(
memory
)
{
*
n_addr_cells
=
prom_n_addr_cells
(
memory
);
*
n_size_cells
=
prom_n_size_cells
(
memory
);
of_node_put
(
memory
);
}
/* if (!memory) we are in trouble, let other code error out */
if
(
!
memory
)
return
0
;
/* it won't matter */
rc
=
prom_n_addr_cells
(
memory
);
return
rc
;
}
static
int
__init
get_mem_size_cells
(
void
)
{
struct
device_node
*
memory
=
NULL
;
int
rc
;
memory
=
of_find_node_by_type
(
memory
,
"memory"
);
if
(
!
memory
)
return
0
;
/* it won't matter */
rc
=
prom_n_size_cells
(
memory
);
return
rc
;
}
static
unsigned
long
__init
read_n_cells
(
int
n
,
unsigned
int
**
buf
)
...
...
@@ -374,7 +386,7 @@ static int __init parse_numa_properties(void)
{
struct
device_node
*
cpu
=
NULL
;
struct
device_node
*
memory
=
NULL
;
int
n_addr_cells
,
n_
size_cells
;
int
addr_cells
,
size_cells
;
int
max_domain
;
unsigned
long
i
;
...
...
@@ -413,7 +425,8 @@ static int __init parse_numa_properties(void)
}
}
get_n_mem_cells
(
&
n_addr_cells
,
&
n_size_cells
);
addr_cells
=
get_mem_addr_cells
();
size_cells
=
get_mem_size_cells
();
memory
=
NULL
;
while
((
memory
=
of_find_node_by_type
(
memory
,
"memory"
))
!=
NULL
)
{
unsigned
long
start
;
...
...
@@ -430,8 +443,8 @@ static int __init parse_numa_properties(void)
ranges
=
memory
->
n_addrs
;
new_range:
/* these are order-sensitive, and modify the buffer pointer */
start
=
read_n_cells
(
n_
addr_cells
,
&
memcell_buf
);
size
=
read_n_cells
(
n_
size_cells
,
&
memcell_buf
);
start
=
read_n_cells
(
addr_cells
,
&
memcell_buf
);
size
=
read_n_cells
(
size_cells
,
&
memcell_buf
);
numa_domain
=
of_node_numa_domain
(
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