aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2024-06-10 13:45:29 +0200
committerVasily Gorbik <gor@linux.ibm.com>2024-06-18 17:01:33 +0200
commiteb28ec2b2e55c58148fa07eb994af11e6099e748 (patch)
treea17d186cd7440bd0ae0b39095ce1dd9492392338
parents390/nmi: Remove duplicate get_lowcore() calls (diff)
downloadwireguard-linux-eb28ec2b2e55c58148fa07eb994af11e6099e748.tar.xz
wireguard-linux-eb28ec2b2e55c58148fa07eb994af11e6099e748.zip
s390/smp: Remove duplicate get_lowcore() calls
Assign the output from get_lowcore() to a local variable, so the code is easier to read. Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
-rw-r--r--arch/s390/kernel/smp.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index ebe4bc326a6b..4c2faab56eb6 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -842,15 +842,16 @@ void __init smp_detect_cpus(void)
*/
static void smp_start_secondary(void *cpuvoid)
{
+ struct lowcore *lc = get_lowcore();
int cpu = raw_smp_processor_id();
- get_lowcore()->last_update_clock = get_tod_clock();
- get_lowcore()->restart_stack = (unsigned long)restart_stack;
- get_lowcore()->restart_fn = (unsigned long)do_restart;
- get_lowcore()->restart_data = 0;
- get_lowcore()->restart_source = -1U;
- get_lowcore()->restart_flags = 0;
- restore_access_regs(get_lowcore()->access_regs_save_area);
+ lc->last_update_clock = get_tod_clock();
+ lc->restart_stack = (unsigned long)restart_stack;
+ lc->restart_fn = (unsigned long)do_restart;
+ lc->restart_data = 0;
+ lc->restart_source = -1U;
+ lc->restart_flags = 0;
+ restore_access_regs(lc->access_regs_save_area);
cpu_init();
rcutree_report_cpu_starting(cpu);
init_cpu_timer();
@@ -987,10 +988,12 @@ void __init smp_prepare_boot_cpu(void)
void __init smp_setup_processor_id(void)
{
+ struct lowcore *lc = get_lowcore();
+
pcpu_devices[0].address = stap();
- get_lowcore()->cpu_nr = 0;
- get_lowcore()->spinlock_lockval = arch_spin_lockval(0);
- get_lowcore()->spinlock_index = 0;
+ lc->cpu_nr = 0;
+ lc->spinlock_lockval = arch_spin_lockval(0);
+ lc->spinlock_index = 0;
}
/*