diff options
| author | Rich Felker <dalias@libc.org> | 2016-02-15 13:30:50 -0500 |
|---|---|---|
| committer | Rich Felker <dalias@libc.org> | 2016-03-17 15:46:12 -0400 |
| commit | 044b81f872169e9549b47ea2b6c94491e6d5f305 (patch) | |
| tree | afe8eac4f0a66f6890f4795d8950d8d6abc671cb /arch/sh/include/asm | |
| parent | 7480e0aabd5f9e6c3e3b72ed206e89284e90f11f (diff) | |
sh: add SMP method selection to device tree pseudo-board
Allow selection of plat_smp_ops based on the enable-method cpu
property from device tree and provide dummy ops for booting with a
device tree that does not enable SMP.
Signed-off-by: Rich Felker <dalias@libc.org>
Diffstat (limited to 'arch/sh/include/asm')
| -rw-r--r-- | arch/sh/include/asm/smp.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sh/include/asm/smp.h b/arch/sh/include/asm/smp.h index 78b0d0f4b24b..1baf0ba96242 100644 --- a/arch/sh/include/asm/smp.h +++ b/arch/sh/include/asm/smp.h | |||
| @@ -69,6 +69,16 @@ static inline int hard_smp_processor_id(void) | |||
| 69 | return mp_ops->smp_processor_id(); | 69 | return mp_ops->smp_processor_id(); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | struct of_cpu_method { | ||
| 73 | const char *method; | ||
| 74 | struct plat_smp_ops *ops; | ||
| 75 | }; | ||
| 76 | |||
| 77 | #define CPU_METHOD_OF_DECLARE(name, _method, _ops) \ | ||
| 78 | static const struct of_cpu_method __cpu_method_of_table_##name \ | ||
| 79 | __used __section(__cpu_method_of_table) \ | ||
| 80 | = { .method = _method, .ops = _ops } | ||
| 81 | |||
| 72 | #else | 82 | #else |
| 73 | 83 | ||
| 74 | #define hard_smp_processor_id() (0) | 84 | #define hard_smp_processor_id() (0) |
