diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kernel/head31.S | 12 | ||||
-rw-r--r-- | arch/s390/kernel/head64.S | 12 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 5 | ||||
-rw-r--r-- | arch/s390/lib/uaccess_pt.c | 3 | ||||
-rw-r--r-- | arch/s390/lib/uaccess_std.c | 3 |
6 files changed, 30 insertions, 7 deletions
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S index 4388b3309e0c..eca507050e47 100644 --- a/arch/s390/kernel/head31.S +++ b/arch/s390/kernel/head31.S | |||
@@ -164,11 +164,14 @@ startup_continue: | |||
164 | srl %r7,28 | 164 | srl %r7,28 |
165 | clr %r6,%r7 # compare cc with last access code | 165 | clr %r6,%r7 # compare cc with last access code |
166 | be .Lsame-.LPG1(%r13) | 166 | be .Lsame-.LPG1(%r13) |
167 | b .Lchkmem-.LPG1(%r13) | 167 | lhi %r8,0 # no program checks |
168 | b .Lsavchk-.LPG1(%r13) | ||
168 | .Lsame: | 169 | .Lsame: |
169 | ar %r5,%r1 # add 128KB to end of chunk | 170 | ar %r5,%r1 # add 128KB to end of chunk |
170 | bno .Lloop-.LPG1(%r13) # r1 < 0x80000000 -> loop | 171 | bno .Lloop-.LPG1(%r13) # r1 < 0x80000000 -> loop |
171 | .Lchkmem: # > 2GB or tprot got a program check | 172 | .Lchkmem: # > 2GB or tprot got a program check |
173 | lhi %r8,1 # set program check flag | ||
174 | .Lsavchk: | ||
172 | clr %r4,%r5 # chunk size > 0? | 175 | clr %r4,%r5 # chunk size > 0? |
173 | be .Lchkloop-.LPG1(%r13) | 176 | be .Lchkloop-.LPG1(%r13) |
174 | st %r4,0(%r3) # store start address of chunk | 177 | st %r4,0(%r3) # store start address of chunk |
@@ -190,8 +193,15 @@ startup_continue: | |||
190 | je .Ldonemem # if not, leave | 193 | je .Ldonemem # if not, leave |
191 | chi %r10,0 # do we have chunks left? | 194 | chi %r10,0 # do we have chunks left? |
192 | je .Ldonemem | 195 | je .Ldonemem |
196 | chi %r8,1 # program check ? | ||
197 | je .Lpgmchk | ||
198 | lr %r4,%r5 # potential new chunk | ||
199 | alr %r5,%r1 # add 128KB to end of chunk | ||
200 | j .Llpcnt | ||
201 | .Lpgmchk: | ||
193 | alr %r5,%r1 # add 128KB to end of chunk | 202 | alr %r5,%r1 # add 128KB to end of chunk |
194 | lr %r4,%r5 # potential new chunk | 203 | lr %r4,%r5 # potential new chunk |
204 | .Llpcnt: | ||
195 | clr %r5,%r9 # should we go on? | 205 | clr %r5,%r9 # should we go on? |
196 | jl .Lloop | 206 | jl .Lloop |
197 | .Ldonemem: | 207 | .Ldonemem: |
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index c526279e1123..6ba3f4512dd1 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -172,12 +172,15 @@ startup_continue: | |||
172 | srl %r7,28 | 172 | srl %r7,28 |
173 | clr %r6,%r7 # compare cc with last access code | 173 | clr %r6,%r7 # compare cc with last access code |
174 | je .Lsame | 174 | je .Lsame |
175 | j .Lchkmem | 175 | lghi %r8,0 # no program checks |
176 | j .Lsavchk | ||
176 | .Lsame: | 177 | .Lsame: |
177 | algr %r5,%r1 # add 128KB to end of chunk | 178 | algr %r5,%r1 # add 128KB to end of chunk |
178 | # no need to check here, | 179 | # no need to check here, |
179 | brc 12,.Lloop # this is the same chunk | 180 | brc 12,.Lloop # this is the same chunk |
180 | .Lchkmem: # > 16EB or tprot got a program check | 181 | .Lchkmem: # > 16EB or tprot got a program check |
182 | lghi %r8,1 # set program check flag | ||
183 | .Lsavchk: | ||
181 | clgr %r4,%r5 # chunk size > 0? | 184 | clgr %r4,%r5 # chunk size > 0? |
182 | je .Lchkloop | 185 | je .Lchkloop |
183 | stg %r4,0(%r3) # store start address of chunk | 186 | stg %r4,0(%r3) # store start address of chunk |
@@ -204,8 +207,15 @@ startup_continue: | |||
204 | chi %r10, 0 # do we have chunks left? | 207 | chi %r10, 0 # do we have chunks left? |
205 | je .Ldonemem | 208 | je .Ldonemem |
206 | .Lhsaskip: | 209 | .Lhsaskip: |
210 | chi %r8,1 # program check ? | ||
211 | je .Lpgmchk | ||
212 | lgr %r4,%r5 # potential new chunk | ||
213 | algr %r5,%r1 # add 128KB to end of chunk | ||
214 | j .Llpcnt | ||
215 | .Lpgmchk: | ||
207 | algr %r5,%r1 # add 128KB to end of chunk | 216 | algr %r5,%r1 # add 128KB to end of chunk |
208 | lgr %r4,%r5 # potential new chunk | 217 | lgr %r4,%r5 # potential new chunk |
218 | .Llpcnt: | ||
209 | clgr %r5,%r9 # should we go on? | 219 | clgr %r5,%r9 # should we go on? |
210 | jl .Lloop | 220 | jl .Lloop |
211 | .Ldonemem: | 221 | .Ldonemem: |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 49ef206ec880..5d8ee3baac14 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -476,7 +476,7 @@ static void __init setup_memory_end(void) | |||
476 | int i; | 476 | int i; |
477 | 477 | ||
478 | memory_size = real_size = 0; | 478 | memory_size = real_size = 0; |
479 | max_phys = VMALLOC_END - VMALLOC_MIN_SIZE; | 479 | max_phys = VMALLOC_END_INIT - VMALLOC_MIN_SIZE; |
480 | memory_end &= PAGE_MASK; | 480 | memory_end &= PAGE_MASK; |
481 | 481 | ||
482 | max_mem = memory_end ? min(max_phys, memory_end) : max_phys; | 482 | max_mem = memory_end ? min(max_phys, memory_end) : max_phys; |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 19090f7d4f51..c0cd255fddbd 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -794,7 +794,10 @@ static int __init topology_init(void) | |||
794 | int ret; | 794 | int ret; |
795 | 795 | ||
796 | for_each_possible_cpu(cpu) { | 796 | for_each_possible_cpu(cpu) { |
797 | ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu); | 797 | struct cpu *c = &per_cpu(cpu_devices, cpu); |
798 | |||
799 | c->hotpluggable = 1; | ||
800 | ret = register_cpu(c, cpu); | ||
798 | if (ret) | 801 | if (ret) |
799 | printk(KERN_WARNING "topology_init: register_cpu %d " | 802 | printk(KERN_WARNING "topology_init: register_cpu %d " |
800 | "failed (%d)\n", cpu, ret); | 803 | "failed (%d)\n", cpu, ret); |
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c index 633249c3ba91..49c3e46b4065 100644 --- a/arch/s390/lib/uaccess_pt.c +++ b/arch/s390/lib/uaccess_pt.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/hardirq.h> | ||
11 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
12 | #include <asm/uaccess.h> | 13 | #include <asm/uaccess.h> |
13 | #include <asm/futex.h> | 14 | #include <asm/futex.h> |
@@ -18,6 +19,8 @@ static inline int __handle_fault(struct mm_struct *mm, unsigned long address, | |||
18 | struct vm_area_struct *vma; | 19 | struct vm_area_struct *vma; |
19 | int ret = -EFAULT; | 20 | int ret = -EFAULT; |
20 | 21 | ||
22 | if (in_atomic()) | ||
23 | return ret; | ||
21 | down_read(&mm->mmap_sem); | 24 | down_read(&mm->mmap_sem); |
22 | vma = find_vma(mm, address); | 25 | vma = find_vma(mm, address); |
23 | if (unlikely(!vma)) | 26 | if (unlikely(!vma)) |
diff --git a/arch/s390/lib/uaccess_std.c b/arch/s390/lib/uaccess_std.c index bbaca66fa293..56a0214e9928 100644 --- a/arch/s390/lib/uaccess_std.c +++ b/arch/s390/lib/uaccess_std.c | |||
@@ -258,8 +258,6 @@ int futex_atomic_op(int op, int __user *uaddr, int oparg, int *old) | |||
258 | { | 258 | { |
259 | int oldval = 0, newval, ret; | 259 | int oldval = 0, newval, ret; |
260 | 260 | ||
261 | pagefault_disable(); | ||
262 | |||
263 | switch (op) { | 261 | switch (op) { |
264 | case FUTEX_OP_SET: | 262 | case FUTEX_OP_SET: |
265 | __futex_atomic_op("lr %2,%5\n", | 263 | __futex_atomic_op("lr %2,%5\n", |
@@ -284,7 +282,6 @@ int futex_atomic_op(int op, int __user *uaddr, int oparg, int *old) | |||
284 | default: | 282 | default: |
285 | ret = -ENOSYS; | 283 | ret = -ENOSYS; |
286 | } | 284 | } |
287 | pagefault_enable(); | ||
288 | *old = oldval; | 285 | *old = oldval; |
289 | return ret; | 286 | return ret; |
290 | } | 287 | } |