1. 08 Mar, 2016 5 commits
    • David Hildenbrand's avatar
      KVM: s390: protect VCPU cpu timer with a seqcount · 9c23a131
      David Hildenbrand authored
      For now, only the owning VCPU thread (that has loaded the VCPU) can get a
      consistent cpu timer value when calculating the delta. However, other
      threads might also be interested in a more recent, consistent value. Of
      special interest will be the timer callback of a VCPU that executes without
      having the VCPU loaded and could run in parallel with the VCPU thread.
      
      The cpu timer has a nice property: it is only updated by the owning VCPU
      thread. And speaking about accounting, a consistent value can only be
      calculated by looking at cputm_start and the cpu timer itself in
      one shot, otherwise the result might be wrong.
      
      As we only have one writing thread at a time (owning VCPU thread), we can
      use a seqcount instead of a seqlock and retry if the VCPU refreshed its
      cpu timer. This avoids any heavy locking and only introduces a counter
      update/check plus a handful of smp_wmb().
      
      The owning VCPU thread should never have to retry on reads, and also for
      other threads this might be a very rare scenario.
      
      Please note that we have to use the raw_* variants for locking the seqcount
      as lockdep will produce false warnings otherwise. The rq->lock held during
      vcpu_load/put is also acquired from hardirq context. Lockdep cannot know
      that we avoid potential deadlocks by disabling preemption and thereby
      disable concurrent write locking attempts (via vcpu_put/load).
      Reviewed-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      9c23a131
    • David Hildenbrand's avatar
      KVM: s390: step VCPU cpu timer during kvm_run ioctl · db0758b2
      David Hildenbrand authored
      Architecturally we should only provide steal time if we are scheduled
      away, and not if the host interprets a guest exit. We have to step
      the guest CPU timer in these cases.
      
      In the first shot, we will step the VCPU timer only during the kvm_run
      ioctl. Therefore all time spent e.g. in interception handlers or on irq
      delivery will be accounted for that VCPU.
      
      We have to take care of a few special cases:
      - Other VCPUs can test for pending irqs. We can only report a consistent
        value for the VCPU thread itself when adding the delta.
      - We have to take care of STP sync, therefore we have to extend
        kvm_clock_sync() and disable preemption accordingly
      - During any call to disable/enable/start/stop we could get premeempted
        and therefore get start/stop calls. Therefore we have to make sure we
        don't get into an inconsistent state.
      
      Whenever a VCPU is scheduled out, sleeping, in user space or just about
      to enter the SIE, the guest cpu timer isn't stepped.
      
      Please note that all primitives are prepared to be called from both
      environments (cpu timer accounting enabled or not), although not completely
      used in this patch yet (e.g. kvm_s390_set_cpu_timer() will never be called
      while cpu timer accounting is enabled).
      Signed-off-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      db0758b2
    • David Hildenbrand's avatar
      KVM: s390: abstract access to the VCPU cpu timer · 4287f247
      David Hildenbrand authored
      We want to manually step the cpu timer in certain scenarios in the future.
      Let's abstract any access to the cpu timer, so we can hide the complexity
      internally.
      Signed-off-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      4287f247
    • David Hildenbrand's avatar
      KVM: s390: store cpu id in vcpu->cpu when scheduled in · 01a745ac
      David Hildenbrand authored
      By storing the cpu id, we have a way to verify if the current cpu is
      owning a VCPU.
      Signed-off-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      01a745ac
    • Alexander Yarygin's avatar
      KVM: s390: Add diag "watchdog functions" to trace event decoding · dce382b6
      Alexander Yarygin authored
      DIAG 0x288 may occur now. Let's add its code to the diag table in
      sie.h.
      Signed-off-by: default avatarAlexander Yarygin <yarygin@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      dce382b6
  2. 10 Feb, 2016 18 commits
  3. 09 Feb, 2016 8 commits
  4. 08 Feb, 2016 4 commits
  5. 07 Feb, 2016 5 commits
    • Linus Torvalds's avatar
      Linux 4.5-rc3 · 388f7b1d
      Linus Torvalds authored
      388f7b1d
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · c17dfb01
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "The first real batch of fixes for this release cycle, so there are a
        few more than usual.
      
        Most of these are fixes and tweaks to board support (DT bugfixes,
        etc).  I've also picked up a couple of small cleanups that seemed
        innocent enough that there was little reason to wait (const/
        __initconst and Kconfig deps).
      
        Quite a bit of the changes on OMAP were due to fixes to no longer
        write to rodata from assembly when ARM_KERNMEM_PERMS was enabled, but
        there were also other fixes.
      
        Kirkwood had a bunch of gpio fixes for some boards.  OMAP had RTC
        fixes on OMAP5, and Nomadik had changes to MMC parameters in DT.
      
        All in all, mostly the usual mix of various fixes"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (46 commits)
        ARM: multi_v7_defconfig: enable DW_WATCHDOG
        ARM: nomadik: fix up SD/MMC DT settings
        ARM64: tegra: Add chosen node for tegra132 norrin
        ARM: realview: use "depends on" instead of "if" after prompt
        ARM: tango: use "depends on" instead of "if" after prompt
        ARM: tango: use const and __initconst for smp_operations
        ARM: realview: use const and __initconst for smp_operations
        bus: uniphier-system-bus: revive tristate prompt
        arm64: dts: Add missing DMA Abort interrupt to Juno
        bus: vexpress-config: Add missing of_node_put
        ARM: dts: am57xx: sbc-am57x: correct Eth PHY settings
        ARM: dts: am57xx: cl-som-am57x: fix CPSW EMAC pinmux
        ARM: dts: am57xx: sbc-am57x: fix UART3 pinmux
        ARM: dts: am57xx: cl-som-am57x: update SPI Flash frequency
        ARM: dts: am57xx: cl-som-am57x: set HOST mode for USB2
        ARM: dts: am57xx: sbc-am57x: fix SB-SOM EEPROM I2C address
        ARM: dts: LogicPD Torpedo: Revert Duplicative Entries
        ARM: dts: am437x: pixcir_tangoc: use correct flags for irq types
        ARM: dts: am4372: fix irq type for arm twd and global timer
        ARM: dts: at91: sama5d4 xplained: fix phy0 IRQ type
        ...
      c17dfb01
    • Linus Torvalds's avatar
      Merge branch 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration · 63fee123
      Linus Torvalds authored
      Pull mailbox fixes from Jassi Brar:
      
       - fix getting element from the pcc-channels array by simply indexing
         into it
      
       - prevent building mailbox-test driver for archs that don't have IOMEM
      
      * 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        mailbox: Fix dependencies for !HAS_IOMEM archs
        mailbox: pcc: fix channel calculation in get_pcc_channel()
      63fee123
    • Linus Torvalds's avatar
      Merge tag 'usb-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 46df55ce
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some USB fixes for 4.5-rc3.
      
        The usual, xhci fixes for reported issues, combined with some small
        gadget driver fixes, and a MAINTAINERS file update.  All have been in
        linux-next with no reported issues"
      
      * tag 'usb-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        xhci: harden xhci_find_next_ext_cap against device removal
        xhci: Fix list corruption in urb dequeue at host removal
        usb: host: xhci-plat: fix NULL pointer in probe for device tree case
        usb: xhci-mtk: fix AHB bus hang up caused by roothubs polling
        usb: xhci-mtk: fix bpkts value of LS/HS periodic eps not behind TT
        usb: xhci: apply XHCI_PME_STUCK_QUIRK to Intel Broxton-M platforms
        usb: xhci: set SSIC port unused only if xhci_suspend succeeds
        usb: xhci: add a quirk bit for ssic port unused
        usb: xhci: handle both SSIC ports in PME stuck quirk
        usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.
        Revert "xhci: don't finish a TD if we get a short-transfer event mid TD"
        MAINTAINERS: fix my email address
        usb: dwc2: Fix probe problem on bcm2835
        Revert "usb: dwc2: Move reset into dwc2_get_hwparams()"
        usb: musb: ux500: Fix NULL pointer dereference at system PM
        usb: phy: mxs: declare variable with initialized value
        usb: phy: msm: fix error handling in probe.
      46df55ce
    • Linus Torvalds's avatar
      Merge tag 'staging-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · dacd53c8
      Linus Torvalds authored
      Pull staging and IIO driver fixes from Greg KH:
       "Here are some IIO and staging driver fixes for 4.5-rc3.
      
        All of them, except one, are for IIO drivers, and one is for a speakup
        driver fix caused by some earlier patches, to resolve a reported build
        failure"
      
      * tag 'staging-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        Staging: speakup: Fix allyesconfig build on mn10300
        iio: dht11: Use boottime
        iio: ade7753: avoid uninitialized data
        iio: pressure: mpl115: fix temperature offset sign
        iio: imu: Fix dependencies for !HAS_IOMEM archs
        staging: iio: Fix dependencies for !HAS_IOMEM archs
        iio: adc: Fix dependencies for !HAS_IOMEM archs
        iio: inkern: fix a NULL dereference on error
        iio:adc:ti_am335x_adc Fix buffered mode by identifying as software buffer.
        iio: light: acpi-als: Report data as processed
        iio: dac: mcp4725: set iio name property in sysfs
        iio: add HAS_IOMEM dependency to VF610_ADC
        iio: add IIO_TRIGGER dependency to STK8BA50
        iio: proximity: lidar: correct return value
        iio-light: Use a signed return type for ltr501_match_samp_freq()
      dacd53c8