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
072bd413
Commit
072bd413
authored
Aug 18, 2008
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sparc64: Add JBUS NUMA detection.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
83097aca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
arch/sparc64/mm/init.c
arch/sparc64/mm/init.c
+40
-0
No files found.
arch/sparc64/mm/init.c
View file @
072bd413
...
...
@@ -938,6 +938,10 @@ int of_node_to_nid(struct device_node *dp)
int
count
,
nid
;
u64
grp
;
/* This is the right thing to do on currently supported
* SUN4U NUMA platforms as well, as the PCI controller does
* not sit behind any particular memory controller.
*/
if
(
!
mlgroups
)
return
-
1
;
...
...
@@ -1206,8 +1210,44 @@ out:
return
err
;
}
static
int
__init
numa_parse_jbus
(
void
)
{
unsigned
long
cpu
,
index
;
/* NUMA node id is encoded in bits 36 and higher, and there is
* a 1-to-1 mapping from CPU ID to NUMA node ID.
*/
index
=
0
;
for_each_present_cpu
(
cpu
)
{
numa_cpu_lookup_table
[
cpu
]
=
index
;
numa_cpumask_lookup_table
[
index
]
=
cpumask_of_cpu
(
cpu
);
node_masks
[
index
].
mask
=
~
((
1UL
<<
36UL
)
-
1UL
);
node_masks
[
index
].
val
=
cpu
<<
36UL
;
index
++
;
}
num_node_masks
=
index
;
add_node_ranges
();
for
(
index
=
0
;
index
<
num_node_masks
;
index
++
)
{
allocate_node_data
(
index
);
node_set_online
(
index
);
}
return
0
;
}
static
int
__init
numa_parse_sun4u
(
void
)
{
if
(
tlb_type
==
cheetah
||
tlb_type
==
cheetah_plus
)
{
unsigned
long
ver
;
__asm__
(
"rdpr %%ver, %0"
:
"=r"
(
ver
));
if
((
ver
>>
32UL
)
==
__JALAPENO_ID
||
(
ver
>>
32UL
)
==
__SERRANO_ID
)
return
numa_parse_jbus
();
}
return
-
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