diff options
author | Paul Burton <paul.burton@imgtec.com> | 2014-07-09 12:48:21 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-07-30 20:48:42 +0200 |
commit | c90e49f26466d1733558b8385f4755a6ee3ddafc (patch) | |
tree | 2f8002a13bfe4471ad38fbfd8ecb220903efc45c /arch/mips/kernel/smp-cps.c | |
parent | 34bd3e6b9831d7ba45b45b2448a7046843068acf (diff) | |
download | lwn-c90e49f26466d1733558b8385f4755a6ee3ddafc.tar.gz lwn-c90e49f26466d1733558b8385f4755a6ee3ddafc.zip |
MIPS: {pm,smp}-cps: use cpu_vpe_id macro
When determining the VPE ID of a CPU, make use of the cpu_vpe_id macro
which will return 0 in a non-MT kernel build. Most code is already doing
so but a couple of places weren't. Fixing this prevents a build failure
for non-MT kernels where struct cpuinfo_mips does not contain the vpe_id
field:
arch/mips/kernel/pm-cps.c: In function 'cps_pm_enter_state':
arch/mips/kernel/pm-cps.c:153:51: error: 'struct cpuinfo_mips' has no
member named 'vpe_id'
vpe_cfg = &core_cfg->vpe_config[current_cpu_data.vpe_id];
arch/mips/kernel/smp-cps.c: In function 'wait_for_sibling_halt':
arch/mips/kernel/smp-cps.c:363:33: error: 'struct cpuinfo_mips' has no
member named 'vpe_id'
unsigned vpe_id = cpu_data[cpu].vpe_id;
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/smp-cps.c')
-rw-r--r-- | arch/mips/kernel/smp-cps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index 949f2c6827a0..f9b53b4eaccb 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c @@ -360,7 +360,7 @@ void play_dead(void) static void wait_for_sibling_halt(void *ptr_cpu) { unsigned cpu = (unsigned)ptr_cpu; - unsigned vpe_id = cpu_data[cpu].vpe_id; + unsigned vpe_id = cpu_vpe_id(&cpu_data[cpu]); unsigned halted; unsigned long flags; |