Commit Graph

810596 Commits

Author SHA1 Message Date
Linus Torvalds
7b5c8f5226 drm-fixes for 5.0-rc2, part 2
nouveau:
 one backlight, falcon register access, and a fan fix.
 
 i915:
 - Disable PSR for Apple panels
 - Broxton ERR_PTR error state fix
 - Kabylake VECS workaround fix
 - Unwind failure on pinning the gen7 ppgtt
 - GVT workload request allocation fix
 
 core:
 - Fix fb-helper to work correctly with SDL 1.2 bugs.
 - Fix lockdep warning in the atomic ioctl and setproperty.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEb4nG6jLu8Y5XI+PfTA9ye/CYqnEFAlw5IEcACgkQTA9ye/CY
 qnFrLw/9G9cEKiM9ZPspa5ovEi1S1lwUaKD5JWJckaLzbNIkDFDpfbV0X8An+IOt
 L0Db/cdtsBZ67Ci+QrUk60Zy36dFRChDafCP41U2nZtn5iel9v474fys13ZFwtWa
 znyvb5trPEB+76Sc3YDQuK2Aapr/NDowm993qkCJq8euQboFI6jfC7Ib/+zrsZjz
 7OErdKVSkxPT8hEeQq6DkuB0hDMCvb9V/Gu0pzYn+Tb5ECl6ZTSSjf4bxhQ8qG6x
 P+rPQLcymgG+OhYuHn19rh1Y/3NPJnDN4lgZ5HOKVyvKIfjLGuZwriZ5e53sbgWw
 sjBD/9tSHSSRH3Taj4yVWw/XcwIH9YnUmaMAPe35bQmweYjMILlrkWEIGC+g4loi
 aebq66x2LWZ4tqiGu5flNfXPnLYJqnvaA8z4vEPdtwAN/JsrbRD3lUWkVV5Ydvdq
 KFQnrzCXuDWf8UjmW70utvkW+pxK155Xb/3IqivF8tpoz+jC+NeXqp7cts9gOJkj
 UZv842gymFJ0yQ3ZhjFJKc2aAe2eKtq8lJiCDzVA0uwg2ddebi2ttJTo6rH9ze58
 XEhywCGptMKOOYsCDzzkqAGNTkOajd88d1/HCrwWeHW6SIfEfHPsYliC6O9ZzgLM
 xO1/JGF7PrlggtzM+rffVgh2lVFKQxErUZkPPkecUj42XjnX+is=
 =7xM2
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2019-01-11-1' of git://anongit.freedesktop.org/drm/drm

Pull more drm fixes from Daniel Vetter:
 "Dave sends out his pull, everybody remembers holidays are over :-)

  Since Dave's already in weekend mode and it was quite a few patches I
  figured better to apply all the pulls and forward them to you. Hence
  here 2nd part of bugfixes for -rc2.

  nouveau:
   - backlight fix
   - falcon register access fix
   - fan fix.

  i915:
   - Disable PSR for Apple panels
   - Broxton ERR_PTR error state fix
   - Kabylake VECS workaround fix
   - Unwind failure on pinning the gen7 ppgtt
   - GVT workload request allocation fix

  core:
   - Fix fb-helper to work correctly with SDL 1.2 bugs
   - Fix lockdep warning in the atomic ioctl and setproperty"

* tag 'drm-fixes-2019-01-11-1' of git://anongit.freedesktop.org/drm/drm:
  drm/nouveau/falcon: avoid touching registers if engine is off
  drm/nouveau: Don't disable polling in fallback mode
  drm/nouveau: register backlight on pascal and newer
  drm: Fix documentation generation for DP_DPCD_QUIRK_NO_PSR
  drm/i915: init per-engine WAs for all engines
  drm/i915: Unwind failure on pinning the gen7 ppgtt
  drm/i915: Skip the ERR_PTR error state
  drm/i915: Disable PSR in Apple panels
  gpu/drm: Fix lock held when returning to user space.
  drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock
  drm/fb-helper: Partially bring back workaround for bugs of SDL 1.2
  drm/i915/gvt: Fix workload request allocation before request add
2019-01-12 10:30:43 -08:00
Miquel Raynal
bde0b5c109 ata: ahci: mvebu: request PHY suspend/resume for Armada 3700
A feature has been added in the libahci driver: the possibility to set
a new flag in hpriv->flags to let the core handle PHY suspend/resume
automatically. Make use of this feature to make suspend to RAM work
with SATA drives on A3700.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-11 14:47:51 -07:00
Miquel Raynal
2f558bc3f3 ata: ahci: mvebu: add Armada 3700 initialization needed for S2RAM
A3700 comphy initialization is done in the firmware (TF-A). Looking at
the SATA PHY initialization routine, there is a comment about "vendor
specific" registers. Two registers are mentioned. They are not
initialized there in the firmware because they are AHCI related, while
the firmware at this location does only PHY configuration. The
solution to avoid doing such initialization is relying on U-Boot.

While this work at boot time, U-Boot is definitely not going to run
during a resume after suspending to RAM.

Two possible solutions were considered:
* Fixing the firmware.
* Fixing the kernel driver.

The first solution would take ages to propagate, while the second
solution is easy to implement as the driver as been a little bit
reworked to prepare for such platform configuration. Hence, this patch
adds an Armada 3700 configuration function to set these two registers
both at boot time (in the probe) and after a suspend (in the resume
path).

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-11 14:47:50 -07:00
Miquel Raynal
96dbcb40e4 ata: ahci: mvebu: do Armada 38x configuration only on relevant SoCs
At the beginning, only Armada 38x SoCs where supported by the
ahci_mvebu.c driver. Commit 15d3ce7b63 ("ata: ahci_mvebu: add
support for Armada 3700 variant") introduced Armada 3700 support. As
opposed to Armada 38x SoCs, the 3700 variants do not have to configure
mbus and the regret option. This patch took care of avoiding such
configuration when not needed in the probe function, but failed to do
the same in the resume path. While doing so looks harmless by
experience, let's clean the driver logic and avoid doing this useless
configuration with Armada 3700 SoCs.

Because the logic is very similar between these two places, it has
been decided to factorize this code and put it in a "Armada 38x
configuration function". This function is part of a new
(per-compatible) platform data structure, so that the addition of such
configuration function for Armada 3700 will be eased.

Fixes: 15d3ce7b63 ("ata: ahci_mvebu: add support for Armada 3700 variant")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-11 14:47:48 -07:00
Miquel Raynal
c9bc136791 ata: ahci: mvebu: remove stale comment
For Armada-38x (32-bit) SoCs, PM platform support has been added since:
commit 32f9494c9d ("ARM: mvebu: prepare pm-board.c for the
                      introduction of Armada 38x support")
commit 3cbd6a6ca8 ("ARM: mvebu: Add standby support")

For Armada 64-bit SoCs, like the A3700 also using this AHCI driver, PM
platform support has always existed.

There are even suspend/resume hooks in this driver since:
commit d6ecf15814 ("ata: ahci_mvebu: add suspend/resume support")

Remove the stale comment at the end of this driver stating that all
the above does not exist yet.

Fixes: d6ecf15814 ("ata: ahci_mvebu: add suspend/resume support")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-11 14:47:47 -07:00
Miquel Raynal
49e54187ae ata: libahci_platform: comply to PHY framework
Current implementation of the libahci does not take into account the
new PHY framework. Correct the situation by adding a call to
phy_set_mode() before phy_power_on().

PHYs should also be handled at suspend/resume time. For this, call
ahci_platform_enable/disable_phys() at suspend/resume_host() time. These
calls are guarded by a HFLAG (AHCI_HFLAG_SUSPEND_PHYS) that the user of
the libahci driver must set manually in hpriv->flags at probe time. This
is to avoid breaking users that have not been tested with this change.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Suggested-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-11 14:47:45 -07:00
Linus Torvalds
4b3c31c8d4 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang:
 "I2C has one core and one driver bugfix for you"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: tegra: Fix Maximum transfer size
  i2c: dev: prevent adapter retries and timeout being set as minus value
2019-01-11 12:28:01 -08:00
Linus Torvalds
c3405d6899 arm64 fixes for -rc2
- Don't error in kexec_file_load if kaslr-seed is missing in device-tree
 
 - Fix incorrect argument type passed to iort_match_node_callback()
 
 - Fix IORT build failure when CONFIG_IOMMU_API=n
 
 - Fix kpti performance regression with new rodata default option
 
 - Typo fix
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEPxTL6PPUbjXGY88ct6xw3ITBYzQFAlw4mMwACgkQt6xw3ITB
 YzSPoAf8Ci2O+LAhPHKgbGRCPuM3TCl69zYKD0I3OHbLXOpGk0ykWvYxOPkCHipr
 DpilFzWXyr0bUjg8GtsUAFlfPuzSCj/UpreRIN6o0+AEHZ5t1RTqxfRaSah5V7Df
 mDMlvPw8qS05ieIPwz0AOrR/ZxODqWeu9GaiWRbSx2ZH9/e2YL1dnHfcZ+77CsWZ
 Wdb99aVT5UcLbPmAtj/0hs+o6NekjwGt70JCBytXP6lJM/Hh7SeNNjJPNnKvisag
 GYHg/Vn5uA37/80iLkXq5J/pu1mrDqEZO1/KfZcmQ1umnCm2CLJNKDoJc3kGLVhT
 wZYv8TLY0i42fJ2m03yp8v8lKf/29w==
 =9NUe
 -----END PGP SIGNATURE-----

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

Pull arm64 fixes from Will Deacon:
 "Another handful of arm64 fixes here. Most of the complication comes
  from improving our kpti code to avoid lengthy pauses (30+ seconds)
  during boot when we rewrite the page tables. There are also a couple
  of IORT fixes that came in via Lorenzo.

  Summary:

   - Don't error in kexec_file_load if kaslr-seed is missing in
     device-tree

   - Fix incorrect argument type passed to iort_match_node_callback()

   - Fix IORT build failure when CONFIG_IOMMU_API=n

   - Fix kpti performance regression with new rodata default option

   - Typo fix"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: kexec_file: return successfully even if kaslr-seed doesn't exist
  ACPI/IORT: Fix rc_dma_get_range()
  arm64: kpti: Avoid rewriting early page tables when KASLR is enabled
  arm64: asm-prototypes: Fix fat-fingered typo in comment
  ACPI/IORT: Fix build when CONFIG_IOMMU_API=n
2019-01-11 12:25:40 -08:00
Linus Torvalds
f87092c433 A patch to allow setting abort_on_full and a fix for an old "rbd unmap"
edge case, marked for stable.
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCAAxFiEEydHwtzie9C7TfviiSn/eOAIR84sFAlw4yfETHGlkcnlvbW92
 QGdtYWlsLmNvbQAKCRBKf944AhHzi9loB/4iTBs/c5vI8oXSi+n4IAAG/LunP8Ff
 HfxMr7Mpbpp0cLdzmJWO63Wejii95w7IkdepJTF5VlpH6dwJDUL6jSAyAXPO1a2G
 phZHmnGYjFBKLGPftCZmGQCJeYeS9JJyRgTC4IZECVkQRiPRGXn8cAbEqMYOy6Am
 mXmy0u4Me3RJTpcOCqaPPugontvtsZdfqvwVE2dGqXTj9Kh1hfum5ddrvf1CXugQ
 MpXzW3mJCMMfcXlZOCVuQInKqPT4HRhTpzJxdECiJTxBXDQUd6e0ekOXmKW6jOYk
 ZpNVnXHGee0uvzwQC0/VMWkRF6d+pOsYFQkDlX79h04rqnoBkUNc2Doe
 =dJev
 -----END PGP SIGNATURE-----

Merge tag 'ceph-for-5.0-rc2' of git://github.com/ceph/ceph-client

Pull ceph updates from Ilya Dryomov:
 "A patch to allow setting abort_on_full and a fix for an old "rbd
  unmap" edge case, marked for stable"

* tag 'ceph-for-5.0-rc2' of git://github.com/ceph/ceph-client:
  rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set
  ceph: use vmf_error() in ceph_filemap_fault()
  libceph: allow setting abort_on_full for rbd
2019-01-11 12:17:30 -08:00
Linus Torvalds
40a31da414 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf tooling updates from Ingo Molnar:
 "Tooling changes only: fixes and a few stray improvements.

  Most of the diffstat is dominated by a PowerPC related fix of system
  call trace output beautification that allows us to (again) use the
  UAPI header version and sync up with the kernel's version of PowerPC
  system call names in the arch/powerpc/kernel/syscalls/syscall.tbl
  header"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
  tools headers powerpc: Remove unistd.h
  perf powerpc: Rework syscall table generation
  perf symbols: Add 'arch_cpu_idle' to the list of kernel idle symbols
  tools include uapi: Sync linux/if_link.h copy with the kernel sources
  tools include uapi: Sync linux/vhost.h with the kernel sources
  tools include uapi: Sync linux/fs.h copy with the kernel sources
  perf beauty: Switch from using uapi/linux/fs.h to uapi/linux/mount.h
  tools include uapi: Grab a copy of linux/mount.h
  perf top: Lift restriction on using callchains without "sym" in --sort
  tools lib traceevent: Remove tep_data_event_from_type() API
  tools lib traceevent: Rename tep_is_file_bigendian() to tep_file_bigendian()
  tools lib traceevent: Changed return logic of tep_register_event_handler() API
  tools lib traceevent: Changed return logic of trace_seq_printf() and trace_seq_vprintf() APIs
  tools lib traceevent: Rename struct cmdline to struct tep_cmdline
  tools lib traceevent: Initialize host_bigendian at tep_handle allocation
  tools lib traceevent: Introduce new libtracevent API: tep_override_comm()
  perf tests: Add a test for the ARM 32-bit [vectors] page
  perf tools: Make find_vdso_map() more modular
  perf trace: Fix alignment for [continued] lines
  perf trace: Fix ')' placement in "interrupted" syscall lines
  ...
2019-01-11 09:44:05 -08:00
Vitaly Kuznetsov
826c1362e7 x86/kvm/nVMX: don't skip emulated instruction twice when vmptr address is not backed
Since commit 09abb5e3e5 ("KVM: nVMX: call kvm_skip_emulated_instruction
in nested_vmx_{fail,succeed}") nested_vmx_failValid() results in
kvm_skip_emulated_instruction() so doing it again in handle_vmptrld() when
vmptr address is not backed is wrong, we end up advancing RIP twice.

Fixes: fca91f6d60 ("kvm: nVMX: Set VM instruction error for VMPTRLD of unbacked page")
Reported-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
2019-01-11 18:41:53 +01:00
Christophe de Dinechin
cf1754c2a1 Documentation/virtual/kvm: Update URL for AMD SEV API specification
The URL of [api-spec] in Documentation/virtual/kvm/amd-memory-encryption.rst
is no longer valid, replaced space with underscore.

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
2019-01-11 18:38:07 +01:00
Lan Tianyu
b7c1c226f9 KVM/VMX: Avoid return error when flush tlb successfully in the hv_remote_flush_tlb_with_range()
The "ret" is initialized to be ENOTSUPP. The return value of
__hv_remote_flush_tlb_with_range() will be Or with "ret" when ept
table potiners are mismatched. This will cause return ENOTSUPP even if
flush tlb successfully. This patch is to fix the issue and set
"ret" to 0.

Fixes: a5c214dad1 ("KVM/VMX: Change hv flush logic when ept tables are mismatched.")
Signed-off-by: Lan Tianyu <Tianyu.Lan@microsoft.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
2019-01-11 18:38:07 +01:00
David Rientjes
3f14a89d11 kvm: sev: Fail KVM_SEV_INIT if already initialized
By code inspection, it was found that multiple calls to KVM_SEV_INIT
could deplete asid bits and overwrite kvm_sev_info's regions_list.

Multiple calls to KVM_SVM_INIT is not likely to occur with QEMU, but this
should likely be fixed anyway.

This code is serialized by kvm->lock.

Fixes: 1654efcbc4 ("KVM: SVM: Add KVM_SEV_INIT command")
Reported-by: Cfir Cohen <cfir@google.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
2019-01-11 18:38:07 +01:00
Tomas Bortoli
98938aa8ed KVM: validate userspace input in kvm_clear_dirty_log_protect()
The function at issue does not fully validate the content of the
structure pointed by the log parameter, though its content has just been
copied from userspace and lacks validation. Fix that.

Moreover, change the type of n to unsigned long as that is the type
returned by kvm_dirty_bitmap_bytes().

Signed-off-by: Tomas Bortoli <tomasbortoli@gmail.com>
Reported-by: syzbot+028366e52c9ace67deb3@syzkaller.appspotmail.com
[Squashed the fix from Paolo. - Radim.]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
2019-01-11 18:38:07 +01:00
Gustavo A. R. Silva
d14eff1bc5 KVM: x86: Fix bit shifting in update_intel_pt_cfg
ctl_bitmask in pt_desc is of type u64. When an integer like 0xf is
being left shifted more than 32 bits, the behavior is undefined.

Fix this by adding suffix ULL to integer 0xf.

Addresses-Coverity-ID: 1476095 ("Bad bit shift operation")
Fixes: 6c0f0bba85 ("KVM: x86: Introduce a function to initialize the PT configuration")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Wei Yang <richardw.yang@linux.intel.com>
Reviewed-by: Luwei Kang <luwei.kang@intel.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
2019-01-11 18:38:07 +01:00
Linus Torvalds
e8af37f3f4 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
 "A 32-bit build fix, CONFIG_RETPOLINE fixes and rename CONFIG_RESCTRL
  to CONFIG_X86_RESCTRL"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, modpost: Replace last remnants of RETPOLINE with CONFIG_RETPOLINE
  x86/cache: Rename config option to CONFIG_X86_RESCTRL
  samples/seccomp: Fix 32-bit build
2019-01-11 09:07:19 -08:00
Linus Torvalds
8e1b295b69 ACPI fixes for 5.0-rc2
- Fix build failures with both CONFIG_NLS and CONFIG_PCI unset that
    can occur since ACPI can be built without PCI now (Sinan Kaya).
 
  - Clean up the handling of duplicate entries in power resource lists
    returned by _PRx evaluation to avoid triggering WARN_ON() on
    attempts to add duplicate symlinks in sysfs (Hans de Goede).
 
  - Fix issues with the TS current-source switching on systems using
    the xpower PMIC by avoiding to update unrelated bits in the TS
    pin-ctrl register and avoiding to unconditionally enable TS
    current-source on systems where it is not used (Hans de Goede).
 
  - Fix addresses in NUMA-related messages on 32-bit with PAE which
    can be truncated due to integer type conversions (Chao Fan).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJcOGwhAAoJEILEb/54YlRx2f8QAJZlOPuSlzXO5pl2ki8L/XXW
 S0vj6zOjR0mUeWuvq4ipKE/FzF7GZi+WjbMbJCF3C/txoHaYZqoGLjM0XZmiACi5
 4FrFEDyVfLZRoXfM0z9XcoptG9jWdBuGT8DckwnkeOdgxusop9kpIaDv8QDOLCXz
 +nZjPeG8wkGH+shNSyHb0q+Jok1Q2rNLHdkjzFkjjso803ORhVah7LcQkAViYPab
 L3r39MzuEpemRuPvLNzntWrNlKZyDZna8ydDD2PR1aqK8X2vIwT+Noo/WmismMWk
 wW4/GRL3DR5gnsmf/qpyQHnSKMvZLi6/JTe6etXTURKuZ6KtCxFsdjH7Ygaa65J9
 CL5C7Y3x0C8gJk4c9UP9jnVUY3IFm+R3xyynQWAnRLg7+kobN7h4lYyL12nwhWBS
 +vfVfaheHETNTx8K6agLbYzgcY6iNbZw0DeZM4oIAL+jRXyvhIjHjjGMnUPG1sTf
 K1EL2BtBL5virZJWgLv//87SKGxN39pBkR/zyx7rFKRY7mFztmLaQoEvpFP4HEv1
 ge1PhFU+8hPSzj3rElfOwZi5W7DRETpKnaNtRBNDRQnFSeWuCiKjAfLHVFND0EjH
 0sHk4Rjx5H6iDyMCoWyc3H4Dcdz89fwvH+ByAWlW+L1locJFrNEKoQgSeP9CAk7f
 srtuj+V+QtsVIaxBWhP6
 =83Yo
 -----END PGP SIGNATURE-----

Merge tag 'acpi-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "Fix a build failure introduced recently, fix the xpower PMIC ACPI
  driver, clean up the handling of duplicate entries in _PRx power
  resource lists and fix addresses in NUMA-related messages on 32-bit
  with PAE.

  Specifics:

   - Fix build failures with both CONFIG_NLS and CONFIG_PCI unset that
     can occur since ACPI can be built without PCI now (Sinan Kaya).

   - Clean up the handling of duplicate entries in power resource lists
     returned by _PRx evaluation to avoid triggering WARN_ON() on
     attempts to add duplicate symlinks in sysfs (Hans de Goede).

   - Fix issues with the TS current-source switching on systems using
     the xpower PMIC by avoiding to update unrelated bits in the TS
     pin-ctrl register and avoiding to unconditionally enable TS
     current-source on systems where it is not used (Hans de Goede).

   - Fix addresses in NUMA-related messages on 32-bit with PAE which can
     be truncated due to integer type conversions (Chao Fan)"

* tag 'acpi-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / PMIC: xpower: Fix TS-pin current-source handling
  ACPI: NUMA: Use correct type for printing addresses on i386-PAE
  ACPI: power: Skip duplicate power resource references in _PRx
  ACPI: Fix build failure when CONFIG_NLS is set to 'n'
2019-01-11 09:04:36 -08:00
Linus Torvalds
f4f31fff32 Power management updates for 5.0-rc2
- Prevent integer overflows from occurring on 32-bit when
    converting milliseconds to nanoseconds in the runtime PM
    framework and update comments that still refer to jiffies
    in it (Vincent Guittot, Ladislav Michl).
 
  - Fix the SCMI cpufreq driver to always use the same frequency
    units for arch_set_freq_scale() and make the scale-invariant
    load tracking acutally work with this driver (Quentin Perret).
 
  - Fix freeing of dynamic OPPs in the SCPI and SCMI cpufreq drivers
    broken during the 4.20 defelopment cycle (Viresh Kumar).
 
  - Prevent the cpufreq core from attempting to return the current
    frequency of offline CPUs (Sudeep Holla).
 
  - Add devfreq suspend and resume hooks (missed previously) to the
    PM core to make the recently added system suspend and resume
    support in devfreq actually work (Lukasz Luba).
 
  - Update MAINTAINERS entries for cpufreq and cpuidle, mostly to add
    references to new/current documentation to them (Rafael Wysocki).
 
  - Fix a recently broken reference to cpuidle documentation (Otto
    Sabart).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJcOGt/AAoJEILEb/54YlRxSBcQAIhnPvUQz+ZqLbJ4tM/LYuAH
 m2qGV82UNoyfJc4O3eppvqfr6kra0lRK+SRBYJENjVBC4tzrpDr8UlZZ6ilwobQe
 KdybpUzFPmSCiROvwkwyXITSA6Z4kI1+mAZKn2HuV+q3u0O2ABQltU3S4veN0dfP
 +YRap+3BhGP4Pz9g7uzWwe2YS2o5ng9RDgGDhNQ18tSw9T7TnXVJBuqYsBlCi1au
 dWaY1kiswDLfXdEqJUJoFyjTwJxJir8wYtgEcYRhtBTNDrD8j0AoaFcrxd3yP9qd
 I2sGnxvpvndnPczJ0fJHdz83XonivLSEQsSc+Fe/fhqt1izrli4ZSZO4DPPMrU47
 n6kGX0miDUGKSvYcU+R/0b3i85X3Na4OHcVvuwjmba3Hdq6C64LmGDMvu1CJy2Qs
 juIiHgDa+gG7/80u3S+ekDq7u9C/1WS75X6wCON7aS5mnaP+FagC/dOxkNmDxYsi
 FwZZJhP/fxx12OjV2UYxKgVeRzw+2x8mgnNIlFa+MqsTRG6239Ii/lr/WPdXPklk
 2UdwLRkxNw69K3Q/m0LrmSx9AxmtwBGp24dvAf2bxjIYC4SL6eK9RXFjS4sWoE+T
 NXG4j2FHMMDptX9YGs9OlBm2GoJOb/pwJfvO52dGmIRuix1jT5Z1hM6sZjgt+mns
 YNr06bu2x2jGeZGu9O9Y
 =Z7S7
 -----END PGP SIGNATURE-----

Merge tag 'pm-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management updates from Rafael Wysocki:
 "These fix fallout after starting to use hrtimers in the runtime PM
  framework, fix a few cpufreq issues, fix a recently broken reference
  to cpuidle documentation, update MAINTAINERS entries for cpufreq and
  cpuidle and make the recently added system suspend and resume support
  in devfreq actually work.

  Specifics:

   - Prevent integer overflows from occurring on 32-bit when converting
     milliseconds to nanoseconds in the runtime PM framework and update
     comments that still refer to jiffies in it (Vincent Guittot,
     Ladislav Michl).

   - Fix the SCMI cpufreq driver to always use the same frequency units
     for arch_set_freq_scale() and make the scale-invariant load
     tracking acutally work with this driver (Quentin Perret).

   - Fix freeing of dynamic OPPs in the SCPI and SCMI cpufreq drivers
     broken during the 4.20 defelopment cycle (Viresh Kumar).

   - Prevent the cpufreq core from attempting to return the current
     frequency of offline CPUs (Sudeep Holla).

   - Add devfreq suspend and resume hooks (missed previously) to the PM
     core to make the recently added system suspend and resume support
     in devfreq actually work (Lukasz Luba).

   - Update MAINTAINERS entries for cpufreq and cpuidle, mostly to add
     references to new/current documentation to them (Rafael Wysocki).

   - Fix a recently broken reference to cpuidle documentation (Otto
     Sabart)"

* tag 'pm-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM-runtime: Fix autosuspend_delay on 32bits arch
  PM-runtime: Fix 'jiffies' in comments after switch to hrtimers
  cpufreq: scmi: Fix frequency invariance in slow path
  doc: trace: fix reference to cpuidle documentation file
  cpufreq: check if policy is inactive early in __cpufreq_get()
  cpufreq: scpi/scmi: Fix freeing of dynamic OPPs
  cpuidle / Documentation: Update cpuidle MAINTAINERS entry
  cpufreq / Documentation: Update cpufreq MAINTAINERS entry
  PM: sleep: call devfreq suspend/resume
2019-01-11 09:01:43 -08:00
Linus Torvalds
385c59c7ba drm: amdgpu + tc358767 bridge + amd mst s/r fix
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJcN/qLAAoJEAx081l5xIa+9s4P/ikYjcOxwfScwGnx3Pme6aem
 yrFNYxDQUwSeXhiTEkurwTTrJ+dOBLJlxZo1GceYy7smfz391Qol4bmzz136aROa
 K2IG+Tz2UjtOM5v6a8A04e5hf1pdazSXoL39y6s4gYsrZ34Eg5Wr5m0KyL6pp9bO
 xmvG+ksSz4yRQFkrFBb9V5OHvJCiDx9Wzt8PogR3aH5AOTUf7aMeD6w1RBDbZpO6
 JXthAeFypEUb1+epxmtXvr3UPfvQNoqHbmf0Mzan9NZDlAfc/2FIxVSwrWSNyg5U
 jYl3McYWFLEzufh5YK5Jwu20Zo7++i8sy4U5mq6UOLDljhiM5qLKPG16R61cU54j
 8jou2Uxr9nOoqp+J2iTvKy/dzTjsrwoHtHI6JpblK7TP97He0QvwXzhJCa2fAOeC
 VI2rvSubbrvPdFDHw3l09ub6kQKXANrPT0pB1rY+rdZa9b85YU5p5mHewLka+Iul
 3k2z/byezoYsvkOsVhuvR/m6P+sTYpft1RRf14T89J/GlHjDAsEqS/qp71pSy9CU
 C/a1CG9VL8CPQO2cmwCR38f+UhXZUNiUZXWQTmv1BVbm7cAnhDKtJxx4CmZSzPDj
 3hzYTKjzyQUnKEDRL7doWfTDV0Wr61TWDhAh93rwHZ2qJgY1HdoQ5uFXV2P0VgLW
 JI2PHiDd9fVBSN7NpT6w
 =Mq91
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2019-01-11' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Not a huge amount for rc2, assume the usual quiet period, and rc3 will
  be most of it.

  amdgpu:
   - Powerplay fixes
   - Virtual display pinning fixes
   - Golden register updates for Vega
   - Pitch and gem size validation fixes
   - SR-IOV init error fix
   - Pagetables in system RAM disable for some Raven system
   - DP-MST resume fixes

  tc358767 bridge:
   - fix to work with displayport connector"

* tag 'drm-fixes-2019-01-11' of git://anongit.freedesktop.org/drm/drm: (26 commits)
  drm/amdgpu: disable system memory page tables for now
  drm/amdgpu: set WRITE_BURST_LENGTH to 64B to workaround SDMA1 hang
  drm/amdgpu: fix CPDMA hang in PRT mode for VEGA20
  drm/bridge: tc358767: use DP connector if no panel set
  drm/bridge: tc358767: fix output H/V syncs
  drm/bridge: tc358767: reject modes which require too much BW
  drm/bridge: tc358767: fix initial DP0/1_SRCCTRL value
  drm/bridge: tc358767: fix single lane configuration
  drm/bridge: tc358767: add defines for DP1_SRCCTRL & PHY_2LANE
  drm/bridge: tc358767: add bus flags
  drm/dp_mst: Add __must_check to drm_dp_mst_topology_mgr_resume()
  drm/amdgpu: Don't fail resume process if resuming atomic state fails
  drm/amdgpu: Don't ignore rc from drm_dp_mst_topology_mgr_resume()
  drm/amdgpu: validate user GEM object size
  drm/amdgpu: validate user pitch alignment
  drm/amd/powerplay: drop the unnecessary uclk hard min setting
  drm/amd/powerplay: avoid possible buffer overflow
  drm/amd/powerplay: create pp_od_clk_voltage device file under OD support
  drm/amd/powerplay: update OD support flag for SKU with no OD capabilities
  drm/amdgpu: make gfx9 enter into rlc safe mode when set MGCG
  ...
2019-01-11 08:58:02 -08:00
Dmitry Safonov
d3736d82e8 tty: Don't hold ldisc lock in tty_reopen() if ldisc present
Try to get reference for ldisc during tty_reopen().
If ldisc present, we don't need to do tty_ldisc_reinit() and lock the
write side for line discipline semaphore.
Effectively, it optimizes fast-path for tty_reopen(), but more
importantly it won't interrupt ongoing IO on the tty as no ldisc change
is needed.
Fixes user-visible issue when tty_reopen() interrupted login process for
user with a long password, observed and reported by Lukas.

Fixes: c96cf923a9 ("tty: Don't block on IO when ldisc change is pending")
Fixes: 83d817f410 ("tty: Hold tty_ldisc_lock() during tty_reopen()")
Cc: Jiri Slaby <jslaby@suse.com>
Reported-by: Lukas F. Hartmann <lukas@mntmn.com>
Tested-by: Lukas F. Hartmann <lukas@mntmn.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-11 17:03:42 +01:00
Steve French
48d2ba6257 cifs: update internal module version number
To 2.16

Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:14:40 -06:00
Pavel Shilovsky
9a66396f18 CIFS: Fix error paths in writeback code
This patch aims to address writeback code problems related to error
paths. In particular it respects EINTR and related error codes and
stores and returns the first error occurred during writeback.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Acked-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:14:40 -06:00
Pavel Shilovsky
ee258d7915 CIFS: Move credit processing to mid callbacks for SMB3
Currently we account for credits in the thread initiating a request
and waiting for a response. The demultiplex thread receives the response,
wakes up the thread and the latter collects credits from the response
buffer and add them to the server structure on the client. This approach
is not accurate, because it may race with reconnect events in the
demultiplex thread which resets the number of credits.

Fix this by moving credit processing to new mid callbacks that collect
credits granted by the server from the response in the demultiplex thread.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:14:40 -06:00
Pavel Shilovsky
8a26f0f781 CIFS: Fix credits calculation for cancelled requests
If a request is cancelled, we can't assume that the server returns
1 credit back. Instead we need to wait for a response and process
the number of credits granted by the server.

Create a separate mid callback for cancelled request, parse the number
of credits in a response buffer and add them to the client's credits.
If the didn't get a response (no response buffer available) assume
0 credits granted. The latter most probably happens together with
session reconnect, so the client's credits are adjusted anyway.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:14:40 -06:00
Ross Lagerwall
b9a74cde94 cifs: Fix potential OOB access of lock element array
If maxBuf is small but non-zero, it could result in a zero sized lock
element array which we would then try and access OOB.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
2019-01-11 07:14:40 -06:00
Ross Lagerwall
92a8109e4d cifs: Limit memory used by lock request calls to a page
The code tries to allocate a contiguous buffer with a size supplied by
the server (maxBuf). This could fail if memory is fragmented since it
results in high order allocations for commonly used server
implementations. It is also wasteful since there are probably
few locks in the usual case. Limit the buffer to be no larger than a
page to avoid memory allocation failures due to fragmentation.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:14:40 -06:00
Aurelien Aptel
15bc77f94e cifs: move large array from stack to heap
This addresses some compile warnings that you can
see depending on configuration settings.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:14:39 -06:00
Pavel Shilovsky
ee13919c2e CIFS: Do not hide EINTR after sending network packets
Currently we hide EINTR code returned from sock_sendmsg()
and return 0 instead. This makes a caller think that we
successfully completed the network operation which is not
true. Fix this by properly returning EINTR to callers.

Cc: <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2019-01-11 07:13:05 -06:00
Gustavo A. R. Silva
21face6f0d ARM: integrator: impd1: use struct_size() in devm_kzalloc()
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct foo {
    int stuff;
    void *entry[];
};

instance = devm_kzalloc(dev, sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);

Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:

instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL);

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
2019-01-11 13:33:00 +01:00
AKASHI Takahiro
279667212a arm64: kexec_file: return successfully even if kaslr-seed doesn't exist
In kexec_file_load, kaslr-seed property of the current dtb will be deleted
any way before setting a new value if possible. It doesn't matter whether
it exists in the current dtb.

So "ret" should be reset to 0 here.

Fixes: commit 884143f60c ("arm64: kexec_file: add kaslr support")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-01-11 10:10:51 +00:00
Jean-Philippe Brucker
c7777236dd ACPI/IORT: Fix rc_dma_get_range()
When executed for a PCI_ROOT_COMPLEX type, iort_match_node_callback()
expects the opaque pointer argument to be a PCI bus device. At the
moment rc_dma_get_range() passes the PCI endpoint instead of the bus,
and we've been lucky to have pci_domain_nr(ptr) return 0 instead of
crashing. Pass the bus device to iort_scan_node().

Fixes: 5ac65e8c89 ("ACPI/IORT: Support address size limit for root complexes")
Reported-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Cc: stable@vger.kernel.org
Cc: Will Deacon <will.deacon@arm.com>
Cc: Hanjun Guo <hanjun.guo@linaro.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-01-11 10:02:59 +00:00
Greg Kroah-Hartman
06382deac2 Revert "staging: rtl8723bs: Mark ACPI table declaration as used"
This reverts commit e6d093719e.

Turns out it is not needed at all, a fix for clang was made and accepted
upstream in that project that makes this change unnecessary.  So revert
it.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-11 10:40:13 +01:00
Daniel Vetter
e2d3c414ec Merge tag 'drm-intel-fixes-2019-01-11' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
i915 fixes for v5.0-rc2:
- Disable PSR for Apple panels
- Broxton ERR_PTR error state fix
- Kabylake VECS workaround fix
- Unwind failure on pinning the gen7 ppgtt
- GVT workload request allocation fix

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87pnt35z8h.fsf@intel.com
2019-01-11 10:26:21 +01:00
Daniel Vetter
95681cda8d Second pull request, drm-misc-fixes for v5.0-rc2:
- Fix fb-helper to work correctly with SDL 1.2 bugs.
 - Fix lockdep warning in the atomic ioctl and setproperty.
 From first pull request:
 - Fixes for the tc358767 bridge to work correctly with
   tc358867 using a DP connector.
 - Make resume work on amdgpu when a DP-MST display is unplugged.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEuXvWqAysSYEJGuVH/lWMcqZwE8MFAlw3T9MACgkQ/lWMcqZw
 E8NkNRAAp4ctGFP/1Q02Y+Eqc/lfP+K0+6/olUt3xg7mj9NPG/5ZV0GtKGQ9fR2+
 px22Fvb9ZetrnjbuwgQ0lkaOYBjB4S9PBPBnZS0HDRw6AOBvPBEcZSdYiOgkH2FX
 Lwm3G98Ue/4H8IEK2QvHNFyoqyKy+M5a1mzuXfuYfBdf/u3pZnbZZMs2fSd6C6vn
 A1D6qqdU5z0rMLPSAQ+up48u+R13MX2khL0x8Zwt2RhhHFAJ49o6S/Wgy6TkpNFp
 q3l2+ltWyEKZaLW6Aun8yLYZHn0PH88rpVB6QWx7UZqhHP2xyyuWZCRaE/HWD6dx
 PfSevNJTYF9m8H6kOek5MTy+VUo4IRfxPvfe/sEnLeYd6mVd/I2ov9jf9Zbl6HoZ
 RfKqNqJsXMekyl2vK56GRDK3Li+eUwygtyRcfQINV5pvOomWQC+A6X/CtoN2g8Zw
 4SNRJ3lnUiJhFK8aazK+k1o3AkYPdPtSCgxpqCYpUVqZ05V1cdl7EFtA4ZsZedxu
 1VoPlUS07uG/wP9AdONkmo/5aRjpWY0FGJ/ZZS6CqOKO0F5qgXjZdDkbc/4M5WV0
 2SVwi3fGCrzFg5uIoM/3iAEXEdPYAMkqmX1etjeqmejWTxlg0relCY1Q6s4tTLMI
 4isql765+ydZxk6qC2eHxohtgq5AnLUtgaqqiHZPbf4nn/s4edo=
 =7UHP
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2019-01-10-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

Second pull request, drm-misc-fixes for v5.0-rc2:
- Fix fb-helper to work correctly with SDL 1.2 bugs.
- Fix lockdep warning in the atomic ioctl and setproperty.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/2cf24f5c-2b1f-befa-8d08-058661146b61@linux.intel.com
2019-01-11 10:25:06 +01:00
Rafael J. Wysocki
65a4f3a1ef Merge branches 'acpi-pci', 'acpi-power' and 'acpi-misc'
* acpi-pci:
  ACPI: Fix build failure when CONFIG_NLS is set to 'n'

* acpi-power:
  ACPI: power: Skip duplicate power resource references in _PRx

* acpi-misc:
  ACPI: NUMA: Use correct type for printing addresses on i386-PAE
2019-01-11 10:12:07 +01:00
Rafael J. Wysocki
343e60e52a Merge branches 'pm-cpuidle', 'pm-cpufreq' and 'pm-sleep'
* pm-cpuidle:
  doc: trace: fix reference to cpuidle documentation file
  cpuidle / Documentation: Update cpuidle MAINTAINERS entry

* pm-cpufreq:
  cpufreq: scmi: Fix frequency invariance in slow path
  cpufreq: check if policy is inactive early in __cpufreq_get()
  cpufreq: scpi/scmi: Fix freeing of dynamic OPPs
  cpufreq / Documentation: Update cpufreq MAINTAINERS entry

* pm-sleep:
  PM: sleep: call devfreq suspend/resume
2019-01-11 10:09:51 +01:00
Dave Airlie
ae5e5ae90d Merge branch 'linux-4.21' of git://github.com/skeggsb/linux into drm-fixes
3 nouveau fixes:
one backlight, falcon register access, and a fan fix.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Ben Skeggs <skeggsb@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv4MHr=Rq3FkZFTYWPc7o5-dTWFysXB=wN2L91SYeFbzkQ@mail.gmail.com
2019-01-11 17:25:10 +10:00
Ingo Molnar
4e72ee8872 perf/core fixes and improvements:
perf trace:
 
   Ravi Bangoria:
 
   - Rework PowerPC syscall table generation, now using a .tbl file just like
     x86_64 and S/390, also silencing a tools build warning about headers out of
     sync with the kernel sources.
 
 tools include uapi:
 
   Arnaldo Carvalho de Melo:
 
   - Sync linux/if_link.h copy with the kernel sources, silencing a build warning.
 
 perf top:
 
   Arnaldo Carvalho de Melo:
 
   - Add 'arch_cpu_idle' to the list of kernel idle symbols, noticed on a Orange
     Pi Zero ARM board, just like with other symbols in other arches.
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQR2GiIUctdOfX2qHhGyPKLppCJ+JwUCXDd1iAAKCRCyPKLppCJ+
 J2G4AP9Ap7B1GKHJK1f9niTjTa249SKZtpXSKSkMfFJNjQAT+wD8C0+MrmjhywVv
 FoiaCMn/KPNNslPSXwhzrG3DXDSqIQg=
 =9St5
 -----END PGP SIGNATURE-----

Merge tag 'perf-core-for-mingo-5.0-20190110' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull perf/core fixes and improvements from Arnaldo Carvalho de Melo:

perf trace:

  Ravi Bangoria:

  - Rework PowerPC syscall table generation, now using a .tbl file just like
    x86_64 and S/390, also silencing a tools build warning about headers out of
    sync with the kernel sources.

tools include uapi:

  Arnaldo Carvalho de Melo:

  - Sync linux/if_link.h copy with the kernel sources, silencing a build warning.

perf top:

  Arnaldo Carvalho de Melo:

  - Add 'arch_cpu_idle' to the list of kernel idle symbols, noticed on a Orange
    Pi Zero ARM board, just like with other symbols in other arches.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-01-11 08:12:09 +01:00
Ilia Mirkin
a5176a4cb8 drm/nouveau/falcon: avoid touching registers if engine is off
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108980
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2019-01-11 16:25:54 +10:00
Takashi Iwai
118780066e drm/nouveau: Don't disable polling in fallback mode
When a fan is controlled via linear fallback without cstate, we
shouldn't stop polling.  Otherwise it won't be adjusted again and
keeps running at an initial crazy pace.

Fixes: 800efb4c28 ("drm/nouveau/drm/therm/fan: add a fallback if no fan control is specified in the vbios")
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1103356
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107447
Reported-by: Thomas Blume <thomas.blume@suse.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2019-01-11 16:25:54 +10:00
Ben Skeggs
15f77c4ade drm/nouveau: register backlight on pascal and newer
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2019-01-11 16:25:54 +10:00
Sowjanya Komatineni
b67d4530cd i2c: tegra: Fix Maximum transfer size
Tegra194 supports maximum 64K Bytes transfer per packet.
Tegra186 and prior supports maximum 4K Bytes transfer per packet.

This patch fixes this payload difference between Tegra194 and prior
Tegra chipsets using separate i2c_adapter_quirks.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-11 00:15:04 +01:00
Yi Zeng
6ebec961d5 i2c: dev: prevent adapter retries and timeout being set as minus value
If adapter->retries is set to a minus value from user space via ioctl,
it will make __i2c_transfer and __i2c_smbus_xfer skip the calling to
adapter->algo->master_xfer and adapter->algo->smbus_xfer that is
registered by the underlying bus drivers, and return value 0 to all the
callers. The bus driver will never be accessed anymore by all users,
besides, the users may still get successful return value without any
error or information log print out.

If adapter->timeout is set to minus value from user space via ioctl,
it will make the retrying loop in __i2c_transfer and __i2c_smbus_xfer
always break after the the first try, due to the time_after always
returns true.

Signed-off-by: Yi Zeng <yizeng@asrmicro.com>
[wsa: minor grammar updates to commit message]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
2019-01-11 00:14:55 +01:00
Fabio Estevam
2076607a20 qcom-scm: Include <linux/err.h> header
Since commit e6f6d63ed1 ("drm/msm: add headless gpu device for imx5")
the DRM_MSM symbol can be selected by SOC_IMX5 causing the following
error when building imx_v6_v7_defconfig:

In file included from ../drivers/gpu/drm/msm/adreno/a5xx_gpu.c:17:0:
../include/linux/qcom_scm.h: In function 'qcom_scm_set_cold_boot_addr':
../include/linux/qcom_scm.h:73:10: error: 'ENODEV' undeclared (first use in this function)
  return -ENODEV;

Include the <linux/err.h> header file to fix this problem.

Reported-by: kernelci.org bot <bot@kernelci.org>
Fixes: e6f6d63ed1 ("drm/msm: add headless gpu device for imx5")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2019-01-10 17:04:45 -06:00
Jens Axboe
a39c330d74 Merge branch 'nvme-5.0' of git://git.infradead.org/nvme into for-linus
Pull NVMe fixes from Christoph.

* 'nvme-5.0' of git://git.infradead.org/nvme:
  nvme: don't initlialize ctrl->cntlid twice
  nvme: introduce NVME_QUIRK_IGNORE_DEV_SUBNQN
  nvme: pad fake subsys NQN vid and ssvid with zeros
  nvme-multipath: zero out ANA log buffer
  nvme-fabrics: unset write/poll queues for discovery controllers
  nvme-tcp: don't ask if controller is fabrics
  nvme-tcp: remove dead code
  nvme-pci: fix out of bounds access in nvme_cqe_pending
  nvme-pci: rerun irq setup on IO queue init errors
  nvme-pci: use the same attributes when freeing host_mem_desc_bufs.
  nvme-pci: fix the wrong setting of nr_maps
2019-01-10 15:29:57 -07:00
Linus Torvalds
de6629eb26 pci-v5.0-fixes-1
-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAlw3tTMUHGJoZWxnYWFz
 QGdvb2dsZS5jb20ACgkQWYigwDrT+vwr5A//fhTsrQw72rWinli5YRq5tDooyrY7
 IxgUUQw812S7q60bV3Eo5UvcKMfb8vLbFSmjdfHegNC9oOl8HG1ugQjme1IUQ6c1
 hLYroDD85vC+Hmk2NoHyLiDDj51UCjarDlqt8XjbeGSc9YkZhYLXO+MLHJhJFkMM
 IIvshG6vQtBKbvhC6X3kzAfSiFX7QbPHL47QRnDJ4G0rASBNO0iiJi6t+zY/5gee
 Q0V+7BWnknNhfXPhGuA2H3nvZrmGOJxcmeZRZ8/u6DIvUqXH1bCm1hfjMpEkFivo
 y4be8I/1+jrlLS85iGK4pAz/ItSEbvdoB4d3+cG9XXkuL2qjSEo3Q4T+HuIb7zGj
 WsbPP1sV3+nMmQ5FlEHMIMxu2oL1EQ+GITwNoluT4i8IYKD6jjyP3LIzKrPIHQPY
 77uMBY2V7F9fWIrN/QJIvJxTvW7hnkH99xDniAfu9pogrmaALG59IpQl9GgRVrtm
 gUc5eA2SgYlZEKpuwgh20io+nJGt2V4twuIicpNR3ea6cFY6HJ5UujO5UD/CGXCE
 bpO0d673rmzNHhUiXdrqeRWIrLTNlq9FwfovxnLmErtzkiA6uHs7Oopu+yipQDzx
 YADJY3VargzAKJcci969RrJMtzt6J8HjN+/XGG+BbLymj/krhpSnszP+T1QZ8tER
 buz3wwge5ZT3HFc=
 =PX/M
 -----END PGP SIGNATURE-----

Merge tag 'pci-v5.0-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fix from Bjorn Helgaas:
 "Fix Amlogic Meson host controller driver build failure (Corentin
  Labbe)"

* tag 'pci-v5.0-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: amlogic: Fix build failure due to missing gpio header
2019-01-10 14:16:47 -08:00
Dave Airlie
f34c48e06d Merge branch 'drm-fixes-5.0' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
- Powerplay fixes
- Virtual display pinning fixes
- Golden register updates for vega
- Pitch and gem size validation fixes
- Fix for error case in sr-iov init
- Disable page tables in system memory on RV due to issues with IOMMU
  reported on some platforms

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190109204336.3315-1-alexander.deucher@amd.com
2019-01-11 07:38:56 +10:00
Linus Torvalds
4f548c25a3 RISC-V Updates for 4.21-rc2 v2
This tag contains a handful of updates that slipped through the cracks
 during the merge window due to the holidays.  The fixes are mostly
 independent, with the exception of one larger audit-related branch.
 There's more information about the audit branch in that merge, the rest
 are:
 
 * The BSS has been moved, which shrinks flat images.
 * A fix to test-bpf so it compiles on RV64I-based systems.
 * A fix to respect the kernel commandline when there is no device tree.
 * A fix to prevent CPUs from trying to put themselves to sleep when
   bringing down the system.
 * Support for MODULE_SECTIONS on RV32I-based systems.
 * [new in v2] The addition of an SBI earlycon driver.  This is
   definately a new feature, but I'd like to include it now because I
   dropped this patch when submitting the merge window PR that removed our
   EARLY_PRINTK support.
 
 As usual, I've tested this by booting a Fedora-based image on a recent
 QEMU (this time just whatever I had lying around).
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEAM520YNJYN/OiG3470yhUCzLq0EFAlw2fYgTHHBhbG1lckBk
 YWJiZWx0LmNvbQAKCRDvTKFQLMurQaNXD/47mGXSTUWfGeW9eHh1zFYMyYWertgs
 +nB0Gkmja2sUs5DHW+JFg5TPqKw8EAK3bgrjSrFXTGBRdGeCXcHDoK0n8cQ8eL2C
 smxO2ye18db+zP76loDmvAugKsguPa0Ne7aE/aZ0qaMPQH2c6kIYgNIE09ozQWTb
 yfk/srhgQvu6WFT8dhjqK1YtCE4qPB1U7UMno3TgL/DjRQr0+uNz9MUU4kRkxEl4
 fEtV7rhDUF6gwfb4WAvlTxBrxg/ZbytHXk9swedNDLfIP2vq5C6ALtGnPBshKHWZ
 z+splwYP0g/BZ4/lXJr4vIfxS+6OuFuR8eHCh/stFijL6TkpDZOOjAb576nrpiPT
 On1h6G5/6UIGTApgDhq27FJ6s3om2gw2XiM7kbl1DoDHT4giDB6c/eK2IASRd4zC
 FHk8ya+GBdp9QFJJyL6YX392nRFEg9pLRGMYEwrvcpn5v8jz3umozv2WnWwamiR0
 kwKBJrcj2Oii5a3aBoa2EdMomC1KHNF5nKoN5W6AozIzSSLOx0wSr58ULLoGC/2h
 8Mn8hfyUCs+v+5SnXk5drrV8mXBsWAEsOPZfsnw6RUqGsjEysj9Z2UEtYY8WLPM3
 GDpsXGK1nLzgusvUoITBJi+k4zNs9mP7PBtfEHBsPH/ij5R9doCvSGco4YOXONdp
 i5ToKwmFDBJTOw==
 =WPnn
 -----END PGP SIGNATURE-----

Merge tag 'riscv-for-linus-4.21-rc2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux

Pull RISC-V updates from Palmer Dabbelt:
 "This tag contains a handful of updates that slipped through the cracks
  during the merge window due to the holidays. The fixes are mostly
  independent, with the exception of one larger audit-related branch.

  Core RISC-V updates:

   - The BSS has been moved, which shrinks flat images.

   - A fix to test-bpf so it compiles on RV64I-based systems.

   - A fix to respect the kernel commandline when there is no device
     tree.

   - A fix to prevent CPUs from trying to put themselves to sleep when
     bringing down the system.

   - Support for MODULE_SECTIONS on RV32I-based systems.

   - [new in v2] The addition of an SBI earlycon driver. This is
     definately a new feature, but I'd like to include it now because I
     dropped this patch when submitting the merge window PR that removed
     our EARLY_PRINTK support.

  RISC-V audit updates:

   - The addition of NR_syscalls into unistd.h, which is necessary for
     CONFIG_FTRACE_SYSCALLS.

   - The definition of CREATE_TRACE_POINTS so __tracepoint_sys_{enter,exit}
     get defined.

   - A fix for trace_sys_exit() so we can enable HAVE_SYSCALL_TRACEPOINTS

  As usual, I've tested this by booting a Fedora-based image on a recent
  QEMU (this time just whatever I had lying around).

* tag 'riscv-for-linus-4.21-rc2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
  tty/serial: Add RISC-V SBI earlycon support
  riscv: add HAVE_SYSCALL_TRACEPOINTS to Kconfig
  riscv: fix trace_sys_exit hook
  riscv: define CREATE_TRACE_POINTS in ptrace.c
  riscv: define NR_syscalls in unistd.h
  riscv: audit: add audit hook in do_syscall_trace_enter/exit()
  riscv: add audit support
  RISC-V: Support MODULE_SECTIONS mechanism on RV32
  MAINTAINERS: SiFive drivers: add myself as a SiFive driver maintainer
  MAINTAINERS: SiFive drivers: change the git tree to a SiFive git tree
  riscv: don't stop itself in smp_send_stop
  arch: riscv: support kernel command line forcing when no DTB passed
  tools uapi: fix RISC-V 64-bit support
  RISC-V: Make BSS section as the last section in vmlinux.lds.S
2019-01-10 13:36:53 -08:00
Dave Airlie
bd86c9e66c Pull request for drm-misc-fixes for v5.0-rc2:
- Fixes for the tc358767 bridge to work correctly with
   tc358867 using a DP connector.
 - Make resume work on amdgpu when a DP-MST display is unplugged.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEuXvWqAysSYEJGuVH/lWMcqZwE8MFAlw2660ACgkQ/lWMcqZw
 E8Oe6xAAtgfGxm9swLsRqoLl/vhevtjJ4VylFH8Z+P5wOpQ/nbcFu/dIAk9+4GUh
 uqzm71t4Fw1Guv9eKJeWn2hztvlgRMygC+hGaHfEsMheKEo48d+5hA6IJKT00qo0
 sFDdNxvbTWHa7hamC2b5EK18PKlq1eRxatDCHUbaOAOIe+vdonu9xYD8aKQvEo0P
 ZjfgZHYHVmUNn1L3rO0X9GadDIDEL6NajYvU6PcqFmkREUiEKpAeIsPf6xQeOjUy
 32IoGJ7sI1ZCT9KDOoDCpL2E7ILGLDgiQnwZkjePuTdDwcz0XijAfOLICI5xs3zG
 VXi4ZrfeaoxguETEfJcDhg4lZFSeBL9zxfN1WJ7Z9njUj4sbKD31mTWnV0gIXniW
 U8+qI5qJQ3ynkVzJP1+HvQxtoesZ7wQxB9Kr6xa4oASr1+FbbSQUOOe0232ZCjUk
 AG9MgC69uac1//yfLXVCvy1DosS4QWWfUf5tDlKi5hKebkPw+3XzlHwHzhlPxrOf
 HlJQ6TMTAgqFNbKkF+CgHYBh3sMmJuc7ps6ee/z6D9FOiRYO5LZWMlz6THd+1fJ3
 3Zj56J7gbiugaEqyskiwRBLZNy4sfu7kwl+CWWpJNegj0AzZ8Sk8NDwht4oY8dA5
 z//4Xe3+dxkDVAjcJ37KGU2vvVHyGvmOHkmRyIt30MjoTxpKztk=
 =JBCs
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2019-01-10' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

Pull request for drm-misc-fixes for v5.0-rc2:
- Fixes for the tc358767 bridge to work correctly with
  tc358867 using a DP connector.
- Make resume work on amdgpu when a DP-MST display is unplugged.

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1c47722d-c416-184d-4340-0dc6a614d685@linux.intel.com
2019-01-11 06:32:44 +10:00