linux/arch/mips/loongson64/loongson-3
Paul Burton f875a832d2 MIPS: Abstract CPU core & VP(E) ID access through accessor functions
We currently have fields in struct cpuinfo_mips for the core & VP(E) ID
of a particular CPU, and various pieces of code directly access those
fields. This patch abstracts such access by introducing accessor
functions cpu_core(), cpu_set_core(), cpu_vpe_id() & cpu_set_vpe_id()
and having code that needs to access these values call those functions
rather than directly accessing the struct cpuinfo_mips fields. This
prepares us for changes to the way in which those values are stored in
later patches.

The cpu_vpe_id() function is introduced even though we already had a
cpu_vpe_id() macro for a couple of reasons:

  1) It's more consistent with the core, and future cluster, accessors.

  2) It ensures a sensible return type without explicit casts.

  3) It's generally preferable to use functions rather than macros.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17009/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2017-08-30 00:57:26 +02:00
..
Makefile MIPS: Loongson-3: Move chipset ACPI code from drivers to arch 2016-05-13 14:02:13 +02:00
acpi_init.c MIPS: Loongson-3: Move chipset ACPI code from drivers to arch 2016-05-13 14:02:13 +02:00
cop2-ex.c MIPS: Add missing include files 2017-03-08 10:38:06 +01:00
hpet.c MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
irq.c MIPS: Loongson-3: support irq_set_affinity() in i8259 chip 2017-06-29 02:42:23 +02:00
numa.c MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
platform.c MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
smp.c MIPS: Abstract CPU core & VP(E) ID access through accessor functions 2017-08-30 00:57:26 +02:00
smp.h MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00