diff options
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r-- | arch/s390/kernel/smp.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 6f14734abe72..b4b6396e6cf0 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -1041,42 +1041,6 @@ out: | |||
1041 | static SYSDEV_CLASS_ATTR(dispatching, 0644, dispatching_show, | 1041 | static SYSDEV_CLASS_ATTR(dispatching, 0644, dispatching_show, |
1042 | dispatching_store); | 1042 | dispatching_store); |
1043 | 1043 | ||
1044 | /* | ||
1045 | * If the resume kernel runs on another cpu than the suspended kernel, | ||
1046 | * we have to switch the cpu IDs in the logical map. | ||
1047 | */ | ||
1048 | void smp_switch_boot_cpu_in_resume(u32 resume_phys_cpu_id, | ||
1049 | struct _lowcore *suspend_lowcore) | ||
1050 | { | ||
1051 | int cpu, suspend_cpu_id, resume_cpu_id; | ||
1052 | u32 suspend_phys_cpu_id; | ||
1053 | |||
1054 | suspend_phys_cpu_id = __cpu_logical_map[suspend_lowcore->cpu_nr]; | ||
1055 | suspend_cpu_id = suspend_lowcore->cpu_nr; | ||
1056 | |||
1057 | for_each_present_cpu(cpu) { | ||
1058 | if (__cpu_logical_map[cpu] == resume_phys_cpu_id) { | ||
1059 | resume_cpu_id = cpu; | ||
1060 | goto found; | ||
1061 | } | ||
1062 | } | ||
1063 | panic("Could not find resume cpu in logical map.\n"); | ||
1064 | |||
1065 | found: | ||
1066 | printk("Resume cpu ID: %i/%i\n", resume_phys_cpu_id, resume_cpu_id); | ||
1067 | printk("Suspend cpu ID: %i/%i\n", suspend_phys_cpu_id, suspend_cpu_id); | ||
1068 | |||
1069 | __cpu_logical_map[resume_cpu_id] = suspend_phys_cpu_id; | ||
1070 | __cpu_logical_map[suspend_cpu_id] = resume_phys_cpu_id; | ||
1071 | |||
1072 | lowcore_ptr[suspend_cpu_id]->cpu_addr = resume_phys_cpu_id; | ||
1073 | } | ||
1074 | |||
1075 | u32 smp_get_phys_cpu_id(void) | ||
1076 | { | ||
1077 | return __cpu_logical_map[smp_processor_id()]; | ||
1078 | } | ||
1079 | |||
1080 | static int __init topology_init(void) | 1044 | static int __init topology_init(void) |
1081 | { | 1045 | { |
1082 | int cpu; | 1046 | int cpu; |