1. 05 Oct, 2013 5 commits
  2. 04 Oct, 2013 16 commits
  3. 03 Oct, 2013 19 commits
    • David Vrabel's avatar
      xen/hvc: allow xenboot console to be used again · a9fbf4d5
      David Vrabel authored
      Commit d0380e6c (early_printk:
      consolidate random copies of identical code) added in 3.10 introduced
      a check for con->index == -1 in early_console_register().
      
      Initialize index to -1 for the xenboot console so earlyprintk=xen
      works again.
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a9fbf4d5
    • David Cohen's avatar
      usb: chipidea: add Intel Clovertrail pci id · a214339d
      David Cohen authored
      Also clean up the last item of the pci id list to be "cleaner".
      Signed-off-by: default avatarDavid Cohen <david.a.cohen@linux.intel.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a214339d
    • Ian Abbott's avatar
      staging: comedi: ni_65xx: (bug fix) confine insn_bits to one subdevice · 677a3156
      Ian Abbott authored
      The `insn_bits` handler `ni_65xx_dio_insn_bits()` has a `for` loop that
      currently writes (optionally) and reads back up to 5 "ports" consisting
      of 8 channels each.  It reads up to 32 1-bit channels but can only read
      and write a whole port at once - it needs to handle up to 5 ports as the
      first channel it reads might not be aligned on a port boundary.  It
      breaks out of the loop early if the next port it handles is beyond the
      final port on the card.  It also breaks out early on the 5th port in the
      loop if the first channel was aligned.  Unfortunately, it doesn't check
      that the current port it is dealing with belongs to the comedi subdevice
      the `insn_bits` handler is acting on.  That's a bug.
      
      Redo the `for` loop to terminate after the final port belonging to the
      subdevice, changing the loop variable in the process to simplify things
      a bit.  The `for` loop could now try and handle more than 5 ports if the
      subdevice has more than 40 channels, but the test `if (bitshift >= 32)`
      ensures it will break out early after 4 or 5 ports (depending on whether
      the first channel is aligned on a port boundary).  (`bitshift` will be
      between -7 and 7 inclusive on the first iteration, increasing by 8 for
      each subsequent operation.)
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Cc: <stable@vger.kernel.org> # 3.10.y 3.11.y 3.12.y
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      677a3156
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/virt/kvm/kvm · 6d15ee49
      Linus Torvalds authored
      Pull kvm NULL deref fix from Gleb Natapov.
      
      * git://git.kernel.org/pub/scm/virt/kvm/kvm:
        Fix NULL dereference in gfn_to_hva_prot()
      6d15ee49
    • Linus Torvalds's avatar
      Merge branch 'for-curr' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · afe05d41
      Linus Torvalds authored
      Pull ARC fix from Vineet Gupta:
       "Chrisitian found/fixed issue with SA_SIGINFO based signal handler
        corrupting the user space registers post after signal handling"
      
      * 'for-curr' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: Fix signal frame management for SA_SIGINFO
      afe05d41
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · c15f5bbc
      Linus Torvalds authored
      Pull powerpc fixes from Ben Herrenschmidt:
       "Here are a few powerpc fixes, all aimed at -stable, found in part
        thanks to the ramping up of a major distro testing and in part thanks
        to the LE guys hitting all sort interesting corner cases.
      
        The most scary are probably the register clobber issues in
        csum_partial_copy_generic(), especially since Anton even had a test
        case for that thing, which didn't manage to hit the bugs :-)
      
        Another highlight is that memory hotplug should work again with these
        fixes.
      
        Oh and the vio modalias one is worse than the cset implies as it
        upsets distro installers, so I've been told at least, which is why I'm
        shooting it to stable"
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc/tm: Switch out userspace PPR and DSCR sooner
        powerpc/tm: Turn interrupts hard off in tm_reclaim()
        powerpc/perf: Fix handling of FAB events
        powerpc/vio: Fix modalias_show return values
        powerpc/iommu: Use GFP_KERNEL instead of GFP_ATOMIC in iommu_init_table()
        powerpc/sysfs: Disable writing to PURR in guest mode
        powerpc: Restore registers on error exit from csum_partial_copy_generic()
        powerpc: Fix parameter clobber in csum_partial_copy_generic()
        powerpc: Fix memory hotplug with sparse vmemmap
      c15f5bbc
    • Michael Neuling's avatar
      powerpc/tm: Switch out userspace PPR and DSCR sooner · e9bdc3d6
      Michael Neuling authored
      When we do a treclaim or trecheckpoint we end up running with userspace
      PPR and DSCR values.  Currently we don't do anything special to avoid
      running with user values which could cause a severe performance
      degradation.
      
      This patch moves the PPR and DSCR save and restore around treclaim and
      trecheckpoint so that we run with user values for a much shorter period.
      More care is taken with the PPR as it's impact is greater than the DSCR.
      
      This is similar to user exceptions, where we run HTM_MEDIUM early to
      ensure that we don't run with a userspace PPR values in the kernel.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Cc: <stable@vger.kernel.org> # 3.9+
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e9bdc3d6
    • Michael Neuling's avatar
      powerpc/tm: Turn interrupts hard off in tm_reclaim() · c69e63b0
      Michael Neuling authored
      We can't take IRQs in tm_reclaim as we might have a bogus r13 and r1.
      
      This turns IRQs hard off in this function.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Cc: <stable@vger.kernel.org> # 3.9+
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c69e63b0
    • Michael Ellerman's avatar
      powerpc/perf: Fix handling of FAB events · a53b27b3
      Michael Ellerman authored
      Commit 4df48999 "Add power8 EBB support" included a bug in the handling
      of the FAB_CRESP_MATCH and FAB_TYPE_MATCH fields.
      
      These values are pulled out of the event code using EVENT_THR_CTL_SHIFT,
      however we were then or'ing that value directly into MMCR1.
      
      This meant we were failing to set the FAB fields correctly, and also
      potentially corrupting the value for PMC4SEL. Leading to no counts for
      the FAB events and incorrect counts for PMC4.
      
      The fix is simply to shift left the FAB value correctly before or'ing it
      with MMCR1.
      Reported-by: default avatarSooraj Ravindran Nair <soonair3@in.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Cc: <stable@vger.kernel.org> # 3.10+
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a53b27b3
    • Prarit Bhargava's avatar
      powerpc/vio: Fix modalias_show return values · e82b89a6
      Prarit Bhargava authored
      modalias_show() should return an empty string on error, not -ENODEV.
      
      This causes the following false and annoying error:
      
      > find /sys/devices -name modalias -print0 | xargs -0 cat >/dev/null
      cat: /sys/devices/vio/4000/modalias: No such device
      cat: /sys/devices/vio/4001/modalias: No such device
      cat: /sys/devices/vio/4002/modalias: No such device
      cat: /sys/devices/vio/4004/modalias: No such device
      cat: /sys/devices/vio/modalias: No such device
      Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: <stable@vger.kernel.org>
      e82b89a6
    • Nishanth Aravamudan's avatar
      powerpc/iommu: Use GFP_KERNEL instead of GFP_ATOMIC in iommu_init_table() · 1cf389df
      Nishanth Aravamudan authored
      Under heavy (DLPAR?) stress, we tripped this panic() in
      arch/powerpc/kernel/iommu.c::iommu_init_table():
      
      	page = alloc_pages_node(nid, GFP_ATOMIC, get_order(sz));
      	if (!page)
      		panic("iommu_init_table: Can't allocate %ld bytes\n", sz);
      
      Before the panic() we got a page allocation failure for an order-2
      allocation. There appears to be memory free, but perhaps not in the
      ATOMIC context. I looked through all the call-sites of
      iommu_init_table() and didn't see any obvious reason to need an ATOMIC
      allocation. Most call-sites in fact have an explicit GFP_KERNEL
      allocation shortly before the call to iommu_init_table(), indicating we
      are not in an atomic context. There is some indirection for some paths,
      but I didn't see any locks indicating that GFP_KERNEL is inappropriate.
      
      With this change under the same conditions, we have not been able to
      reproduce the panic.
      Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: <stable@vger.kernel.org>
      1cf389df
    • Madhavan Srinivasan's avatar
      powerpc/sysfs: Disable writing to PURR in guest mode · d1211af3
      Madhavan Srinivasan authored
      arch/powerpc/kernel/sysfs.c exports PURR with write permission.
      This may be valid for kernel in phyp mode. But writing to
      the file in guest mode causes crash due to a priviledge violation
      Signed-off-by: default avatarMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: <stable@vger.kernel.org>
      d1211af3
    • Paul E. McKenney's avatar
      powerpc: Restore registers on error exit from csum_partial_copy_generic() · 8f21bd00
      Paul E. McKenney authored
      The csum_partial_copy_generic() function saves the PowerPC non-volatile
      r14, r15, and r16 registers for the main checksum-and-copy loop.
      Unfortunately, it fails to restore them upon error exit from this loop,
      which results in silent corruption of these registers in the presumably
      rare event of an access exception within that loop.
      
      This commit therefore restores these register on error exit from the loop.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8f21bd00
    • Paul E. McKenney's avatar
      powerpc: Fix parameter clobber in csum_partial_copy_generic() · d9813c36
      Paul E. McKenney authored
      The csum_partial_copy_generic() uses register r7 to adjust the remaining
      bytes to process.  Unfortunately, r7 also holds a parameter, namely the
      address of the flag to set in case of access exceptions while reading
      the source buffer.  Lacking a quantum implementation of PowerPC, this
      commit instead uses register r9 to do the adjusting, leaving r7's
      pointer uncorrupted.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d9813c36
    • Nathan Fontenot's avatar
      powerpc: Fix memory hotplug with sparse vmemmap · f7e3334a
      Nathan Fontenot authored
      Previous commit 46723bfa... introduced a new config option
      HAVE_BOOTMEM_INFO_NODE that ended up breaking memory hot-remove for ppc
      when sparse vmemmap is not defined.
      
      This patch defines HAVE_BOOTMEM_INFO_NODE for ppc and adds the call to
      register_page_bootmem_info_node. Without this we get a BUG_ON for memory
      hot remove in put_page_bootmem().
      
      This also adds a stub for register_page_bootmem_memmap to allow ppc to build
      with sparse vmemmap defined. Leaving this as a stub is fine since the same
      vmemmap addresses are also handled in vmemmap_populate and as such are
      properly mapped.
      Signed-off-by: default avatarNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: <stable@vger.kernel.org> [v3.9+]
      f7e3334a
    • Gleb Natapov's avatar
      Fix NULL dereference in gfn_to_hva_prot() · a2ac07fe
      Gleb Natapov authored
      gfn_to_memslot() can return NULL or invalid slot. We need to check slot
      validity before accessing it.
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
      a2ac07fe
    • David Herrmann's avatar
      x86/simplefb: Mark framebuffer mem-resources as IORESOURCE_BUSY to avoid bootup warning · 29d274b8
      David Herrmann authored
      IORESOURCE_BUSY is used to mark temporary driver mem-resources
      instead of global regions. This suppresses warnings if regions
      overlap with a region marked as BUSY.
      
      This was always the case for VESA/VGA/EFI framebuffer regions so
      do the same for simplefb regions. The reason we do this is to
      allow device handover to real GPU drivers like
      i915/radeon/nouveau which get the same regions via PCI BARs.
      
      Maybe at some point we will be able to unregister platform
      devices properly during the handover. In this case the simplefb
      region would get removed before the new region is created.
      However, this is currently not the case and would require rather
      huge changes in remove_conflicting_framebuffers(). Add the BUSY
      marker now and try to eventually rewrite the handover for a next release.
      
      Also see kernel/resource.c for more information:
      
        /*
         * if a resource is "BUSY", it's not a hardware resource
         * but a driver mapping of such a resource; we don't want
         * to warn for those; some drivers legitimately map only
         * partial hardware resources. (example: vesafb)
         */
      
      This suppresses warnings like:
      
        ------------[ cut here ]------------
        WARNING: CPU: 2 PID: 199 at arch/x86/mm/ioremap.c:171 __ioremap_caller+0x2e3/0x390()
        Info: mapping multiple BARs. Your kernel is fine.
        Call Trace:
          dump_stack+0x54/0x8d
          warn_slowpath_common+0x7d/0xa0
          warn_slowpath_fmt+0x4c/0x50
          iomem_map_sanity_check+0xac/0xe0
          __ioremap_caller+0x2e3/0x390
          ioremap_wc+0x32/0x40
          i915_driver_load+0x670/0xf50 [i915]
          ...
      Reported-by: default avatarTom Gundersen <teg@jklm.no>
      Tested-by: default avatarTom Gundersen <teg@jklm.no>
      Tested-by: default avatarPavel Roskin <proski@gnu.org>
      Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Link: http://lkml.kernel.org/r/1380724864-1757-1-git-send-email-dh.herrmann@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      29d274b8
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · e6e7fb1f
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "We have a fairly large batch of fixes this time around, mostly just
        due to various platforms all having a fix or two more than usual.
      
        Worth pointing out are:
      
         - A fix for EDMA on Davinci/OMAP where channel allocation broke with
           the DT conversion.  Due to some miscommunication we didn't
           understand the impact of the breakage, so we were pushing back on
           it for 3.12, but it sounds like it's actually breaking quite a few
           people out there.
      
         - A bunch of fixes for Marvell platforms, some straggling fixes for
           merge window fallout and some fixes for a couple of the platforms
           (Netgear RN102 in particular).
      
         - A fix for a race between multi-cluster power management and cpu
           hotplug on Versatile Express.
      
        And a bunch of other smaller fixes that all add up.
      
        We'll be switching over into stricter regressions-only mode from here
        on out"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
        ARM: multi_v7_defconfig: add SDHCI for i.MX
        bus: mvebu-mbus: Fix optional pcie-mem/io-aperture properties
        ARM: mvebu: add missing DT Mbus ranges and relocate PCIe DT nodes for RN102
        ARM: at91: sam9g45: shutdown ddr1 too when rebooting
        MAINTAINERS: ARM: SIRF: use kernel.org mail box
        MAINTAINERS: ARM: SIRF: add missed drivers into maintain list
        ARM: edma: Fix clearing of unused list for DT DMA resources
        ARM: vexpress: tc2: fix hotplug/idle/kexec race on cluster power down
        ARM: dts: sirf: fix interrupt and dma prop of VIP for prima2 and atlas6
        ARM: dts: sirf: fix the ranges of peri-iobrg of prima2
        ARM: dts: makefile: build atlas6-evb.dtb for ARCH_ATLAS6
        ARM: dts: sirf: fix fifosize, clks, dma channels for UART
        ARM: mvebu: Add DT entry for ReadyNAS 102 to use gpio-poweroff driver
        ARM: mvebu: fix ReadyNAS 102 Power button GPIO to make it active high
        ARM: mach-integrator: Add stub for pci_v3_early_init() for !CONFIG_PCI
        ARM: shmobile: Remove #gpio-ranges-cells DT property
        gpio: rcar: Remove #gpio-range-cells DT property usage
        ARM: shmobile: armadillo: fixup ether pinctrl naming
        ARM: shmobile: Lager: add Micrel KSZ8041 PHY fixup
        ARM: shmobile: update SDHI DT compatibility string to the <unit>-<soc> format
        ...
      e6e7fb1f
    • Christian Ruppert's avatar
      ARC: Fix signal frame management for SA_SIGINFO · 10469350
      Christian Ruppert authored
      Previously, when a signal was registered with SA_SIGINFO, parameters 2
      and 3 of the signal handler were written to registers r1 and r2 before
      the register set was saved. This led to corruption of these two
      registers after returning from the signal handler (the wrong values were
      restored).
      With this patch, registers are now saved before any parameters are
      passed, thus maintaining the processor state from before signal entry.
      Signed-off-by: default avatarChristian Ruppert <christian.ruppert@abilis.com>
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      10469350