aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r--arch/s390/kernel/smp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 3979a6fc0882..b3461e8f1705 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -47,6 +47,7 @@
47#include <asm/lowcore.h> 47#include <asm/lowcore.h>
48#include <asm/sclp.h> 48#include <asm/sclp.h>
49#include <asm/cpu.h> 49#include <asm/cpu.h>
50#include <asm/vdso.h>
50#include "entry.h" 51#include "entry.h"
51 52
52/* 53/*
@@ -506,6 +507,9 @@ static int __cpuinit smp_alloc_lowcore(int cpu)
506 goto out; 507 goto out;
507 lowcore->extended_save_area_addr = (u32) save_area; 508 lowcore->extended_save_area_addr = (u32) save_area;
508 } 509 }
510#else
511 if (vdso_alloc_per_cpu(cpu, lowcore))
512 goto out;
509#endif 513#endif
510 lowcore_ptr[cpu] = lowcore; 514 lowcore_ptr[cpu] = lowcore;
511 return 0; 515 return 0;
@@ -528,6 +532,8 @@ static void smp_free_lowcore(int cpu)
528#ifndef CONFIG_64BIT 532#ifndef CONFIG_64BIT
529 if (MACHINE_HAS_IEEE) 533 if (MACHINE_HAS_IEEE)
530 free_page((unsigned long) lowcore->extended_save_area_addr); 534 free_page((unsigned long) lowcore->extended_save_area_addr);
535#else
536 vdso_free_per_cpu(cpu, lowcore);
531#endif 537#endif
532 free_page(lowcore->panic_stack - PAGE_SIZE); 538 free_page(lowcore->panic_stack - PAGE_SIZE);
533 free_pages(lowcore->async_stack - ASYNC_SIZE, ASYNC_ORDER); 539 free_pages(lowcore->async_stack - ASYNC_SIZE, ASYNC_ORDER);
@@ -670,6 +676,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
670 lowcore = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, lc_order); 676 lowcore = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, lc_order);
671 panic_stack = __get_free_page(GFP_KERNEL); 677 panic_stack = __get_free_page(GFP_KERNEL);
672 async_stack = __get_free_pages(GFP_KERNEL, ASYNC_ORDER); 678 async_stack = __get_free_pages(GFP_KERNEL, ASYNC_ORDER);
679 BUG_ON(!lowcore || !panic_stack || !async_stack);
673#ifndef CONFIG_64BIT 680#ifndef CONFIG_64BIT
674 if (MACHINE_HAS_IEEE) 681 if (MACHINE_HAS_IEEE)
675 save_area = get_zeroed_page(GFP_KERNEL); 682 save_area = get_zeroed_page(GFP_KERNEL);
@@ -683,6 +690,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
683#ifndef CONFIG_64BIT 690#ifndef CONFIG_64BIT
684 if (MACHINE_HAS_IEEE) 691 if (MACHINE_HAS_IEEE)
685 lowcore->extended_save_area_addr = (u32) save_area; 692 lowcore->extended_save_area_addr = (u32) save_area;
693#else
694 BUG_ON(vdso_alloc_per_cpu(smp_processor_id(), lowcore));
686#endif 695#endif
687 set_prefix((u32)(unsigned long) lowcore); 696 set_prefix((u32)(unsigned long) lowcore);
688 local_mcck_enable(); 697 local_mcck_enable();