Commit graph

561394 commits

Author SHA1 Message Date
Linus Torvalds 80e0c505b2 Merge branch 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
 "This has Mark Fasheh's patches to fix quota accounting during subvol
  deletion, which we've been working on for a while now.  The patch is
  pretty small but it's a key fix.

  Otherwise it's a random assortment"

* 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  btrfs: fix balance range usage filters in 4.4-rc
  btrfs: qgroup: account shared subtree during snapshot delete
  Btrfs: use btrfs_get_fs_root in resolve_indirect_ref
  btrfs: qgroup: fix quota disable during rescan
  Btrfs: fix race between cleaner kthread and space cache writeout
  Btrfs: fix scrub preventing unused block groups from being deleted
  Btrfs: fix race between scrub and block group deletion
  btrfs: fix rcu warning during device replace
  btrfs: Continue replace when set_block_ro failed
  btrfs: fix clashing number of the enhanced balance usage filter
  Btrfs: fix the number of transaction units needed to remove a block group
  Btrfs: use global reserve when deleting unused block group after ENOSPC
  Btrfs: tests: checking for NULL instead of IS_ERR()
  btrfs: fix signed overflows in btrfs_sync_file
2015-11-27 15:45:45 -08:00
Linus Torvalds 7e4b9359f4 Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security layer fixes from James Morris:
 "A fix for SELinux policy processing (regression introduced by
  commit fa1aa143ac: "selinux: extended permissions for ioctls"), as
  well as a fix for the user-triggerable oops in the Keys code"

* 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  KEYS: Fix handling of stored error in a negatively instantiated user key
  selinux: fix bug in conditional rules handling
2015-11-27 15:27:52 -08:00
Linus Torvalds c64410f3ec ARM: SoC fixes for 4.4-rc
There is a small backlog of at91 patches here, the most significant is
 the addition of some sama5d2 Xplained nodes that were waiting on an MFD include
 file to get merged through another tree. We normally try to sort those out
 before the merge window opens, but the maintainer wasn't aware of that here
 and I decided to merge the changes this time as an exception.
 
 On OMAP a series of audio changes for dra7 missed the merge window but turned
 out to be necessary to fix a boot time imprecise external abort error and to
 get audio working.
 
 The other changes are the usual simple changes, here is a list sorted by
 platform:
 
 at91:
 	removal of a useless defconfig option
 	removal of some legacy DT pieces
 	use of the proper watchdog compatible string
 	update of the MAINTAINERS entries for some Atmel drivers
 drivers/scpi:
 	hide get_scpi_ops in module from built-in code
 imx:
 	add missing .irq_set_type for i.MX GPC irq_chip.
 	fix the wrong spi-num-chipselects settings for Vybrid DSPI devices.
 	fix a merge error in Vybrid dts regarding to ADC device property
 keystone:
         fix the optional PDSP firmware loading
         fix linking RAM setup for QMs
         fix crash with clk_ignore_unused
 mediatek:
 	Enable SCPSYS power domain driver by default
 mvebu:
 	fix QNAP TS219 power-off in dts
 	fix legacy get_irqnr_and_base for dove and orion5x
 omap:
 	fix l4 related boot time errors for dm81xx
 	use lockless cldm/pwrdm api in omap4_boot_secondary
 	remove t410 abort handler to avoid hiding other critical errors
 	mark cpuidle tracepoints as _rcuidle
 	fix module alias for omap-ocp2scp
 pxa:
 	palm: Fix typos in PWM lookup table code
 renesas:
 	missing __initconst annotation for r8a7793_boards_compat_dt
 rockchip:
 	disable mmc-tuning on the veyron-minnie board
 	adding the init state for the over-temperature-protection
 zx:
 	only build power domain code when CONFIG_PM=y
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIVAwUAVljO8GCrR//JCVInAQJiuw//SajRIsmVRbsAKip0ujaiZnO32X2NqGL1
 r2r+GJfF0giLO+ln8A1nN+IPzA6jOdTOUY9tPYr21yof/5v92VtvpAn/e6hW3VjY
 nA+4VQm6PbcXJPaugJMp5wEyr74LJWpb13dA6u0KXAuc3/iASfKwRAIUCEvzS6tp
 dPr/d4qCGzt+XGoUq5ZqFDt0krmMSRs1AU9OAuDVmnCtZGnZaYw8jPQkqNUCv0D0
 UL4IMtIJEKU1gWaiISrFuKFM+FYuiOzU+1NFcW+dUT4d4ZCzzL7YyNlX5lPxe0BU
 rlkmScGYrz7PblCJnCXOTWqkPq+5YZ9z61uAWwbHeOmJ6Mbkv3a39A1ZzRdAS4on
 OwrPk3y57CpUI1AD1TcMkiaPEN80NIcM6RyU1QielPofbCvPqRKwBXHSnBKJBOiN
 YbSxkDOeQ4redxbFZbwuHnH+sLN+E52DSbK2oeqqmRAFc2idY+39pEXHZzieGq1f
 TuF9EYsHhTeYtnqOCG/+AhnSoLJskarkfqUa8C8If52rYnk6QXruolXbRMw3aKWY
 56l2zo96O4wmnMLvEGC6yFtI+k9L53QK75aIilPOhsiC86oAvjjurz4CZ1zhhQFA
 PZFxf/XJMWauxG0HZIbKxPKPsXTCrBd7GWU7KKBIEi7o9unUMWwtuxYxnHoxZh66
 zGqpNt3NliE=
 =auFT
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "There is a small backlog of at91 patches here, the most significant is
  the addition of some sama5d2 Xplained nodes that were waiting on an
  MFD include file to get merged through another tree.

  We normally try to sort those out before the merge window opens, but
  the maintainer wasn't aware of that here and I decided to merge the
  changes this time as an exception.

  On OMAP a series of audio changes for dra7 missed the merge window but
  turned out to be necessary to fix a boot time imprecise external abort
  error and to get audio working.

  The other changes are the usual simple changes, here is a list sorted
  by platform:

  at91:
	removal of a useless defconfig option
	removal of some legacy DT pieces
	use of the proper watchdog compatible string
	update of the MAINTAINERS entries for some Atmel drivers

  drivers/scpi:
	hide get_scpi_ops in module from built-in code

  imx:
	add missing .irq_set_type for i.MX GPC irq_chip.
	fix the wrong spi-num-chipselects settings for Vybrid DSPI devices.
	fix a merge error in Vybrid dts regarding to ADC device property

  keystone:
        fix the optional PDSP firmware loading
        fix linking RAM setup for QMs
        fix crash with clk_ignore_unused

  mediatek:
	Enable SCPSYS power domain driver by default

  mvebu:
	fix QNAP TS219 power-off in dts
	fix legacy get_irqnr_and_base for dove and orion5x

  omap:
	fix l4 related boot time errors for dm81xx
	use lockless cldm/pwrdm api in omap4_boot_secondary
	remove t410 abort handler to avoid hiding other critical errors
	mark cpuidle tracepoints as _rcuidle
	fix module alias for omap-ocp2scp

  pxa:
	palm: Fix typos in PWM lookup table code

  renesas:
	missing __initconst annotation for r8a7793_boards_compat_dt

  rockchip:
	disable mmc-tuning on the veyron-minnie board
	adding the init state for the over-temperature-protection

  zx:
	only build power domain code when CONFIG_PM=y"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
  ARM: OMAP4+: SMP: use lockless clkdm/pwrdm api in omap4_boot_secondary
  arm: omap2+: add missing HWMOD_NO_IDLEST in 81xx hwmod data
  ARM: orion5x: Fix legacy get_irqnr_and_base
  ARM: dove: Fix legacy get_irqnr_and_base
  soc: Mediatek: Enable SCPSYS power domain driver by default
  ARM: dts: vfxxx: Fix dspi[01] spi-num-chipselects.
  ARM: dts: keystone: k2l: fix kernel crash when clk_ignore_unused is not in bootargs
  soc: ti: knav_qmss_queue: Fix linking RAM setup for queue managers
  soc: ti: use request_firmware_direct() as acc firmware is optional
  ARM: imx: add platform irq type setting in gpc
  ARM: dts: vfxxx: Fix erroneous property in esdhc0 node
  ARM: shmobile: r8a7793: proper constness with __initconst
  scpi: hide get_scpi_ops in module from built-in code
  ARM: zx: only build power domain code when CONFIG_PM=y
  ARM: pxa: palm: Fix typos in PWM lookup table code
  ARM: dts: Kirkwood: Fix QNAP TS219 power-off
  ARM: dts: rockchip: Add OTP gpio pinctrl to rk3288 tsadc node
  ARM: dts: rockchip: temporarily remove emmc hs200 speed from rk3288 minnie
  MAINTAINERS: Atmel drivers: change NAND and ISI entries
  ARM: at91/dt: sama5d2 Xplained: add several devices
  ...
2015-11-27 14:22:03 -08:00
Linus Torvalds a3b11c79ad More power management and ACPI fixes for v4.4-rc3
- Fix a recent regression in the cpufreq core causing it to fail
    to clean up sysfs directories properly on cpufreq driver removal
    (Viresh Kumar).
 
  - Fix a build problem in the SCPI support code recently added to
    the arm_big_little cpufreq driver (Punit Agrawal).
 
  - Fix up the recently added CPPC cpufreq frontend to process the
    CPU coordination information provided by the platform firmware
    correctly (Ashwin Chaugule).
 
  - Fix the intel_pstate driver to behave as intended when switched
    over to the "performance" mode via sysfs if hardware-driven
    P-state selection (HWP) is enabled (Alexandra Yates).
 
  - Fix two rounding errors in the intel_pstate driver that sometimes
    cause it to use lower P-states than requested (Prarit Bhargava).
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJWWH0cAAoJEILEb/54YlRx4CYP/RaAg2GsuMci2odcBy4STJ1p
 /kPd+ocZDFZd9Zen25h4MpI/isSZVLOC4QUvlARhpnP6lril7XlO33vGyvbJYK8E
 ffFjg/XfPfisgTnNqVduHBFAXwLp1yNjjPDzpGNL25MagI9unl37s0oAURmE63/9
 KFWoiKkqaoNh+FbMFBrYPbalikSxVMJ+0jBtCdMZcvhOjIPF/MGRYLLSlcY0vB5t
 dtf3u7GWmPNTm+bQo/nCCGtWwa9plDLGqdkl6HXi10O0lcjAdIZAD6q67KjTxWtt
 CfP/GnU+mGEaBJFhT/xdiHo9x0li//J3WtnWZWKNlgzDddyRsztP1ap+nvx5EzjG
 er+K3fYtrx4iziLxXk6DpxNRUxgT5ZWiSgu19OE8l3sEYI+JieXY01yC1QstkmKy
 aQKmTmPAE2tFvTYIwwcSlW5g3zN1QlA+r7kh0PNyY34cUfrQX6TXxL+V31X1bQct
 u1VVKNyLu+6+ukwSTQR+qWskvsbh2+CUeKYCssQinYOrVddC30cD5G66bEms6j+3
 Y1NxhXD7Cm1qufuypikR/YzThmkBIATRrivsQTqXcl6N/BFDEOhpJLpI8dLX90RD
 bHf95yIRSt29NBOf2tGUu9iYCFGKvTdwmmwqpF3EmYwjbSdPVmTOIkffCJrwp2PK
 5H2Ush0cwwGitQMUFs/p
 =Blij
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more power management and ACPI fixes from Rafael Wysocki:
 "These fix one recent regression (cpufreq core), fix up two features
  added recently (ACPI CPPC support, SCPI support in the arm_big_little
  cpufreq driver) and fix three older bugs in the intel_pstate driver.

  Specifics:

   - Fix a recent regression in the cpufreq core causing it to fail to
     clean up sysfs directories properly on cpufreq driver removal
     (Viresh Kumar).

   - Fix a build problem in the SCPI support code recently added to the
     arm_big_little cpufreq driver (Punit Agrawal).

   - Fix up the recently added CPPC cpufreq frontend to process the CPU
     coordination information provided by the platform firmware
     correctly (Ashwin Chaugule).

   - Fix the intel_pstate driver to behave as intended when switched
     over to the "performance" mode via sysfs if hardware-driven P-state
     selection (HWP) is enabled (Alexandra Yates).

   - Fix two rounding errors in the intel_pstate driver that sometimes
     cause it to use lower P-states than requested (Prarit Bhargava)"

* tag 'pm+acpi-4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  intel_pstate: Fix "performance" mode behavior with HWP enabled
  cpufreq: SCPI: Depend on SCPI clk driver
  cpufreq: intel_pstate: Fix limits->max_perf rounding error
  cpufreq: intel_pstate: Fix limits->max_policy_pct rounding error
  cpufreq: Always remove sysfs cpuX/cpufreq link on ->remove_dev()
  cpufreq: CPPC: Initialize and check CPUFreq CPU co-ord type correctly
2015-11-27 13:12:42 -08:00
Dave Airlie 8c14f72b57 Merge branch 'linux-4.4' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes
Ben Skeggs wrote:
A couple of regression fixes, some more boards whitelisted for a hw bug
workaround, gr/ucode fixes for hangs a user is seeing.

The changes look larger than they actually are due to the ucode binaries
(*.fucN.h) being regenerated.

* 'linux-4.4' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau/volt/pwm/gk104: fix an off-by-one resulting in the voltage not being set
  drm/nouveau/nvif: allow userspace access to its own client object
  drm/nouveau/gr/gf100-: fix oops when calling zbc methods
  drm/nouveau/gr/gf117-: assume no PPC if NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK is zero
  drm/nouveau/gr/gf117-: read NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK from correct GPC
  drm/nouveau/gr/gf100-: split out per-gpc address calculation macro
  drm/nouveau/bios: return actual size of the buffer retrieved via _ROM
  drm/nouveau/instmem: protect instobj list with a spinlock
  drm/nouveau/pci: enable c800 magic for some unknown Samsung laptop
  drm/nouveau/pci: enable c800 magic for Clevo P157SM
2015-11-28 06:50:34 +10:00
Linus Torvalds 1724734079 sound fixes for 4.4-rc3
Here are no big surprises but just all small fixes, mostly
 device-specific quirks for HD-audio and USB-audio:
 - Fix for detection of FireWire DICE Loud devices
 - Intel Broxton HDMI/DP PCI IDs and relevant quirks
 - Noise fixes: Dell XPS13 2015 model, Dell Latitude E6440, Gigabyte
   Z170X mobo
 - Fix the headphone mixer assignment on HP laptops for PulseAudio
 - USB-MIDI fixes for Medeli DD305 and CH345
 - Apply fixup for Acer Aspire One Cloudbook 14
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJWWBBoAAoJEGwxgFQ9KSmk6yAQAIy5Ogu6MWQsaVpC0HcSKO4H
 3PrDLUi7T6/1O9yo/CEULwcGDKKS0Vj/Il1wddsfT6oTFrSrz0LtRN0tVr/5IJhi
 GqWv0WTH9Icu/7oRUs/0bZPa5Xr6DB8/0d5PBA9q8P0aFCQs4+K/az3L5GGUjSdb
 n/VeceTx9Faqcp3XzchvZ9qBHMhAyNmsCA83f47szSBRL1XnxZH7H8AsncxDAxeK
 B9f23FlBuETG1YK1mY4Bsa6jlskTp0DBAN5kmFsEjDQYCjWpW5DdVDj0KIXic33Q
 NcZc5jgZ2qVejwt7i9q5WCy5cGRpFMfF5d5Ro6iR1wLpSELnG9I2+zbToUxQQNCy
 Ilr17KJu0Gb123srjDreS/01seqx/J+WAyuVL4UFKmzc6SvJCSEVac8P2UdE3P46
 uFENe3HGUv+EJqL+TOwip9XFU0byFoO4brkXs86Jl8fhj0y+7Jgbn92GowHiVoi1
 z6m2ob1EX3Rtk1w52echLiqw8sz+EO4sV750olqG3x/4R0j2kdNF6saGxtU1JUN7
 bLBHuiX6I63fw4wAuNTp+g+Q9oQ1v7blQNIVD9SJaFyAArG2I6zW2f6JpRs+zL+b
 h7bLfVgzQmPhSok2/pGUKMagsL4JGXEIy5TUasPJPKhRx6cegC5kjj7N2ajTjmII
 7D0VpDrYLWmPKTE7C5g+
 =ab9W
 -----END PGP SIGNATURE-----

Merge tag 'sound-4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here are no big surprises but just all small fixes, mostly
  device-specific quirks for HD-audio and USB-audio:

   - Fix for detection of FireWire DICE Loud devices
   - Intel Broxton HDMI/DP PCI IDs and relevant quirks
   - Noise fixes: Dell XPS13 2015 model, Dell Latitude E6440, Gigabyte
     Z170X mobo
   - Fix the headphone mixer assignment on HP laptops for PulseAudio
   - USB-MIDI fixes for Medeli DD305 and CH345
   - Apply fixup for Acer Aspire One Cloudbook 14"

* tag 'sound-4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix noise on Gigabyte Z170X mobo
  ALSA: hda - Fix headphone noise after Dell XPS 13 resume back from S3
  ALSA: hda - Apply HP headphone fixups more generically
  ALSA: hda - Add fixup for Acer Aspire One Cloudbook 14
  ALSA: hda - apply SKL display power request/release patch to BXT
  ALSA: hda - add PCI IDs for Intel Broxton
  ALSA: usb-audio: work around CH345 input SysEx corruption
  ALSA: usb-audio: prevent CH345 multiport output SysEx corruption
  ALSA: usb-audio: add packet size quirk for the Medeli DD305
  ALSA: dice: fix detection of Loud devices
  ALSA: hda - Fix noise on Dell Latitude E6440
2015-11-27 11:59:02 -08:00
Linus Torvalds 5d8686276a arm64 fixes:
- Build fix when !CONFIG_UID16 (the patch is touching generic files but
   it only affects arm64 builds; submitted by Arnd Bergmann)
 
 - EFI fixes to deal with early_memremap() returning NULL and correctly
   mapping run-time regions
 
 - Fix CPUID register extraction of unsigned fields (not to be
   sign-extended)
 
 - ASID allocator fix to deal with long-running tasks over multiple
   generation roll-overs
 
 - Revert support for marking page ranges as contiguous PTEs (it leads to
   TLB conflicts and requires additional non-trivial kernel changes)
 
 - Proper early_alloc() failure check
 
 - Disable KASan for 48-bit VA and 16KB page configuration (the pgd is
   larger than the KASan shadow memory)
 
 - Update the fault_info table (original descriptions based on early
   engineering spec)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWWJiuAAoJEGvWsS0AyF7xlWIP/3ma+ZSyitIS0FWOld/uo3c1
 KbH9i7DrEL9tOzz4AhkKHBA7LOs0NvNkjz2sPLbnVg57H6r2y6Bi1ls5ODUWFy6y
 CKI0aaCYhWPyYWDq6H9NfD5Xh6jx0+45dMqKiCy1mvpChEwPfW4aZGceKptNbBrG
 v0VG1H5s0U+SjNqKqZ3W/hbwyQ1ZvAXJ022q7/ihPt6s2U0ebjXqc+6S2TcJyWNn
 C0bDn40+MK7p8jqRrq80bAjAvC5yDQ7/o7fBsNzsVYhuNTA3HR5CG1jGMJwGcVvA
 NJt71vfBq8L4PT2ndt8BxC5G500GdkQk2Nb2i1G9EgakH8Yv5Y2deFTUFDYPTHBg
 EfUgORet2iBiCcLY+lLTonjKICsHi4Bn//DsyyEZ7HXAovS0DIH3rQfKubYNlT3p
 FR2eskr3cDoQei3L9u0YU1zn+OuWRS7yJdjisjcTAEFaRBKqRXYMoczhVvJPb5xQ
 RPtHZNAS0JXH+0Cmdo+nHjSfpEo20nefBvd3Xvs0jvwWKxS6rwexxQWYTKNTbycq
 5iTYOGXlequnyTztK5M0AcfAajE+EVT2mAXkD/C727tUdO7yiCh86CNLIREHK8sH
 cLnc2iJ12IsJmqV7uRPI5YjNmYau7ZQpfcRfflt1LlL7mx1VmSiyb4JeomGEE/gu
 IdJ1iBl2JGguat1DHIXU
 =YgtU
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Build fix when !CONFIG_UID16 (the patch is touching generic files but
   it only affects arm64 builds; submitted by Arnd Bergmann)

 - EFI fixes to deal with early_memremap() returning NULL and correctly
   mapping run-time regions

 - Fix CPUID register extraction of unsigned fields (not to be
   sign-extended)

 - ASID allocator fix to deal with long-running tasks over multiple
   generation roll-overs

 - Revert support for marking page ranges as contiguous PTEs (it leads
   to TLB conflicts and requires additional non-trivial kernel changes)

 - Proper early_alloc() failure check

 - Disable KASan for 48-bit VA and 16KB page configuration (the pgd is
   larger than the KASan shadow memory)

 - Update the fault_info table (original descriptions based on early
   engineering spec)

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: efi: fix initcall return values
  arm64: efi: deal with NULL return value of early_memremap()
  arm64: debug: Treat the BRPs/WRPs as unsigned
  arm64: cpufeature: Track unsigned fields
  arm64: cpufeature: Add helpers for extracting unsigned values
  Revert "arm64: Mark kernel page ranges contiguous"
  arm64: mm: keep reserved ASIDs in sync with mm after multiple rollovers
  arm64: KASAN depends on !(ARM64_16K_PAGES && ARM64_VA_BITS_48)
  arm64: efi: correctly map runtime regions
  arm64: mm: fix fault_info table xFSC decoding
  arm64: fix building without CONFIG_UID16
  arm64: early_alloc: Fix check for allocation failure
2015-11-27 11:09:59 -08:00
Linus Torvalds 5a44ed0d30 nios2 fix for v4.4-rc3
nios2: fix cache coherency
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWWH/qAAoJEFWoEK+e3syCt3YP/2dW6s/aMrsTyyAtMF5YEHhx
 9xCSvkU8cXe9RFg9TUTdulRRP4z9LBB5+azVx2rbdsr3tvjH99PG/rYGIQ8kiCyx
 UibGu6QeWtQBnDtXqe5nffLTBK3JzuOxOiVRw+R6UW/Vzo5z0TbubWNBJBzC7fyr
 zf0TRtmeRU+/V9V+7TFIrpzI8htomH/b37q1mpWLfys8cEaTg0AApsBpr6PwFMi3
 zMiFqlObd0G5ZRs1j4OO3EMaDg+baEAn8oSzBT4x/wqhqnFg5Sc3AtsW2jl5Wg1u
 xRCJU+p68xNzXvIdq2hBbaON6iUUbhxdPW92Qxx6grjHmV6jmtvwCLj5roWc83Sd
 VCDKWc62P0ZpILMH2DgR9RPvmtSe6gnRoVHbqWe6/N6hGXx+ltNj3IGcWag2OAMx
 /CFtZeIMyIQvo2QrVd8h1AhdhHHH2yCaQyqplGr3ZtNzJeArpRssGsl1PTrEQIXw
 ie12ECSGePaLnYcxQWABbl4KAj65qtk+oBimNFMVIVPzlFsH5RWL6RjaUbLLJ5ci
 mVAyuYlCUSL9CByUiMPOmOfFMUCa/BAGc46Fv3LfXAINYCF2lXMtdlz6f5CKXdZB
 6rvKD8bYlZBEQ8sCMohtJV6UDGw9nmF7XLqmSOotfDo1c4hbmB1eavQwngXxH+YY
 FYutttwGqNWM8GyuPPtb
 =sBUF
 -----END PGP SIGNATURE-----

Merge tag 'nios2-v4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2

Pull nios2 fix from Ley Foon Tan:
 "nios2: fix cache coherency"

* tag 'nios2-v4.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
  nios2: fix cache coherency
2015-11-27 11:05:50 -08:00
Ralf Baechle c861519fcf MIPS: Fix delay loops which may be removed by GCC.
GCC 4.1 and newer remove empty loops.  This becomes a problem when delay
loops get removed.  Fixed by rewriting to user the proper Linux interface
for such delays.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: John Crispin <blogic@openwrt.org>
2015-11-27 19:20:37 +01:00
Linus Torvalds 03018ac2bb ARC fixes for 4.4-rc3
- Fix for perf callgraph unwinding causing RCU stalls
  - Fix to enable Linux to run on non-default Interrupt priority 0
  - Removal of pointless SYNC from __switch_to()
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWWEhjAAoJEGnX8d3iisJewN8P/3emX7r8RBE/W095FwrzXXRP
 QpQf48YKGx8PJIXLCMyj3oiD0ALtmtekSYDPs9E5IOpnli1tBMCIB5ZBGrcfQDYp
 nsowUBEf4Fsaq3cgtOCQFoqcAtdHXGnxQoy6zN1ItfRxdvLDqNjWa9M+h7uDjsPE
 klw7eP/kTiJC+OKRNylOo4w0rRkf/EQntteNIBQ5gznmtN/whNTDaD6t6AbwRrY7
 8Yki1tmN/sKjfpUz7TZH2Tf/qQ/M4sBW4SWIifBk2lxZe1dHduYx6tJPP/PLhAhO
 e2mI96CzeH691erqGbE6weYK5qEm2RTtf3uvv0jycPLg8jcF62C0H6lxB/+u87rD
 ZYIXd51Z6jS1vyG/v2pddj/8MQC7JFJBv7pKmGLtHzihbIZBLHLUcQKYma1p2Jro
 9oxFFtCAWcF+/CwyHNBYhzrIXI7KpZFLvErFkzHf2lQAQy/9kV1zdsaAkCSPzNOq
 3MXHxajUg3er1zl7prduIp1OVil6+WoN6iZm3HAczrZjmqb70zZNodmYHQ32GHlU
 P7k+/j+u3nfORyVZnLVtv4WCrd1IT9gSLLzrdf6CU9Ek7zmgO+spwbTtEslaBWyp
 sn7rinIfXvd7gGDtUgXansr/xMVL0VXt8ZpEjyqgi1a6O/BuC2WDMPtSlWYkU6dd
 fs47GLW868wveV5rakBV
 =iOv3
 -----END PGP SIGNATURE-----

Merge tag 'arc-4.4-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc

Pull ARC fixes from Vineet Gupta:
 - Fix for perf callgraph unwinding causing RCU stalls
 - Fix to enable Linux to run on non-default Interrupt priority 0
 - Removal of pointless SYNC from __switch_to()

* tag 'arc-4.4-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  ARC: dw2 unwind: Remove falllback linear search thru FDE entries
  ARC: remove SYNC from __switch_to()
  ARCv2: Use the default irq priority for idle sleep
  ARC: Abstract out ISA specific SLEEP args
  ARC: comments update
  ARC: switch to arc-linux- CROSS_COMPILE prefix across all configs
2015-11-27 10:08:31 -08:00
Arnd Bergmann a405fd1b1f Two fixes to Rockchip devicetree files, disabling the mmc-tuning
on the veyron-minnie board for now and adding the init state for
 the over-temperature-protection to prevent glitches making the
 system reboot sometimes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABCAAGBQJWUwH+AAoJEPOmecmc0R2B+mgH+gO2h7FwAa4bv8HcbapZDawX
 Pzhu41YxaTZHQEh73waRnGpSVpx5w4r2+pF/fWDC3bRco2zbzAyycPbRwE/9Y7k3
 JUzsu7TaiEqxnxEzqdORoilzlRyqMkgR/bV7Tyj8FaxtH/oKu/1b46A5zVhjcdGt
 zMHAPtapHAWK1ZfdVBzUjUQQ6uoH0v6nx1CaCteU2/an8BiE/kAV+h6tHgv5YXZh
 +cfDChlOYkRO5n+XmUU0Vmq6OKxgJ2N4Rty74aObtLtYzPZZ2PaechUOXRtemWAb
 XZ6E5TCS4DhYOpWVPQZ38DDT/v6YDW17dIx7/hKvWnxvtYE9ILgpYDfx6QGuPx4=
 =Fiye
 -----END PGP SIGNATURE-----

Merge tag 'v4.4-rockchip-dts32-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes

Merge "ARM: rockchip: devicetree fixes for 4.4" from Heiko Stuebner:

Two fixes to Rockchip devicetree files, disabling the mmc-tuning
on the veyron-minnie board for now and adding the init state for
the over-temperature-protection to prevent glitches making the
system reboot sometimes.

* tag 'v4.4-rockchip-dts32-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  ARM: dts: rockchip: Add OTP gpio pinctrl to rk3288 tsadc node
  ARM: dts: rockchip: temporarily remove emmc hs200 speed from rk3288 minnie
2015-11-27 17:41:48 +01:00
Arnd Bergmann 5530f85171 mvebu fixes for 4.4 (part 1)
- Fix QNAP TS219 power-off in dts
 - Fix legacy get_irqnr_and_base for dove and orion5x
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlZXby8ACgkQCwYYjhRyO9WVEACeJmILyNwnLvuKiz438oUUIVNl
 fJgAoJmoowxW96hdIA/KohktJhnN/9Mx
 =9igy
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-fixes-4.4-1' of git://git.infradead.org/linux-mvebu into fixes

Merge "mvebu fixes for 4.4 (part 1)" from Jason Cooper:

- Fix QNAP TS219 power-off in dts
- Fix legacy get_irqnr_and_base for dove and orion5x

* tag 'mvebu-fixes-4.4-1' of git://git.infradead.org/linux-mvebu:
  ARM: orion5x: Fix legacy get_irqnr_and_base
  ARM: dove: Fix legacy get_irqnr_and_base
  ARM: dts: Kirkwood: Fix QNAP TS219 power-off
2015-11-27 17:28:41 +01:00
Arnd Bergmann 97a586d2e3 Renesas ARM Based SoC Fixes for v4.4
* r8a7793 SoC: Annotate r8a7793_boards_compat_dt with __initconst
   Aside from being correct this builds that otherwise
   fail with section mismatch errors.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWV6uiAAoJENfPZGlqN0++oPUP/3NzM25jd+IUnr5+7cZuDSdY
 8/7Bk+C0iZzf3//YLG5VZWpxzpV6wEe6hpTKkCJwSZpd9QMFpGiiNkUZArLMEjl5
 viXPwkFhxS33HsPtl564UahPW4FPEax2i/s33WDcjN9xi7YjTXMxSbPXnwowUzET
 EuUwr7/HQuRsIWfh8BuKNilE0R2zH6pAv3Q/c2ql2dd0OXp8I+Hkv3gNYZMg4qMS
 ZvVfAKbdbpBsFZSzTXFIaFUkPDj/gMiMnh/yy2cGFrFjUz1HNZsS0zUds/UWE3F9
 njZtuY+vYCpxCBupIlnONej1Yy8/8AIU4IqPUQpz/KphsyXLjqCyW+Knuu5ISVN9
 HTdckAxeTulOTiEygE5Ro5YWRPBfp3/sNOQ06gD5Ce2wMH9btMRzE4aMlvQpyyKD
 NGnM4hVu+vClN2O5ftr3UCz+BXKuD8JlBGisnpwRHZc8WB8vYp7KgE3qU4Fs6HXa
 m+GIYoJ3BL6FtsGaB9FyzlflDLm+Ri5W9/e/aItWkxdKWIV4Gto6fym0aewbknyf
 2Gaje4++y/+fiWqPp4cmNknLpeb9fsVqUP+O4UH81ZPeYE9YSvWhLVXatDkfPgrK
 IrWz3S7PKniVsYe0cl4VRkM3oNDdELuMGbkNWlYkVIVUtrjRz6AnSHDEAk7TnnzQ
 RoLwIrnkF3FDchATYxrQ
 =8Y8F
 -----END PGP SIGNATURE-----

Merge tag 'renesas-fixes-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes

Merge "Renesas ARM Based SoC Fixes for v4.4" from Simon Horman:

* r8a7793 SoC: Annotate r8a7793_boards_compat_dt with __initconst
  Aside from being correct this builds that otherwise
  fail with section mismatch errors.

* tag 'renesas-fixes-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: r8a7793: proper constness with __initconst
2015-11-27 17:28:10 +01:00
Rafael J. Wysocki f28a1b0df7 Merge branches 'pm-cpufreq' and 'acpi-cppc'
* pm-cpufreq:
  intel_pstate: Fix "performance" mode behavior with HWP enabled
  cpufreq: SCPI: Depend on SCPI clk driver
  cpufreq: intel_pstate: Fix limits->max_perf rounding error
  cpufreq: intel_pstate: Fix limits->max_policy_pct rounding error
  cpufreq: Always remove sysfs cpuX/cpufreq link on ->remove_dev()

* acpi-cppc:
  cpufreq: CPPC: Initialize and check CPUFreq CPU co-ord type correctly
2015-11-27 16:23:59 +01:00
Martin Sperl 77e8058810 spi: bugfix: spi_message.transfer_length does not get reset
When submitting an identical spi_message multiple times via spi_sync
the spi_message.frame_length does not get reset to 0 in __spi_validate
before adding up all spi_transfer.len resulting in
frame_length > actual_length on all but the first spi_sync call.

Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-27 12:55:22 +00:00
Linus Torvalds 4fe5e199eb xen: bug fixes for 4.4-rc2
- Fix gntdev and numa balancing.
 - Fix x86 boot crash due to unallocated legacy irq descs.
 - Fix overflow in evtchn device when > 1024 event channels.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWV1coAAoJEFxbo/MsZsTROo8H/1D69XtlQmLrAKWq4JafZrXM
 rYQoiRxW/yDNoA3whtOcK4TLf/JpA+B1VAoekXqSEG5Mv9YbIH1Su/y4KwF7WaeX
 xSL812ODeN8iYk8A52Zccw0gdl/emzLesPLuq5UrdDhehYp8vQGtk/CdvZIiQAAc
 of5Ds9ozIuKTcwDkxOZdUrSG0DvCuvhHBz4xrmuKkbs8CAornfQGBUPKb+vkS05b
 2IVzFhCtM2Bhsb8Ji4TfNjsH90T9tghb/QG73APniRMx+hn7CUHkifZ074tnGATp
 LdXCJ8D5C8WZx0QCklzcBZUpXbwWv9AWyZR8gZqhGUCMh9XGgByC3lqsMGFgwiM=
 =5872
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-4.4-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen bug fixes from David Vrabel:

 - Fix gntdev and numa balancing.

 - Fix x86 boot crash due to unallocated legacy irq descs.

 - Fix overflow in evtchn device when > 1024 event channels.

* tag 'for-linus-4.4-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen/evtchn: dynamically grow pending event channel ring
  xen/events: Always allocate legacy interrupts on PV guests
  xen/gntdev: Grant maps should not be subject to NUMA balancing
2015-11-26 11:42:25 -08:00
Linus Torvalds 02a5fec182 powerpc fixes for 4.4 #2
- tm: Block signal return from setting invalid MSR state from Michael Neuling
  - tm: Check for already reclaimed tasks from Michael Neuling
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWVul+AAoJEFHr6jzI4aWAUZAQAK2s+E4WTtcExXSG1bqq05o6
 5wCLtIq6M91h5HDpgBfN7S5OXpRd72ZeIVdzC0HkFeLBF3y7NSHSEezUw4g/GGfz
 K2xGV1CCXC3Rb3qyHSdyi6+c1AnLVRPBVzVxPVmlXigrXeFiQ4613YW9rzf9b8fs
 oktUciwW9aHbrIv7g8f82gpuk9jwwhp/sF+1H/7fGOozT4CFsKo4wj4HOOCBwH4y
 ODEjs6Z+9Uwb6Kfvi/rn3k4XA1wC36WFq3ORI6KrmK/ZB1eR0Kwf0IELYpMj8cOX
 q5ZtCH7t68f9vmEK2B34AUijf/amm+2vLwvF6xAuZJFPUPZtgMBdRcqkLalbtPAO
 8hlyPPgoZcgR/Of+lEYxUobcL0SMNufXwmfwRO35ktkm9Z9Ee96C8NNbpybBSDXL
 YRa6is5MeO4GL8Gbcc0TA50hGjok7o3acGE6HSAReyzf0guQ4xqcif7+6lfWZPkk
 P3aM02ajp2qoqyjhT/Ei6JlMptAiuQY+HvELFneqn5s9nDbv6cGuYZNNap0c1fK+
 74W0p7MiZh7+IF5HpyUIeYV836inXMDIoKzjA6H3OWitk/1lbcrbF34Qpz9zAWZn
 YF3w786ZzzQLw0jcALaqZejm58MLGIakO4MNDB0/ZBh0nKKfEV8WvPOjev78OAp1
 +pDrJh0iQzrujN6OMKQ0
 =IL8A
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

 - tm: Block signal return from setting invalid MSR state from Michael
   Neuling

 - tm: Check for already reclaimed tasks from Michael Neuling

* tag 'powerpc-4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/tm: Check for already reclaimed tasks
  powerpc/tm: Block signal return setting invalid MSR state
2015-11-26 11:19:59 -08:00
David Vrabel 8620015499 xen/evtchn: dynamically grow pending event channel ring
If more than 1024 event channels are bound to a evtchn device then it
possible (even with well behaved applications) for the ring to
overflow and events to be lost (reported as an -EFBIG error).

Dynamically increase the size of the ring so there is always enough
space for all bound events.  Well behaved applicables that only unmask
events after draining them from the ring can thus no longer lose
events.

However, an application could unmask an event before draining it,
allowing multiple entries per port to accumulate in the ring, and a
overflow could still occur.  So the overflow detection and reporting
is retained.

The ring size is initially only 64 entries so the common use case of
an application only binding a few events will use less memory than
before.  The ring size may grow to 512 KiB (enough for all 2^17
possible channels).  This order 7 kmalloc() may fail due to memory
fragmentation, so we fall back to trying vmalloc().

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-11-26 18:49:54 +00:00
Ard Biesheuvel 66362c9afc arm64: efi: fix initcall return values
Even though initcall return values are typically ignored, the
prototype is to return 0 on success or a negative errno value on
error. So fix the arm_enable_runtime_services() implementation to
return 0 on conditions that are not in fact errors, and return a
meaningful error code otherwise.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-11-26 18:15:54 +00:00
Ard Biesheuvel 81d945772a arm64: efi: deal with NULL return value of early_memremap()
Add NULL return value checks to two invocations of early_memremap()
in the UEFI init code. For the UEFI configuration tables, we just
warn since we have a better chance of being able to report the issue
in a way that can actually be noticed by a human operator if we don't
abort right away. For the UEFI memory map, however, all we can do is
panic() since we cannot proceed without a description of memory.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-11-26 18:15:49 +00:00
Suzuki K. Poulose 1944bf8e78 arm64: debug: Treat the BRPs/WRPs as unsigned
IDAA64DFR0_EL1: BRPs and WRPs are unsigned values. Use
the appropriate helpers to extract those fields.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reported-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-11-26 18:08:36 +00:00
Suzuki K. Poulose 4f0a606bce arm64: cpufeature: Track unsigned fields
Some of the feature bits have unsigned values and need
to be treated accordingly to avoid errors. Adds the property
to the feature bits and use the appropriate field extract helpers.

Reported-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-11-26 18:07:59 +00:00
Boris Ostrovsky b4ff8389ed xen/events: Always allocate legacy interrupts on PV guests
After commit 8c058b0b9c ("x86/irq: Probe for PIC presence before
allocating descs for legacy IRQs") early_irq_init() will no longer
preallocate descriptors for legacy interrupts if PIC does not
exist, which is the case for Xen PV guests.

Therefore we may need to allocate those descriptors ourselves.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
2015-11-26 18:05:01 +00:00
Suzuki K. Poulose d211827184 arm64: cpufeature: Add helpers for extracting unsigned values
The cpuid_feature_extract_field() extracts the feature value
as a signed integer. This could be problematic for features
whose values are unsigned. e.g, ID_AA64DFR0_EL1:BRPs. Add
an unsigned variant for the unsigned fields.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reported-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-11-26 18:02:42 +00:00
Boris Ostrovsky 9c17d96500 xen/gntdev: Grant maps should not be subject to NUMA balancing
Doing so will cause the grant to be unmapped and then, during
fault handling, the fault to be mistakenly treated as NUMA hint
fault.

In addition, even if those maps could partcipate in NUMA
balancing, it wouldn't provide any benefit since we are unable
to determine physical page's node (even if/when VNUMA is
implemented).

Marking grant maps' VMAs as VM_IO will exclude them from being
part of NUMA balancing.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
2015-11-26 17:47:35 +00:00
Simon Guinot 3abb1ada21 rtc: ds1307: fix alarm reading at probe time
With the actual code, read_alarm() always returns -EINVAL when called
during the RTC device registration. This prevents from retrieving an
already configured alarm in hardware.

This patch fixes the issue by moving the HAS_ALARM bit configuration
(if supported by the hardware) above the rtc_device_register() call.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-11-26 18:11:26 +01:00
Suman Anna f42f79af16 remoteproc: fix memory leak of remoteproc ida cache layers
The remoteproc core uses a static ida named rproc_dev_index for
assigning an automatic index number to a registered remoteproc.
The ida core may allocate some internal idr cache layers and ida
bitmap upon any ida allocation, and all these layers are truely
freed only upon the ida destruction. The rproc_dev_index ida is
not destroyed at present, leading to a memory leak when using the
remoteproc core as a module and atleast one rproc device is
registered and unregistered.

Fix this by invoking ida_destroy() in the remoteproc core module
exit.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
2015-11-26 17:44:28 +02:00
Catalin Marinas 667c27597c Revert "arm64: Mark kernel page ranges contiguous"
This reverts commit 348a65cdcb.

Incorrect page table manipulation that does not respect the ARM ARM
recommended break-before-make sequence may lead to TLB conflicts. The
contiguous PTE patch makes the system even more susceptible to such
errors by changing the mapping from a single page to a contiguous range
of pages. An additional TLB invalidation would reduce the risk window,
however, the correct fix is to switch to a temporary swapper_pg_dir.
Once the correct workaround is done, the reverted commit will be
re-applied.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Jeremy Linton <jeremy.linton@arm.com>
2015-11-26 15:42:41 +00:00
Will Deacon 0ebea80880 arm64: mm: keep reserved ASIDs in sync with mm after multiple rollovers
Under some unusual context-switching patterns, it is possible to end up
with multiple threads from the same mm running concurrently with
different ASIDs:

1. CPU x schedules task t with mm p containing ASID a and generation g
   This task doesn't block and the CPU doesn't context switch.
   So:
     * per_cpu(active_asid, x) = {g,a}
     * p->context.id = {g,a}

2. Some other CPU generates an ASID rollover. The global generation is
   now (g + 1). CPU x is still running t, with no context switch and
   so per_cpu(reserved_asid, x) = {g,a}

3. CPU y schedules task t', which shares mm p with t. The generation
   mismatches, so we take the slowpath and hit the reserved ASID from
   CPU x. p is then updated so that p->context.id = {g + 1,a}

4. CPU y schedules some other task u, which has an mm != p.

5. Some other CPU generates *another* CPU rollover. The global
   generation is now (g + 2). CPU x is still running t, with no context
   switch and so per_cpu(reserved_asid, x) = {g,a}.

6. CPU y once again schedules task t', but now *fails* to hit the
   reserved ASID from CPU x because of the generation mismatch. This
   results in a new ASID being allocated, despite the fact that t is
   still running on CPU x with the same mm.

Consequently, TLBIs (e.g. as a result of CoW) will not be synchronised
between the two threads.

This patch fixes the problem by updating all of the matching reserved
ASIDs when we hit on the slowpath (i.e. in step 3 above). This keeps
the reserved ASIDs in-sync with the mm and avoids the problem.

Reported-by: Tony Thompson <anthony.thompson@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-11-26 15:27:10 +00:00
Andrey Ryabinin f1b9032f61 arm64: KASAN depends on !(ARM64_16K_PAGES && ARM64_VA_BITS_48)
On KASAN + 16K_PAGES + 48BIT_VA
 arch/arm64/mm/kasan_init.c: In function ‘kasan_early_init’:
 include/linux/compiler.h:484:38: error: call to ‘__compiletime_assert_95’ declared with attribute error: BUILD_BUG_ON failed: !IS_ALIGNED(KASAN_SHADOW_END, PGDIR_SIZE)
    _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)

Currently KASAN will not work on 16K_PAGES and 48BIT_VA, so
forbid such configuration to avoid above build failure.

Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Reported-by: Suzuki K. Poulose <Suzuki.Poulose@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-11-26 15:27:09 +00:00
Ley Foon Tan 8e3d7c834b nios2: fix cache coherency
There is intermittent cache coherency issue caught in toolchian tests.
Revert to use flushd.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2015-11-26 22:25:58 +08:00
Arnd Bergmann 92792e48e2 remoteproc: avoid stack overflow in debugfs file
Recent gcc versions warn about reading from a negative offset of
an on-stack array:

drivers/remoteproc/remoteproc_debugfs.c: In function 'rproc_recovery_write':
drivers/remoteproc/remoteproc_debugfs.c:167:9: warning: 'buf[4294967295u]' may be used uninitialized in this function [-Wmaybe-uninitialized]

I don't see anything in sys_write() that prevents us from
being called with a zero 'count' argument, so we should
add an extra check in rproc_recovery_write() to prevent the
access and avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 2e37abb89a ("remoteproc: create a 'recovery' debugfs entry")
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
2015-11-26 10:07:53 +02:00
James Morris 6e37592900 Merge branch 'upstream' of git://git.infradead.org/users/pcmoore/selinux into for-linus2 2015-11-26 15:04:19 +11:00
Eric Sandeen 77032ca66f Return EBUSY from BLKRRPART for mounted whole-dev fs
Today, blockdev --rereadpt /dev/sda will fail with EBUSY if any
partition of sda is mounted (and will fail with EINVAL if pointed
at a partition).  But it will pass if the entire block device is
formatted with a filesystem and mounted.  I don't think this makes
sense; partitioning should surely not ever change out from under
a mounted device.

So check for bdev->bd_super, and fail that with -EBUSY as well.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
2015-11-25 20:49:24 -07:00
Dave Airlie 2f1371614a Merge branch 'drm-fixes-4.4' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
Radeon and amdgpu fixes for 4.4:
- DPM fixes for r7xx devices
- VCE fixes for Stoney
- GPUVM fixes
- Scheduler fixes

* 'drm-fixes-4.4' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: make some dpm errors debug only
  drm/radeon: make rv770_set_sw_state failures non-fatal
  drm/amdgpu: move dependency handling out of atomic section v2
  drm/amdgpu: optimize scheduler fence handling
  drm/amdgpu: remove vm->mutex
  drm/amdgpu: add mutex for ba_va->valids/invalids
  drm/amdgpu: adapt vce session create interface changes
  drm/amdgpu: vce use multiple cache surface starting from stoney
  drm/amdgpu: reset vce trap interrupt flag
2015-11-26 12:42:15 +10:00
Linus Torvalds 78c4a49a69 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro:
 "A couple of fixes for sendfile lockups caught by Dmitry + a fix for
  ancient sysvfs symlink breakage"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  vfs: Avoid softlockups with sendfile(2)
  vfs: Make sendfile(2) killable even better
  fix sysvfs symlinks
2015-11-25 15:11:08 -08:00
Arnd Bergmann 5597afad8d Fixes for omaps for v4.4-rc cycle:
- A series of audio changes for dra7 that missed the merge window but turned
   out to be necessary to fix a boot time imprecise external abort error and to
   getaudio working
 
 - Fix l4 related boot time errors for dm81xx
 
 - Use lockless cldm/pwrdm api in omap4_boot_secondary
 
 - Remove t410 custom abort handler that is no longer needed and may
   hide other critical errors
 
 - Mark cpuidle tracepoints as _rcuidle
 
 - Fix module alias for omap-ocp2scp
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWVjVUAAoJEBvUPslcq6VzzzEP/2p22nGJhAbAPiXwZpMZflj7
 KXGT5VFMha78RupekGIGXx/qoP+21s7mmgH2qYASzZ0p5BpY73ZkI3e3/R0qYtdn
 ucYAj4CH1ltu9KYtodAqDu6fIYaKkQ+t9lhtU9TB2WcHZ4fv2E+yOkQqTLTBFtot
 f878rD48SSMLxuhbqDao0TOdF30F0RNUmrGkNSQ7Cdda0PHTdN5J03mctS/aj6g+
 Y/Sovd4NLGB5S9TW0iPJppO1S4SI25FuekxAcJ/rfuIfPkoidW09mVZ1s8Sfkfbq
 9JBXffq1Cq442k2XFHerYxC5YEppw1AedM96+J4UADydo2tLCJT88Xjj1sJ3wA5k
 vRqqjZgs+MLqT4FmKy2KcJdZBn/zpw8Mbd4FqN72ij7cpHF5M9e2jZf+Ru5cgLv4
 EgIIWKnlgw1dHwVcI3gh6m2L3magw6av9YdQ2/e7AB9E9oCMKqp8YO5aD9k7afjm
 yYX2L1NJW1nS0ytGFzUvDQZdVsI3INQNBjlvH/mUs9nl7bNkDh04dvjXmc6dJj0k
 WEdRADpxig11Ad8ZFsReNlGFpNOsnqSGpIJAKa0qR3aFoTMa79fortBzQKsz0FZC
 6CAbvOnrPHEQ24BmAfZjvLMeNvTaV4BFG99FrmAJFpTTmAgoA7zSPmTHNSSIIOaw
 6ogUREBuhi6ACi0THosj
 =G8ox
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.4/fixes-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Merge "Fixes for omaps for v4.4-rc cycle" from Tony Lindgren:

- A series of audio changes for dra7 that missed the merge window but turned
  out to be necessary to fix a boot time imprecise external abort error and to
  getaudio working

- Fix l4 related boot time errors for dm81xx

- Use lockless cldm/pwrdm api in omap4_boot_secondary

- Remove t410 custom abort handler that is no longer needed and may
  hide other critical errors

- Mark cpuidle tracepoints as _rcuidle

- Fix module alias for omap-ocp2scp

* tag 'omap-for-v4.4/fixes-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4+: SMP: use lockless clkdm/pwrdm api in omap4_boot_secondary
  arm: omap2+: add missing HWMOD_NO_IDLEST in 81xx hwmod data
  ARM: OMAP2+: remove custom abort handler for t410
  ARM: OMAP: DRA7: hwmod: Add data for McASP3
  ARM: OMAP2+: hwmod: Add hwmod flag for HWMOD_OPT_CLKS_NEEDED
  ARM: dts: dra7: Fix McASP3 node regarding to clocks
  bus: omap-ocp2scp: Fix module alias
  ARM: OMAP2+: PM: Denote the cpuidle tracepoints as _rcuidle()
2015-11-25 23:48:57 +01:00
Arnd Bergmann e6b66dfb37 Few Keystone fixes for 4.4-rcx
- Fix the optional PDSP firmware loading
 	- Fix linking RAM setup for QMs
 	- Fix crash with clk_ignore_unused
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWU1+DAAoJEHJsHOdBp5c/CioP/2vx9Gj/UPRKhxdCkzPeGymr
 9FB6YnNhFNN3iKQSGXBTvbQd177bXtgRruzRuYEZDenoJKHL13FXt4zybZSKgN5m
 jeJ79M/ZCeXnh/oXHdxRekabaxpOhv3tGjp+J4dVkd9v66iTsSzh/6aAsFb+pU/Z
 fyvSUrrxL76O22d4QzeHp20C1dgjLI95HN9vrDY79xeIGbC3T1xzUNP/ljAWIfqJ
 72OkyZ+CGpiqV16o4mzSUmTCrOa7ZyDLPOJqQceZvcSFdnIjYdSK2nIgz8rIDdt6
 W4J/2TmrAwbf60xoY9X/16GjTiloHeq6vlSBEn3Tdz+zSc1x6uSUSmSXsnxEPz+C
 ss8KRd6flTNrKdhA94yWJvwotm+rpb9d2PhBbuIkw5aGxcvNtlrZANxB6Br6mXyo
 P2wapqY4k0z8xR8ZzTE7ZIXHFwZJhzeqfcBaiUkVEnaaZcUh2fJG1INZ9pLImU/m
 KBnPE9xRTfw/7tvZgR9eOIJRETtUKrsE5oMTmEWCsoyGySCy70ElPvcBdMW5Ur3O
 bB9fPcMzYadK0teuy+w6TeGQX4D0aMciE81qbeMJ7Vztp8gs/dxT6p898NhALSlC
 gf9qp0HYdc3w405aq1i0/V/8bh3W0MxVYb6+yfuVu/5v2zUrCj1ebE/2Bky6GluK
 i1LSknADk9bv8iEIeCbf
 =OC3C
 -----END PGP SIGNATURE-----

Merge tag 'keystone-fixes-for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into fixes

Merge "Few Keystone fixes for 4.4-rcx" from Santosh Shilimkar:
	- Fix the optional PDSP firmware loading
	- Fix linking RAM setup for QMs
	- Fix crash with clk_ignore_unused

* tag 'keystone-fixes-for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone:
  ARM: dts: keystone: k2l: fix kernel crash when clk_ignore_unused is not in bootargs
  soc: ti: knav_qmss_queue: Fix linking RAM setup for queue managers
  soc: ti: use request_firmware_direct() as acc firmware is optional
2015-11-25 23:48:12 +01:00
Arnd Bergmann d3de94ba4e Linux 4.4-rc2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWUmHZAAoJEHm+PkMAQRiGHtcH/RVRsn8re0WdRWYaTr9+Hknm
 CGlRJN4LKecttgYQ/2bS1QsDbt8usDPBiiYVopqGXQxPBmjyDAqPjsa+8VzCaVc6
 WA+9LDB+PcW28lD6BO+qSZCOAm7hHSZq7dtw9x658IqO+mI2mVeCybsAyunw2iWi
 Kf5q90wq6tIBXuT8YH9MXGrSCQw00NclbYeYwB9CmCt9hT/koEFBdl7uFUFitB+Q
 GSPTz5fXhgc5Lms85n7flZlrVKoQKmtDQe4/DvKZm+SjsATHU9ru89OxDBdS5gSG
 YcEIM4zc9tMjhs3GC9t6WXf6iFOdctum8HOhUoIN/+LVfeOMRRwAhRVqtGJ//Xw=
 =DCUg
 -----END PGP SIGNATURE-----

Merge tag 'v4.4-rc2' into fixes

Linux 4.4-rc2 is backmerged from the keystone fixes.
2015-11-25 23:47:38 +01:00
Arnd Bergmann fabc2c9c1f The i.MX fixes for 4.4:
- Add missing .irq_set_type for i.MX GPC irq_chip.  It fixes an issue
   that device IRQ type setting doesn't match the one specified in device
   tree, since stacked IRQ domain is adopted in GPC driver.
 - Fix the wrong spi-num-chipselects settings for Vybrid DSPI devices.
 - Fix a merge error in Vybrid dts regarding to ADC device property
   fsl,adck-max-frequency
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWVbYUAAoJEFBXWFqHsHzOUGwH/1leThviODjyQpau7fEP0qQs
 /yfdo+QSKDA/qsv3PK0yyqI1W+eVnlt0EtW38fgnpmgK53dML4eneK5qFTCFJlqp
 9+lZAw+yyip3AOK5Cfpr6GnzB5JS60JWotUvrT+ZFIWycL/foGB7By9F7r4KBNWT
 P9Lz6bqYVVh/qPAAvWF8Xq0BW8CSdyRkUrjCWJoZjiXRTCxRP4bSF0FYiFw51qMv
 x1PZf79ANAsKUtfT8wh71Iiiq10dJqSdmvmnIs1Kk2jfv0fvVz4YKGodNCX/nZdO
 xozx+SMcb0j2iefRMoS/wHNFpHAcJC4nnostS9Dk47oFzaatNqELqwBXhxKIJe0=
 =ExDB
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes

Merge "The i.MX fixes for 4.4" from Shawn Guo:

- Add missing .irq_set_type for i.MX GPC irq_chip.  It fixes an issue
  that device IRQ type setting doesn't match the one specified in device
  tree, since stacked IRQ domain is adopted in GPC driver.
- Fix the wrong spi-num-chipselects settings for Vybrid DSPI devices.
- Fix a merge error in Vybrid dts regarding to ADC device property
  fsl,adck-max-frequency

* tag 'imx-fixes-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: dts: vfxxx: Fix dspi[01] spi-num-chipselects.
  ARM: imx: add platform irq type setting in gpc
  ARM: dts: vfxxx: Fix erroneous property in esdhc0 node
2015-11-25 23:45:53 +01:00
Alexandra Yates 584ee3dcb1 intel_pstate: Fix "performance" mode behavior with HWP enabled
If hardware-driven P-state selection (HWP) is enabled, the
"performance" mode of intel_pstate should only allow the processor
to use the highest-performance P-state available.  That is not
the case currently, so make it actually happen.

Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
[ rjw: Subject and changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-11-25 23:37:44 +01:00
Jeff Layton 4f2e9dce0c nfs4: resend LAYOUTGET when there is a race that changes the seqid
pnfs_layout_process will check the returned layout stateid against what
the kernel has in-core. If it turns out that the stateid we received is
older, then we should resend the LAYOUTGET instead of falling back to
MDS I/O.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Cc: stable@vger.kernel.org # 3.18+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
2015-11-25 15:32:13 -05:00
Jeff Layton c812012f9c nfs: if we have no valid attrs, then don't declare the attribute cache valid
If we pass in an empty nfs_fattr struct to nfs_update_inode, it will
(correctly) not update any of the attributes, but it then clears the
NFS_INO_INVALID_ATTR flag, which indicates that the attributes are
up to date. Don't clear the flag if the fattr struct has no valid
attrs to apply.

Reviewed-by: Steve French <steve.french@primarydata.com>
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
2015-11-25 15:31:49 -05:00
Jeff Layton 616c319683 nfs: ensure that attrcache is revalidated after a SETATTR
If we get no post-op attributes back from a SETATTR operation, then no
attributes will of course be updated during the call to
nfs_update_inode.

We know however that the attributes are invalid at that point, since we
just changed some of them. At the very least, the ctime will be bogus.
If we get no post-op attributes back on the call, mark the attrcache
invalid to reflect that fact.

Reviewed-by: Steve French <steve.french@primarydata.com>
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
2015-11-25 15:24:30 -05:00
Gabriele Paoloni 7c7a0e9453 ARM/PCI: Move align_resource function pointer to pci_host_bridge structure
Commit b3a72384fe ("ARM/PCI: Replace pci_sys_data->align_resource with
global function pointer") introduced an ARM-specific align_resource()
function pointer.  This is not portable to other arches and doesn't work
for platforms with two different PCIe host bridge controllers.

Move the function pointer to the pci_host_bridge structure so each host
bridge driver can specify its own align_resource() function.

Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
2015-11-25 13:23:38 -06:00
Linus Torvalds 9b81d512a4 Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull more block layer fixes from Jens Axboe:
 "I wasn't going to send off a new pull before next week, but the blk
  flush fix from Jan from the other day introduced a regression.  It's
  rare enough not to have hit during testing, since it requires both a
  device that rejects the first flush, and bad timing while it does
  that.  But since someone did hit it, let's get the revert into 4.4-rc3
  so we don't have a released rc with that known issue.

  Apart from that revert, three other fixes:

   - From Christoph, a fix for a missing unmap in NVMe request
     preparation.

   - An NVMe fix from Nishanth that fixes data corruption on powerpc.

   - Also from Christoph, fix a list_del() attempt on blk-mq that didn't
     have a matching list_add() at timer start"

* 'for-linus' of git://git.kernel.dk/linux-block:
  Revert "blk-flush: Queue through IO scheduler when flush not required"
  block: fix blk_abort_request for blk-mq drivers
  nvme: add missing unmaps in nvme_queue_rq
  NVMe: default to 4k device page size
2015-11-25 11:08:35 -08:00
Grygorii Strashko 918af9f941 ARM: OMAP4+: SMP: use lockless clkdm/pwrdm api in omap4_boot_secondary
OMAP CPU hotplug uses cpu1's clocks and power domains for CPU1 wake up
from low power states (or turn on CPU1). This part of code is also
part of system suspend (disable_nonboot_cpus()).
>From other side, cpu1's clocks and power domains are used by CPUIdle. All above
functionality is mutually exclusive and, therefore, lockless clkdm/pwrdm api
can be used in omap4_boot_secondary().

This fixes below back-trace on -RT which is triggered by
pwrdm_lock/unlock():

BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:917
 in_atomic(): 1, irqs_disabled(): 0, pid: 118, name: sh
 9 locks held by sh/118:
  #0:  (sb_writers#4){.+.+.+}, at: [<c0144a6c>] vfs_write+0x13c/0x164
  #1:  (&of->mutex){+.+.+.}, at: [<c01b4c70>] kernfs_fop_write+0x48/0x19c
  #2:  (s_active#24){.+.+.+}, at: [<c01b4c78>] kernfs_fop_write+0x50/0x19c
  #3:  (device_hotplug_lock){+.+.+.}, at: [<c03cbff0>] lock_device_hotplug_sysfs+0xc/0x4c
  #4:  (&dev->mutex){......}, at: [<c03cd284>] device_online+0x14/0x88
  #5:  (cpu_add_remove_lock){+.+.+.}, at: [<c003af90>] cpu_up+0x50/0x1a0
  #6:  (cpu_hotplug.lock){++++++}, at: [<c003ae48>] cpu_hotplug_begin+0x0/0xc4
  #7:  (cpu_hotplug.lock#2){+.+.+.}, at: [<c003aec0>] cpu_hotplug_begin+0x78/0xc4
  #8:  (boot_lock){+.+...}, at: [<c002b254>] omap4_boot_secondary+0x1c/0x178
 Preemption disabled at:[<  (null)>]   (null)

 CPU: 0 PID: 118 Comm: sh Not tainted 4.1.12-rt11-01998-gb4a62c3-dirty #137
 Hardware name: Generic DRA74X (Flattened Device Tree)
 [<c0017574>] (unwind_backtrace) from [<c0013be8>] (show_stack+0x10/0x14)
 [<c0013be8>] (show_stack) from [<c05a8670>] (dump_stack+0x80/0x94)
 [<c05a8670>] (dump_stack) from [<c05ad158>] (rt_spin_lock+0x24/0x54)
 [<c05ad158>] (rt_spin_lock) from [<c0030dac>] (clkdm_wakeup+0x10/0x2c)
 [<c0030dac>] (clkdm_wakeup) from [<c002b2c0>] (omap4_boot_secondary+0x88/0x178)
 [<c002b2c0>] (omap4_boot_secondary) from [<c0015d00>] (__cpu_up+0xc4/0x164)
 [<c0015d00>] (__cpu_up) from [<c003b09c>] (cpu_up+0x15c/0x1a0)
 [<c003b09c>] (cpu_up) from [<c03cd2d4>] (device_online+0x64/0x88)
 [<c03cd2d4>] (device_online) from [<c03cd360>] (online_store+0x68/0x74)
 [<c03cd360>] (online_store) from [<c01b4ce0>] (kernfs_fop_write+0xb8/0x19c)
 [<c01b4ce0>] (kernfs_fop_write) from [<c0144124>] (__vfs_write+0x20/0xd8)
 [<c0144124>] (__vfs_write) from [<c01449c0>] (vfs_write+0x90/0x164)
 [<c01449c0>] (vfs_write) from [<c01451e4>] (SyS_write+0x44/0x9c)
 [<c01451e4>] (SyS_write) from [<c0010240>] (ret_fast_syscall+0x0/0x54)
 CPU1: smp_ops.cpu_die() returned, trying to resuscitate

Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-11-25 11:03:20 -08:00
Tony Lindgren 970259bff4 Merge branch '81xx' into omap-for-v4.4/fixes 2015-11-25 10:56:40 -08:00
Neil Armstrong 29f5b34ca1 arm: omap2+: add missing HWMOD_NO_IDLEST in 81xx hwmod data
Add missing HWMOD_NO_IDLEST hwmod flag for entries not
having omap4 clkctrl values.
The emac0 hwmod flag fixes the davinci_emac driver probe
since the return of pm_resume() call is now checked.

This solves the following boot errors :
[    0.121429] omap_hwmod: l4_ls: _wait_target_ready failed: -16
[    0.121441] omap_hwmod: l4_ls: cannot be enabled for reset (3)
[    0.124342] omap_hwmod: l4_hs: _wait_target_ready failed: -16
[    0.124352] omap_hwmod: l4_hs: cannot be enabled for reset (3)
[    1.967228] omap_hwmod: emac0: _wait_target_ready failed: -16

Cc: Brian Hutchinson <b.hutchman@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-11-25 10:54:22 -08:00
Daniel Borkmann c9da161c65 bpf: fix clearing on persistent program array maps
Currently, when having map file descriptors pointing to program arrays,
there's still the issue that we unconditionally flush program array
contents via bpf_fd_array_map_clear() in bpf_map_release(). This happens
when such a file descriptor is released and is independent of the map's
refcount.

Having this flush independent of the refcount is for a reason: there
can be arbitrary complex dependency chains among tail calls, also circular
ones (direct or indirect, nesting limit determined during runtime), and
we need to make sure that the map drops all references to eBPF programs
it holds, so that the map's refcount can eventually drop to zero and
initiate its freeing. Btw, a walk of the whole dependency graph would
not be possible for various reasons, one being complexity and another
one inconsistency, i.e. new programs can be added to parts of the graph
at any time, so there's no guaranteed consistent state for the time of
such a walk.

Now, the program array pinning itself works, but the issue is that each
derived file descriptor on close would nevertheless call unconditionally
into bpf_fd_array_map_clear(). Instead, keep track of users and postpone
this flush until the last reference to a user is dropped. As this only
concerns a subset of references (f.e. a prog array could hold a program
that itself has reference on the prog array holding it, etc), we need to
track them separately.

Short analysis on the refcounting: on map creation time usercnt will be
one, so there's no change in behaviour for bpf_map_release(), if unpinned.
If we already fail in map_create(), we are immediately freed, and no
file descriptor has been made public yet. In bpf_obj_pin_user(), we need
to probe for a possible map in bpf_fd_probe_obj() already with a usercnt
reference, so before we drop the reference on the fd with fdput().
Therefore, if actual pinning fails, we need to drop that reference again
in bpf_any_put(), otherwise we keep holding it. When last reference
drops on the inode, the bpf_any_put() in bpf_evict_inode() will take
care of dropping the usercnt again. In the bpf_obj_get_user() case, the
bpf_any_get() will grab a reference on the usercnt, still at a time when
we have the reference on the path. Should we later on fail to grab a new
file descriptor, bpf_any_put() will drop it, otherwise we hold it until
bpf_map_release() time.

Joint work with Alexei.

Fixes: b2197755b2 ("bpf: add support for persistent maps/progs")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-25 12:14:09 -05:00