diff options
author | Mark Rutland <[email protected]> | 2016-11-03 20:23:11 +0000 |
---|---|---|
committer | Catalin Marinas <[email protected]> | 2016-11-11 18:25:45 +0000 |
commit | 57c82954e77fa12c1023e87210d2ede77aaa0058 (patch) | |
tree | f038c648ae9e6352b1e7ba0590c2bea37cb56fc2 /lib/timerqueue.c | |
parent | 580efaa7ccfb8c0790dce4396434f0e5ac8d86ee (diff) |
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 <[email protected]>
Tested-by: Laura Abbott <[email protected]>
Cc: James Morse <[email protected]>
Cc: Suzuki K Poulose <[email protected]>
Cc: Will Deacon <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'lib/timerqueue.c')
0 files changed, 0 insertions, 0 deletions