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
458163b3
Commit
458163b3
authored
Jan 17, 2003
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PPC32: Use a per-cpu variable for prof_counter and prof_multiplier.
parent
5f8a8bf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
arch/ppc/kernel/smp.c
arch/ppc/kernel/smp.c
+6
-4
No files found.
arch/ppc/kernel/smp.c
View file @
458163b3
...
@@ -44,8 +44,8 @@ struct cpuinfo_PPC cpu_data[NR_CPUS];
...
@@ -44,8 +44,8 @@ struct cpuinfo_PPC cpu_data[NR_CPUS];
struct
klock_info_struct
klock_info
=
{
KLOCK_CLEAR
,
0
};
struct
klock_info_struct
klock_info
=
{
KLOCK_CLEAR
,
0
};
atomic_t
ipi_recv
;
atomic_t
ipi_recv
;
atomic_t
ipi_sent
;
atomic_t
ipi_sent
;
unsigned
int
prof_multiplier
[
NR_CPUS
]
=
{
[
1
...
NR_CPUS
-
1
]
=
1
}
;
DEFINE_PER_CPU
(
unsigned
int
,
prof_multiplier
)
;
unsigned
int
prof_counter
[
NR_CPUS
]
=
{
[
1
...
NR_CPUS
-
1
]
=
1
}
;
DEFINE_PER_CPU
(
unsigned
int
,
prof_counter
)
;
unsigned
long
cache_decay_ticks
=
HZ
/
100
;
unsigned
long
cache_decay_ticks
=
HZ
/
100
;
unsigned
long
cpu_online_map
=
1UL
;
unsigned
long
cpu_online_map
=
1UL
;
unsigned
long
cpu_possible_map
=
1UL
;
unsigned
long
cpu_possible_map
=
1UL
;
...
@@ -90,9 +90,9 @@ void smp_local_timer_interrupt(struct pt_regs * regs)
...
@@ -90,9 +90,9 @@ void smp_local_timer_interrupt(struct pt_regs * regs)
{
{
int
cpu
=
smp_processor_id
();
int
cpu
=
smp_processor_id
();
if
(
!--
p
rof_counter
[
cpu
]
)
{
if
(
!--
p
er_cpu
(
prof_counter
,
cpu
)
)
{
update_process_times
(
user_mode
(
regs
));
update_process_times
(
user_mode
(
regs
));
p
rof_counter
[
cpu
]
=
prof_multiplier
[
cpu
]
;
p
er_cpu
(
prof_counter
,
cpu
)
=
per_cpu
(
prof_multiplier
,
cpu
)
;
}
}
}
}
...
@@ -327,6 +327,8 @@ static void __devinit smp_store_cpu_info(int id)
...
@@ -327,6 +327,8 @@ static void __devinit smp_store_cpu_info(int id)
/* assume bogomips are same for everything */
/* assume bogomips are same for everything */
c
->
loops_per_jiffy
=
loops_per_jiffy
;
c
->
loops_per_jiffy
=
loops_per_jiffy
;
c
->
pvr
=
mfspr
(
PVR
);
c
->
pvr
=
mfspr
(
PVR
);
per_cpu
(
prof_counter
,
id
)
=
1
;
per_cpu
(
prof_multiplier
,
id
)
=
1
;
}
}
void
__init
smp_prepare_cpus
(
unsigned
int
max_cpus
)
void
__init
smp_prepare_cpus
(
unsigned
int
max_cpus
)
...
...
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