Merge branch 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc
authorLinus Torvalds <torvalds@woody.osdl.org>
Tue, 9 Jan 2007 17:35:16 +0000 (09:35 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Tue, 9 Jan 2007 17:35:16 +0000 (09:35 -0800)
* 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Fix bugs in the hypervisor call stats code
  [POWERPC] Fix corruption in hcall9
  [POWERPC] iSeries: fix setup initcall
  [POWERPC] iSeries: fix viopath initialisation
  [POWERPC] iSeries: fix lpevents initialisation
  [POWERPC] iSeries: fix proc/iSeries initialisation
  [POWERPC] iSeries: fix mf proc initialisation
  [POWERPC] disable PReP and EFIKA during make oldconfig
  [POWERPC] Fix mpc52xx serial driver to work for arch/ppc again
  [POWERPC] Don't include powerpc/sysdev/rom.o for arch/ppc builds
  [POWERPC] Fix mpc52xx fdt to use correct device_type for sound devices
  [POWERPC] 52xx: Don't use device_initcall to probe of_platform_bus
  [POWERPC] Add legacy iSeries to ppc64_defconfig
  [POWERPC] Update ppc64_defconfig
  [POWERPC] Fix manual assembly WARN_ON() in enter_rtas().
  [POWERPC] Avoid calling get_irq_server() with a real, not virtual irq.
  [POWERPC] Fix unbalanced uses of of_node_put
  [POWERPC] Fix bogus BUG_ON() in in hugetlb_get_unmapped_area()

arch/s390/kernel/head31.S
arch/s390/kernel/head64.S
arch/s390/kernel/setup.c
arch/s390/kernel/smp.c
arch/s390/lib/uaccess_pt.c
arch/s390/lib/uaccess_std.c
drivers/pci/quirks.c
drivers/s390/char/vmcp.c
drivers/s390/cio/cio.c
include/asm-s390/futex.h

index 4388b3309e0cbac3d3879e504d18021c32733378..eca507050e47db9e575df233afbda59b0ed45cc7 100644 (file)
@@ -164,11 +164,14 @@ startup_continue:
        srl     %r7,28
        clr     %r6,%r7                 # compare cc with last access code
        be      .Lsame-.LPG1(%r13)
-       b       .Lchkmem-.LPG1(%r13)
+       lhi     %r8,0                   # no program checks
+       b       .Lsavchk-.LPG1(%r13)
 .Lsame:
        ar      %r5,%r1                 # add 128KB to end of chunk
        bno     .Lloop-.LPG1(%r13)      # r1 < 0x80000000 -> loop
 .Lchkmem:                              # > 2GB or tprot got a program check
+       lhi     %r8,1                   # set program check flag
+.Lsavchk:
        clr     %r4,%r5                 # chunk size > 0?
        be      .Lchkloop-.LPG1(%r13)
        st      %r4,0(%r3)              # store start address of chunk
@@ -190,8 +193,15 @@ startup_continue:
        je      .Ldonemem               # if not, leave
        chi     %r10,0                  # do we have chunks left?
        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
        lr      %r4,%r5                 # potential new chunk
+.Llpcnt:
        clr     %r5,%r9                 # should we go on?
        jl      .Lloop
 .Ldonemem:
index c526279e11239dc65e5c8c8a0b585d3ca1556a04..6ba3f4512dd1a1ad26a4d4e0993c9b6feaaf6bc6 100644 (file)
@@ -172,12 +172,15 @@ startup_continue:
        srl     %r7,28
        clr     %r6,%r7                 # compare cc with last access code
        je      .Lsame
-       j       .Lchkmem
+       lghi    %r8,0                   # no program checks
+       j       .Lsavchk
 .Lsame:
        algr    %r5,%r1                 # add 128KB to end of chunk
                                        # no need to check here,
        brc     12,.Lloop               # this is the same chunk
 .Lchkmem:                              # > 16EB or tprot got a program check
+       lghi    %r8,1                   # set program check flag
+.Lsavchk:
        clgr    %r4,%r5                 # chunk size > 0?
        je      .Lchkloop
        stg     %r4,0(%r3)              # store start address of chunk
@@ -204,8 +207,15 @@ startup_continue:
        chi     %r10, 0                 # do we have chunks left?
        je      .Ldonemem
 .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
        lgr     %r4,%r5                 # potential new chunk
+.Llpcnt:
        clgr    %r5,%r9                 # should we go on?
        jl      .Lloop
 .Ldonemem:
index 49ef206ec8806c6a6dc4ed0b0d9e211979065cf1..5d8ee3baac147e0b153dab2d4ad0152ab22629f9 100644 (file)
@@ -476,7 +476,7 @@ static void __init setup_memory_end(void)
        int i;
 
        memory_size = real_size = 0;
-       max_phys = VMALLOC_END - VMALLOC_MIN_SIZE;
+       max_phys = VMALLOC_END_INIT - VMALLOC_MIN_SIZE;
        memory_end &= PAGE_MASK;
 
        max_mem = memory_end ? min(max_phys, memory_end) : max_phys;
index 19090f7d4f517e6799619bf1b4398d750994285c..c0cd255fddbd04ccce6895bac1cd08b940be8535 100644 (file)
@@ -794,7 +794,10 @@ static int __init topology_init(void)
        int ret;
 
        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)
                        printk(KERN_WARNING "topology_init: register_cpu %d "
                               "failed (%d)\n", cpu, ret);
index 633249c3ba9180ea2aa75534b0b64458a6825191..49c3e46b406573011d591bbcbd36e6825deb0578 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <linux/errno.h>
+#include <linux/hardirq.h>
 #include <linux/mm.h>
 #include <asm/uaccess.h>
 #include <asm/futex.h>
@@ -18,6 +19,8 @@ static inline int __handle_fault(struct mm_struct *mm, unsigned long address,
        struct vm_area_struct *vma;
        int ret = -EFAULT;
 
+       if (in_atomic())
+               return ret;
        down_read(&mm->mmap_sem);
        vma = find_vma(mm, address);
        if (unlikely(!vma))
index bbaca66fa29356af1b0c7ea5589622f28aec4519..56a0214e9928c371c6cce379e599aaf0f61ef8cd 100644 (file)
@@ -258,8 +258,6 @@ int futex_atomic_op(int op, int __user *uaddr, int oparg, int *old)
 {
        int oldval = 0, newval, ret;
 
-       pagefault_disable();
-
        switch (op) {
        case FUTEX_OP_SET:
                __futex_atomic_op("lr %2,%5\n",
@@ -284,7 +282,6 @@ int futex_atomic_op(int op, int __user *uaddr, int oparg, int *old)
        default:
                ret = -ENOSYS;
        }
-       pagefault_enable();
        *old = oldval;
        return ret;
 }
index 8f0322d6f3bf473fd60094073bbd353ed834eaa3..0535efc4f184ac26bcc7cd04447b142fb8db60db 100644 (file)
@@ -1117,10 +1117,11 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_ICH6_1,     asus_h
 static void quirk_sis_96x_smbus(struct pci_dev *dev)
 {
        u8 val = 0;
-       printk(KERN_INFO "Enabling SiS 96x SMBus.\n");
-       pci_read_config_byte(dev, 0x77, &val);
-       pci_write_config_byte(dev, 0x77, val & ~0x10);
        pci_read_config_byte(dev, 0x77, &val);
+       if (val & 0x10) {
+               printk(KERN_INFO "Enabling SiS 96x SMBus.\n");
+               pci_write_config_byte(dev, 0x77, val & ~0x10);
+       }
 }
 
 /*
@@ -1152,11 +1153,12 @@ static void quirk_sis_503(struct pci_dev *dev)
        printk(KERN_WARNING "Uncovering SIS%x that hid as a SIS503 (compatible=%d)\n", devid, sis_96x_compatible);
 
        /*
-        * Ok, it now shows up as a 96x.. The 96x quirks are after
-        * the 503 quirk in the quirk table, so they'll automatically
-        * run and enable things like the SMBus device
+        * Ok, it now shows up as a 96x.. run the 96x quirk by
+        * hand in case it has already been processed.
+        * (depends on link order, which is apparently not guaranteed)
         */
        dev->device = devid;
+       quirk_sis_96x_smbus(dev);
 }
 
 static void __init quirk_sis_96x_compatible(struct pci_dev *dev)
index 1678b6c757ec717d40d298c32ebe3cdceb669cd8..a420cd099041b1f660d1d5fee056bf501b911096 100644 (file)
@@ -117,7 +117,7 @@ vmcp_write(struct file *file, const char __user * buff, size_t count,
                return -ENOMEM;
        }
        debug_text_event(vmcp_debug, 1, cmd);
-       session->resp_size = __cpcmd(cmd, session->response,
+       session->resp_size = cpcmd(cmd, session->response,
                                     session->bufsize,
                                     &session->resp_code);
        up(&session->mutex);
index b471ac4a1bf66a1a50b4a33a1f8ca5619648a1ae..ae1bf231d08945bcad13903266f44ad1a3a00be6 100644 (file)
@@ -880,19 +880,15 @@ static void cio_reset_pgm_check_handler(void)
 static int stsch_reset(struct subchannel_id schid, volatile struct schib *addr)
 {
        int rc;
-       register struct subchannel_id reg1 asm ("1") = schid;
 
        pgm_check_occured = 0;
        s390_reset_pgm_handler = cio_reset_pgm_check_handler;
+       rc = stsch(schid, addr);
+       s390_reset_pgm_handler = NULL;
 
-       asm volatile(
-               "       stsch   0(%2)\n"
-               "       ipm     %0\n"
-               "       srl     %0,28"
-               : "=d" (rc)
-               : "d" (reg1), "a" (addr), "m" (*addr) : "memory", "cc");
+       /* The program check handler could have changed pgm_check_occured */
+       barrier();
 
-       s390_reset_pgm_handler = NULL;
        if (pgm_check_occured)
                return -EIO;
        else
index 5e261e1de6719bb99a638421e63eec8c02e5f79a..5c5d02de49e9ae53fe5728fef181f1657fd4c3dc 100644 (file)
@@ -4,8 +4,8 @@
 #ifdef __KERNEL__
 
 #include <linux/futex.h>
+#include <linux/uaccess.h>
 #include <asm/errno.h>
-#include <asm/uaccess.h>
 
 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)))
                return -EFAULT;
 
+       pagefault_disable();
        ret = uaccess.futex_atomic_op(op, uaddr, oparg, &oldval);
+       pagefault_enable();
 
        if (!ret) {
                switch (cmp) {