Mark Rutland 57c82954e7 arm64: make cpu number a percpu variable
In the absence of CONFIG_THREAD_INFO_IN_TASK, core code maintains
thread_info::cpu, and low-level architecture code can access this to
build raw_smp_processor_id(). With CONFIG_THREAD_INFO_IN_TASK, core code
maintains task_struct::cpu, which for reasons of hte header soup is not
accessible to low-level arch code.

Instead, we can maintain a percpu variable containing the cpu number.

For both the old and new implementation of raw_smp_processor_id(), we
read a syreg into a GPR, add an offset, and load the result. As the
offset is now larger, it may not be folded into the load, but otherwise
the assembly shouldn't change much.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Cc: James Morse <james.morse@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2016-11-11 18:25:45 +00:00
..
2016-09-28 17:46:57 +02:00
2016-06-27 16:31:25 +01:00
2016-06-27 16:31:25 +01:00
2016-09-12 10:46:07 +01:00
2016-06-27 16:31:25 +01:00
2016-05-16 17:17:24 -07:00
2016-02-24 14:57:27 +00:00
2016-02-24 14:57:24 +00:00
2016-08-01 12:23:44 -05:00
2016-08-31 12:31:38 +01:00
2016-11-07 18:15:21 +00:00
2016-11-11 18:25:45 +00:00
2016-04-20 12:22:42 +01:00