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
d9a86ecc
Commit
d9a86ecc
authored
Aug 18, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Only allocate cpu structs we really need in topology_init().
parent
ee2ffc81
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
arch/sparc64/kernel/setup.c
arch/sparc64/kernel/setup.c
+13
-10
No files found.
arch/sparc64/kernel/setup.c
View file @
d9a86ecc
...
@@ -678,21 +678,24 @@ void sun_do_break(void)
...
@@ -678,21 +678,24 @@ void sun_do_break(void)
int
serial_console
;
int
serial_console
;
int
stop_a_enabled
=
1
;
int
stop_a_enabled
=
1
;
static
struct
cpu
*
sparc64_cpus
;
static
int
__init
topology_init
(
void
)
static
int
__init
topology_init
(
void
)
{
{
int
i
;
int
i
,
err
;
sparc64_cpus
=
kmalloc
(
NR_CPUS
*
sizeof
(
struct
cpu
),
GFP_KERNEL
);
err
=
-
ENOMEM
;
if
(
!
sparc64_cpus
)
return
-
ENOMEM
;
memset
(
sparc64_cpus
,
0
,
NR_CPUS
*
sizeof
(
struct
cpu
));
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
{
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
{
if
(
cpu_possible
(
i
))
if
(
cpu_possible
(
i
))
{
register_cpu
(
&
sparc64_cpus
[
i
],
i
,
NULL
);
struct
cpu
*
p
=
kmalloc
(
sizeof
(
*
p
),
GFP_KERNEL
);
if
(
p
)
{
memset
(
p
,
0
,
sizeof
(
*
p
));
register_cpu
(
p
,
i
,
NULL
);
err
=
0
;
}
}
return
0
;
}
}
return
err
;
}
}
subsys_initcall
(
topology_init
);
subsys_initcall
(
topology_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