diff options
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/asm-offsets.c | 1 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 1 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 25 | ||||
-rw-r--r-- | arch/s390/kernel/vdso.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/vdso32/clock_gettime.S | 9 | ||||
-rw-r--r-- | arch/s390/kernel/vdso64/clock_getres.S | 4 | ||||
-rw-r--r-- | arch/s390/kernel/vdso64/clock_gettime.S | 10 |
7 files changed, 29 insertions, 23 deletions
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c index 496116cd65ec..e4c99a183651 100644 --- a/arch/s390/kernel/asm-offsets.c +++ b/arch/s390/kernel/asm-offsets.c | |||
@@ -72,6 +72,7 @@ int main(void) | |||
72 | /* constants used by the vdso */ | 72 | /* constants used by the vdso */ |
73 | DEFINE(__CLOCK_REALTIME, CLOCK_REALTIME); | 73 | DEFINE(__CLOCK_REALTIME, CLOCK_REALTIME); |
74 | DEFINE(__CLOCK_MONOTONIC, CLOCK_MONOTONIC); | 74 | DEFINE(__CLOCK_MONOTONIC, CLOCK_MONOTONIC); |
75 | DEFINE(__CLOCK_THREAD_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID); | ||
75 | DEFINE(__CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC); | 76 | DEFINE(__CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC); |
76 | BLANK(); | 77 | BLANK(); |
77 | /* idle data offsets */ | 78 | /* idle data offsets */ |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 4444875266ee..0f3d44ecbfc6 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -1023,6 +1023,7 @@ void __init setup_arch(char **cmdline_p) | |||
1023 | setup_vmcoreinfo(); | 1023 | setup_vmcoreinfo(); |
1024 | setup_lowcore(); | 1024 | setup_lowcore(); |
1025 | 1025 | ||
1026 | smp_fill_possible_mask(); | ||
1026 | cpu_init(); | 1027 | cpu_init(); |
1027 | s390_init_cpu_topology(); | 1028 | s390_init_cpu_topology(); |
1028 | 1029 | ||
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index dc4a53465060..958704798f4a 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -721,18 +721,14 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle) | |||
721 | return 0; | 721 | return 0; |
722 | } | 722 | } |
723 | 723 | ||
724 | static int __init setup_possible_cpus(char *s) | 724 | static unsigned int setup_possible_cpus __initdata; |
725 | { | ||
726 | int max, cpu; | ||
727 | 725 | ||
728 | if (kstrtoint(s, 0, &max) < 0) | 726 | static int __init _setup_possible_cpus(char *s) |
729 | return 0; | 727 | { |
730 | init_cpu_possible(cpumask_of(0)); | 728 | get_option(&s, &setup_possible_cpus); |
731 | for (cpu = 1; cpu < max && cpu < nr_cpu_ids; cpu++) | ||
732 | set_cpu_possible(cpu, true); | ||
733 | return 0; | 729 | return 0; |
734 | } | 730 | } |
735 | early_param("possible_cpus", setup_possible_cpus); | 731 | early_param("possible_cpus", _setup_possible_cpus); |
736 | 732 | ||
737 | #ifdef CONFIG_HOTPLUG_CPU | 733 | #ifdef CONFIG_HOTPLUG_CPU |
738 | 734 | ||
@@ -775,6 +771,17 @@ void __noreturn cpu_die(void) | |||
775 | 771 | ||
776 | #endif /* CONFIG_HOTPLUG_CPU */ | 772 | #endif /* CONFIG_HOTPLUG_CPU */ |
777 | 773 | ||
774 | void __init smp_fill_possible_mask(void) | ||
775 | { | ||
776 | unsigned int possible, cpu; | ||
777 | |||
778 | possible = setup_possible_cpus; | ||
779 | if (!possible) | ||
780 | possible = MACHINE_IS_VM ? 64 : nr_cpu_ids; | ||
781 | for (cpu = 0; cpu < possible && cpu < nr_cpu_ids; cpu++) | ||
782 | set_cpu_possible(cpu, true); | ||
783 | } | ||
784 | |||
778 | void __init smp_prepare_cpus(unsigned int max_cpus) | 785 | void __init smp_prepare_cpus(unsigned int max_cpus) |
779 | { | 786 | { |
780 | /* request the 0x1201 emergency signal external interrupt */ | 787 | /* request the 0x1201 emergency signal external interrupt */ |
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c index a84476f2a9bb..613649096783 100644 --- a/arch/s390/kernel/vdso.c +++ b/arch/s390/kernel/vdso.c | |||
@@ -125,7 +125,7 @@ int vdso_alloc_per_cpu(struct _lowcore *lowcore) | |||
125 | psal[i] = 0x80000000; | 125 | psal[i] = 0x80000000; |
126 | 126 | ||
127 | lowcore->paste[4] = (u32)(addr_t) psal; | 127 | lowcore->paste[4] = (u32)(addr_t) psal; |
128 | psal[0] = 0x20000000; | 128 | psal[0] = 0x02000000; |
129 | psal[2] = (u32)(addr_t) aste; | 129 | psal[2] = (u32)(addr_t) aste; |
130 | *(unsigned long *) (aste + 2) = segment_table + | 130 | *(unsigned long *) (aste + 2) = segment_table + |
131 | _ASCE_TABLE_LENGTH + _ASCE_USER_BITS + _ASCE_TYPE_SEGMENT; | 131 | _ASCE_TABLE_LENGTH + _ASCE_USER_BITS + _ASCE_TYPE_SEGMENT; |
diff --git a/arch/s390/kernel/vdso32/clock_gettime.S b/arch/s390/kernel/vdso32/clock_gettime.S index 5be8e472f57d..65fc3979c2f1 100644 --- a/arch/s390/kernel/vdso32/clock_gettime.S +++ b/arch/s390/kernel/vdso32/clock_gettime.S | |||
@@ -46,18 +46,13 @@ __kernel_clock_gettime: | |||
46 | jnm 3f | 46 | jnm 3f |
47 | a %r0,__VDSO_TK_MULT(%r5) | 47 | a %r0,__VDSO_TK_MULT(%r5) |
48 | 3: alr %r0,%r2 | 48 | 3: alr %r0,%r2 |
49 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ | 49 | al %r0,__VDSO_WTOM_NSEC(%r5) |
50 | al %r1,__VDSO_XTIME_NSEC+4(%r5) | ||
51 | brc 12,4f | ||
52 | ahi %r0,1 | ||
53 | 4: al %r0,__VDSO_WTOM_NSEC(%r5) /* + wall_to_monotonic.nsec */ | ||
54 | al %r1,__VDSO_WTOM_NSEC+4(%r5) | 50 | al %r1,__VDSO_WTOM_NSEC+4(%r5) |
55 | brc 12,5f | 51 | brc 12,5f |
56 | ahi %r0,1 | 52 | ahi %r0,1 |
57 | 5: l %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | 53 | 5: l %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ |
58 | srdl %r0,0(%r2) /* >> tk->shift */ | 54 | srdl %r0,0(%r2) /* >> tk->shift */ |
59 | l %r2,__VDSO_XTIME_SEC+4(%r5) | 55 | l %r2,__VDSO_WTOM_SEC+4(%r5) |
60 | al %r2,__VDSO_WTOM_SEC+4(%r5) | ||
61 | cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */ | 56 | cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */ |
62 | jne 1b | 57 | jne 1b |
63 | basr %r5,0 | 58 | basr %r5,0 |
diff --git a/arch/s390/kernel/vdso64/clock_getres.S b/arch/s390/kernel/vdso64/clock_getres.S index 176e1f75f9aa..34deba7c7ed1 100644 --- a/arch/s390/kernel/vdso64/clock_getres.S +++ b/arch/s390/kernel/vdso64/clock_getres.S | |||
@@ -23,7 +23,9 @@ __kernel_clock_getres: | |||
23 | je 0f | 23 | je 0f |
24 | cghi %r2,__CLOCK_MONOTONIC | 24 | cghi %r2,__CLOCK_MONOTONIC |
25 | je 0f | 25 | je 0f |
26 | cghi %r2,-2 /* CLOCK_THREAD_CPUTIME_ID for this thread */ | 26 | cghi %r2,__CLOCK_THREAD_CPUTIME_ID |
27 | je 0f | ||
28 | cghi %r2,-2 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */ | ||
27 | jne 2f | 29 | jne 2f |
28 | larl %r5,_vdso_data | 30 | larl %r5,_vdso_data |
29 | icm %r0,15,__LC_ECTG_OK(%r5) | 31 | icm %r0,15,__LC_ECTG_OK(%r5) |
diff --git a/arch/s390/kernel/vdso64/clock_gettime.S b/arch/s390/kernel/vdso64/clock_gettime.S index 0add1072ba30..91940ed33a4a 100644 --- a/arch/s390/kernel/vdso64/clock_gettime.S +++ b/arch/s390/kernel/vdso64/clock_gettime.S | |||
@@ -22,7 +22,9 @@ __kernel_clock_gettime: | |||
22 | larl %r5,_vdso_data | 22 | larl %r5,_vdso_data |
23 | cghi %r2,__CLOCK_REALTIME | 23 | cghi %r2,__CLOCK_REALTIME |
24 | je 4f | 24 | je 4f |
25 | cghi %r2,-2 /* CLOCK_THREAD_CPUTIME_ID for this thread */ | 25 | cghi %r2,__CLOCK_THREAD_CPUTIME_ID |
26 | je 9f | ||
27 | cghi %r2,-2 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */ | ||
26 | je 9f | 28 | je 9f |
27 | cghi %r2,__CLOCK_MONOTONIC | 29 | cghi %r2,__CLOCK_MONOTONIC |
28 | jne 12f | 30 | jne 12f |
@@ -35,13 +37,11 @@ __kernel_clock_gettime: | |||
35 | jnz 0b | 37 | jnz 0b |
36 | stck 48(%r15) /* Store TOD clock */ | 38 | stck 48(%r15) /* Store TOD clock */ |
37 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | 39 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ |
38 | lg %r0,__VDSO_XTIME_SEC(%r5) /* tk->xtime_sec */ | 40 | lg %r0,__VDSO_WTOM_SEC(%r5) |
39 | alg %r0,__VDSO_WTOM_SEC(%r5) /* + wall_to_monotonic.sec */ | ||
40 | lg %r1,48(%r15) | 41 | lg %r1,48(%r15) |
41 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 42 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
42 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ | 43 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
43 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ | 44 | alg %r1,__VDSO_WTOM_NSEC(%r5) |
44 | alg %r1,__VDSO_WTOM_NSEC(%r5) /* + wall_to_monotonic.nsec */ | ||
45 | srlg %r1,%r1,0(%r2) /* >> tk->shift */ | 45 | srlg %r1,%r1,0(%r2) /* >> tk->shift */ |
46 | clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */ | 46 | clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */ |
47 | jne 0b | 47 | jne 0b |