Commit 599c8531 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] locking problem with __cpcmd.
  [S390] don't call handle_mm_fault() if in an atomic context.
  [S390] Fix vmalloc area size calculation.
  [S390] Fix cpu hotplug (missing 'online' attribute).
  [S390] cio: use barrier() in stsch_reset.
  [S390] memory detection misses 128k.
parents 2f5c33b3 bf3dbdcd
...@@ -164,11 +164,14 @@ startup_continue: ...@@ -164,11 +164,14 @@ startup_continue:
srl %r7,28 srl %r7,28
clr %r6,%r7 # compare cc with last access code clr %r6,%r7 # compare cc with last access code
be .Lsame-.LPG1(%r13) be .Lsame-.LPG1(%r13)
b .Lchkmem-.LPG1(%r13) lhi %r8,0 # no program checks
b .Lsavchk-.LPG1(%r13)
.Lsame: .Lsame:
ar %r5,%r1 # add 128KB to end of chunk ar %r5,%r1 # add 128KB to end of chunk
bno .Lloop-.LPG1(%r13) # r1 < 0x80000000 -> loop bno .Lloop-.LPG1(%r13) # r1 < 0x80000000 -> loop
.Lchkmem: # > 2GB or tprot got a program check .Lchkmem: # > 2GB or tprot got a program check
lhi %r8,1 # set program check flag
.Lsavchk:
clr %r4,%r5 # chunk size > 0? clr %r4,%r5 # chunk size > 0?
be .Lchkloop-.LPG1(%r13) be .Lchkloop-.LPG1(%r13)
st %r4,0(%r3) # store start address of chunk st %r4,0(%r3) # store start address of chunk
...@@ -190,8 +193,15 @@ startup_continue: ...@@ -190,8 +193,15 @@ startup_continue:
je .Ldonemem # if not, leave je .Ldonemem # if not, leave
chi %r10,0 # do we have chunks left? chi %r10,0 # do we have chunks left?
je .Ldonemem je .Ldonemem
chi %r8,1 # program check ?
je .Lpgmchk
lr %r4,%r5 # potential new chunk
alr %r5,%r1 # add 128KB to end of chunk
j .Llpcnt
.Lpgmchk:
alr %r5,%r1 # add 128KB to end of chunk alr %r5,%r1 # add 128KB to end of chunk
lr %r4,%r5 # potential new chunk lr %r4,%r5 # potential new chunk
.Llpcnt:
clr %r5,%r9 # should we go on? clr %r5,%r9 # should we go on?
jl .Lloop jl .Lloop
.Ldonemem: .Ldonemem:
......
...@@ -172,12 +172,15 @@ startup_continue: ...@@ -172,12 +172,15 @@ startup_continue:
srl %r7,28 srl %r7,28
clr %r6,%r7 # compare cc with last access code clr %r6,%r7 # compare cc with last access code
je .Lsame je .Lsame
j .Lchkmem lghi %r8,0 # no program checks
j .Lsavchk
.Lsame: .Lsame:
algr %r5,%r1 # add 128KB to end of chunk algr %r5,%r1 # add 128KB to end of chunk
# no need to check here, # no need to check here,
brc 12,.Lloop # this is the same chunk brc 12,.Lloop # this is the same chunk
.Lchkmem: # > 16EB or tprot got a program check .Lchkmem: # > 16EB or tprot got a program check
lghi %r8,1 # set program check flag
.Lsavchk:
clgr %r4,%r5 # chunk size > 0? clgr %r4,%r5 # chunk size > 0?
je .Lchkloop je .Lchkloop
stg %r4,0(%r3) # store start address of chunk stg %r4,0(%r3) # store start address of chunk
...@@ -204,8 +207,15 @@ startup_continue: ...@@ -204,8 +207,15 @@ startup_continue:
chi %r10, 0 # do we have chunks left? chi %r10, 0 # do we have chunks left?
je .Ldonemem je .Ldonemem
.Lhsaskip: .Lhsaskip:
chi %r8,1 # program check ?
je .Lpgmchk
lgr %r4,%r5 # potential new chunk
algr %r5,%r1 # add 128KB to end of chunk
j .Llpcnt
.Lpgmchk:
algr %r5,%r1 # add 128KB to end of chunk algr %r5,%r1 # add 128KB to end of chunk
lgr %r4,%r5 # potential new chunk lgr %r4,%r5 # potential new chunk
.Llpcnt:
clgr %r5,%r9 # should we go on? clgr %r5,%r9 # should we go on?
jl .Lloop jl .Lloop
.Ldonemem: .Ldonemem:
......
...@@ -476,7 +476,7 @@ static void __init setup_memory_end(void) ...@@ -476,7 +476,7 @@ static void __init setup_memory_end(void)
int i; int i;
memory_size = real_size = 0; memory_size = real_size = 0;
max_phys = VMALLOC_END - VMALLOC_MIN_SIZE; max_phys = VMALLOC_END_INIT - VMALLOC_MIN_SIZE;
memory_end &= PAGE_MASK; memory_end &= PAGE_MASK;
max_mem = memory_end ? min(max_phys, memory_end) : max_phys; max_mem = memory_end ? min(max_phys, memory_end) : max_phys;
......
...@@ -794,7 +794,10 @@ static int __init topology_init(void) ...@@ -794,7 +794,10 @@ static int __init topology_init(void)
int ret; int ret;
for_each_possible_cpu(cpu) { for_each_possible_cpu(cpu) {
ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu); struct cpu *c = &per_cpu(cpu_devices, cpu);
c->hotpluggable = 1;
ret = register_cpu(c, cpu);
if (ret) if (ret)
printk(KERN_WARNING "topology_init: register_cpu %d " printk(KERN_WARNING "topology_init: register_cpu %d "
"failed (%d)\n", cpu, ret); "failed (%d)\n", cpu, ret);
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
*/ */
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/hardirq.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/futex.h> #include <asm/futex.h>
...@@ -18,6 +19,8 @@ static inline int __handle_fault(struct mm_struct *mm, unsigned long address, ...@@ -18,6 +19,8 @@ static inline int __handle_fault(struct mm_struct *mm, unsigned long address,
struct vm_area_struct *vma; struct vm_area_struct *vma;
int ret = -EFAULT; int ret = -EFAULT;
if (in_atomic())
return ret;
down_read(&mm->mmap_sem); down_read(&mm->mmap_sem);
vma = find_vma(mm, address); vma = find_vma(mm, address);
if (unlikely(!vma)) if (unlikely(!vma))
......
...@@ -258,8 +258,6 @@ int futex_atomic_op(int op, int __user *uaddr, int oparg, int *old) ...@@ -258,8 +258,6 @@ int futex_atomic_op(int op, int __user *uaddr, int oparg, int *old)
{ {
int oldval = 0, newval, ret; int oldval = 0, newval, ret;
pagefault_disable();
switch (op) { switch (op) {
case FUTEX_OP_SET: case FUTEX_OP_SET:
__futex_atomic_op("lr %2,%5\n", __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,7 +282,6 @@ int futex_atomic_op(int op, int __user *uaddr, int oparg, int *old)
default: default:
ret = -ENOSYS; ret = -ENOSYS;
} }
pagefault_enable();
*old = oldval; *old = oldval;
return ret; return ret;
} }
......
...@@ -117,7 +117,7 @@ vmcp_write(struct file *file, const char __user * buff, size_t count, ...@@ -117,7 +117,7 @@ vmcp_write(struct file *file, const char __user * buff, size_t count,
return -ENOMEM; return -ENOMEM;
} }
debug_text_event(vmcp_debug, 1, cmd); debug_text_event(vmcp_debug, 1, cmd);
session->resp_size = __cpcmd(cmd, session->response, session->resp_size = cpcmd(cmd, session->response,
session->bufsize, session->bufsize,
&session->resp_code); &session->resp_code);
up(&session->mutex); up(&session->mutex);
......
...@@ -880,19 +880,15 @@ static void cio_reset_pgm_check_handler(void) ...@@ -880,19 +880,15 @@ static void cio_reset_pgm_check_handler(void)
static int stsch_reset(struct subchannel_id schid, volatile struct schib *addr) static int stsch_reset(struct subchannel_id schid, volatile struct schib *addr)
{ {
int rc; int rc;
register struct subchannel_id reg1 asm ("1") = schid;
pgm_check_occured = 0; pgm_check_occured = 0;
s390_reset_pgm_handler = cio_reset_pgm_check_handler; s390_reset_pgm_handler = cio_reset_pgm_check_handler;
rc = stsch(schid, addr);
s390_reset_pgm_handler = NULL;
asm volatile( /* The program check handler could have changed pgm_check_occured */
" stsch 0(%2)\n" barrier();
" ipm %0\n"
" srl %0,28"
: "=d" (rc)
: "d" (reg1), "a" (addr), "m" (*addr) : "memory", "cc");
s390_reset_pgm_handler = NULL;
if (pgm_check_occured) if (pgm_check_occured)
return -EIO; return -EIO;
else else
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/futex.h> #include <linux/futex.h>
#include <linux/uaccess.h>
#include <asm/errno.h> #include <asm/errno.h>
#include <asm/uaccess.h>
static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr) static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
{ {
...@@ -21,7 +21,9 @@ static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr) ...@@ -21,7 +21,9 @@ static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
return -EFAULT; return -EFAULT;
pagefault_disable();
ret = uaccess.futex_atomic_op(op, uaddr, oparg, &oldval); ret = uaccess.futex_atomic_op(op, uaddr, oparg, &oldval);
pagefault_enable();
if (!ret) { if (!ret) {
switch (cmp) { switch (cmp) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment