linux-2.6-microblaze.git
4 years agoplatform/x86: intel_pmc_ipc: Make intel_pmc_ipc_simple_command() static
Mika Westerberg [Wed, 22 Jan 2020 16:46:12 +0000 (19:46 +0300)]
platform/x86: intel_pmc_ipc: Make intel_pmc_ipc_simple_command() static

This function is not called outside of intel_pmc_ipc.c so we can make it
static instead.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_pmc_ipc: Make intel_pmc_gcr_update() static
Mika Westerberg [Wed, 22 Jan 2020 16:46:11 +0000 (19:46 +0300)]
platform/x86: intel_pmc_ipc: Make intel_pmc_gcr_update() static

This function is not called outside of intel_pmc_ipc.c so we can make it
static instead.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_scu_ipc: Reformat kernel-doc comments of exported functions
Mika Westerberg [Wed, 22 Jan 2020 16:28:13 +0000 (19:28 +0300)]
platform/x86: intel_scu_ipc: Reformat kernel-doc comments of exported functions

Format kernel-doc comments of the exported functions to follow the
typical format that does not have tab indentation. Also capitalize
parameter descriptions and add a missing period.

No functional changes intended.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_scu_ipc: Drop intel_scu_ipc_raw_command()
Mika Westerberg [Wed, 22 Jan 2020 16:28:12 +0000 (19:28 +0300)]
platform/x86: intel_scu_ipc: Drop intel_scu_ipc_raw_command()

There is no user for this function so we can drop it from the driver.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_scu_ipc: Drop intel_scu_ipc_io[read|write][8|16]()
Mika Westerberg [Wed, 22 Jan 2020 16:28:11 +0000 (19:28 +0300)]
platform/x86: intel_scu_ipc: Drop intel_scu_ipc_io[read|write][8|16]()

There are no users for these so we can remove them.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_scu_ipc: Drop unused macros
Mika Westerberg [Wed, 22 Jan 2020 16:28:10 +0000 (19:28 +0300)]
platform/x86: intel_scu_ipc: Drop unused macros

These macros are not used anywhere in the driver so drop them.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_scu_ipc: Drop unused prototype intel_scu_ipc_fw_update()
Mika Westerberg [Wed, 22 Jan 2020 16:28:09 +0000 (19:28 +0300)]
platform/x86: intel_scu_ipc: Drop unused prototype intel_scu_ipc_fw_update()

There is no implementation for that anymore so drop the prototype.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_scu_ipc: Sleeping is fine when polling
Mika Westerberg [Wed, 22 Jan 2020 16:28:08 +0000 (19:28 +0300)]
platform/x86: intel_scu_ipc: Sleeping is fine when polling

There is no reason why the driver would need to block other threads from
running the CPU while it is waiting for the SCU IPC to complete its
work. For this reason switch the driver to use usleep_range() instead
with a bit more relaxed polling loop.

Also add constant for the timeout and use the same value for both
polling and interrupt modes.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_scu_ipc: Drop intel_scu_ipc_i2c_cntrl()
Mika Westerberg [Wed, 22 Jan 2020 16:28:07 +0000 (19:28 +0300)]
platform/x86: intel_scu_ipc: Drop intel_scu_ipc_i2c_cntrl()

There are no existing users for this functionality so drop it from the
driver completely. This also means we don't need to keep the struct
intel_scu_ipc_pdata_t around anymore so remove that as well.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_scu_ipc: Remove Lincroft support
Mika Westerberg [Wed, 22 Jan 2020 16:28:06 +0000 (19:28 +0300)]
platform/x86: intel_scu_ipc: Remove Lincroft support

Moorestown support was removed years ago with by the commit 1a8359e411eb
("x86/mid: Remove Intel Moorestown"). Lincroft is the CPU side chip of
Moorestown and not supported anymore so remove the code from the driver.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_scu_ipc: Add constants for register offsets
Mika Westerberg [Wed, 22 Jan 2020 16:28:05 +0000 (19:28 +0300)]
platform/x86: intel_scu_ipc: Add constants for register offsets

This makes the code more readable. These are taken from intel_pmc_ipc.c
which implements the same thing.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_scu_ipc: Fix interrupt support
Mika Westerberg [Wed, 22 Jan 2020 16:28:04 +0000 (19:28 +0300)]
platform/x86: intel_scu_ipc: Fix interrupt support

Currently the driver has disabled interrupt support for Tangier but
actually interrupt works just fine if the command is not written twice
in a row. Also we need to ack the interrupt in the handler.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_scu_ipcutil: Remove default y from Kconfig
Mika Westerberg [Wed, 22 Jan 2020 16:18:43 +0000 (19:18 +0300)]
platform/x86: intel_scu_ipcutil: Remove default y from Kconfig

This driver is by no means essential for system to boot up so remove
default y from it.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_mid_powerbtn: Take a copy of ddata
Mika Westerberg [Wed, 22 Jan 2020 16:05:20 +0000 (19:05 +0300)]
platform/x86: intel_mid_powerbtn: Take a copy of ddata

The driver gets driver_data from memory that is marked as const (which
is probably put to read-only memory) and it then modifies it. This
likely causes some sort of fault to happen.

Fix this by taking a copy of the structure.

Fixes: c94a8ff14de3 ("platform/x86: intel_mid_powerbtn: make mid_pb_ddata const")
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: asus-nb-wmi: Support left round button on N56VB
Paul Cercueil [Mon, 13 Jan 2020 22:39:27 +0000 (19:39 -0300)]
platform/x86: asus-nb-wmi: Support left round button on N56VB

The N56VB laptop has a round button located on the left side above the
keyboard. Map it to F13 since it does not have any predeterminated
purpose.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agotools/power/x86/intel-speed-select: Update version
Srinivas Pandruvada [Tue, 14 Jan 2020 19:22:17 +0000 (11:22 -0800)]
tools/power/x86/intel-speed-select: Update version

As we added new set of mailbox commands, increment version.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agotools/power/x86/intel-speed-select: Change the order for clos disable
Srinivas Pandruvada [Tue, 14 Jan 2020 19:22:16 +0000 (11:22 -0800)]
tools/power/x86/intel-speed-select: Change the order for clos disable

In turbo-freq or base-freq auto mode, for disable, first disable the feature and
then disable clos.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agotools/power/x86/intel-speed-select: Fix result display for turbo-freq auto mode
Srinivas Pandruvada [Tue, 14 Jan 2020 19:22:15 +0000 (11:22 -0800)]
tools/power/x86/intel-speed-select: Fix result display for turbo-freq auto mode

The turbo-freq enable with auto mode, prints result for the last possible
CPU, which is not correct when either CPU is not present or user wants
command to be limited to a single die/package. For example, in the
below command user wants to limit to die/package 0, but the
"turbo-freq --auto" result is displayed using the other package.

$ sudo intel-speed-select -c 0 turbo-freq enable -a
Intel(R) Speed Select Technology
 package-0
  die-0
    cpu-0
      turbo-freq
        enable:success
 package--1
  die-0
    cpu-31
      turbo-freq --auto
        enable:success

Since we do have to traverse all CPUs, don't display CPU info for
"turbo-freq --auto", as we already displayed the result for
turbo-freq enable with the CPU information.

With the fix, the same command results in:

$ sudo intel-speed-select -c 0 turbo-freq enable -a
Intel(R) Speed Select Technology
package-0
  die-0
    cpu-0
      turbo-freq
        enable:success
      turbo-freq --auto
        enable:success

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agotools/power/x86/intel-speed-select: Add support for core-power discovery
Srinivas Pandruvada [Tue, 14 Jan 2020 19:22:14 +0000 (11:22 -0800)]
tools/power/x86/intel-speed-select: Add support for core-power discovery

It is possible that BIOS may not enable core-power feature. In this case
this additional interface will allow to enable from this utility. Also
the information dump, includes the current status of core-power.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: ISST: Allow additional core-power mailbox commands
Srinivas Pandruvada [Tue, 14 Jan 2020 19:22:13 +0000 (11:22 -0800)]
platform/x86: ISST: Allow additional core-power mailbox commands

To discover core-power capability, some new mailbox commands are added. Allow
those commands to execute.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: mlx-platform: Add support for next generation systems
Vadim Pasternak [Mon, 13 Jan 2020 16:28:39 +0000 (16:28 +0000)]
platform/x86: mlx-platform: Add support for next generation systems

Add support for new Mellanox system types of basic class VMOD0010,
containing new Mellanox systems equipped with new switch device
Spectrum 3 (32x400GbE/64x200G/128x100G Ethernet switch).
These are the Top of the Rack 1U/2U/4U systems, equipped with
Mellanox Comex card and with the switch board with Mellanox Spectrum-3
device.
This class of devices can be equipped with two PS units for 1U/2U or
with four PS units for 4U systems.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/mellanox: mlxreg-hotplug: Add support for new capability register
Vadim Pasternak [Mon, 13 Jan 2020 16:28:38 +0000 (16:28 +0000)]
platform/mellanox: mlxreg-hotplug: Add support for new capability register

Add support for capability register, which is used for detection of the
actual number of interrupt capable components within the particular
group, supported by the specific system.
Such components could be for example the number of power units and
interrupts related to these units.
The motivation is to avoid adding a new code in the future in order to
distinct between the systems type supported different number of the
components like power supplies, FANs, ASICs, line cards.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: mlx-platform: Add support for new capability register
Vadim Pasternak [Mon, 13 Jan 2020 16:28:37 +0000 (16:28 +0000)]
platform/x86: mlx-platform: Add support for new capability register

Add support for capability register, which contains information about
the number of PS units equipped on the system and about minimum I2C
frequency supported by the all system's I2C devices.
Utilization of this register allows to avoid necessity of providing new
system description, in case it differs in number of PS units or in
minimal I2C frequency.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: mlx-platform: Add support for new system type
Vadim Pasternak [Mon, 13 Jan 2020 16:28:36 +0000 (16:28 +0000)]
platform/x86: mlx-platform: Add support for new system type

Add support for new Mellanox system types of basic class VMOD0009,
containing Mellanox systems equipped with the switch devices
Spectrum 1 (32x100GbE Ethernet switch) and Switch-IB/Switch-IB2
(36x100Gbe InfiniBand switch).
These are the Top of the Rack system, equipped with Mellanox Comex
card.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: mlx-platform: Set system mux configuration based on system type
Vadim Pasternak [Mon, 13 Jan 2020 16:28:35 +0000 (16:28 +0000)]
platform/x86: mlx-platform: Set system mux configuration based on system type

Separate assignment for systems mux configuration based on system type,
instead of setting the same configuration for the all.
The motivation is to allow introduction of new systems types with the
different mux topology.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoDocumentation/ABI: Add new attribute for mlxreg-io sysfs interfaces
Vadim Pasternak [Mon, 13 Jan 2020 16:28:34 +0000 (16:28 +0000)]
Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces

Add documentation for the new attributes for:
- Exposing reset causes types asserted by: platform reset, SoC reset,
  AC power failure, software power off request.
- Setting and removing system VPD (EEPROM) hardware write protection.
- Voltage regulator devices configuration update status and firmware
  version.
- Setting PCIe ASIC reset to disable or enable state during PCIe root
  complex reset.
- System static topology identification, like system's static I2C
  topology, number and type of FPGA devices within the system and so on.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: mlx-platform: Add more definitions for system attributes
Vadim Pasternak [Mon, 13 Jan 2020 16:28:33 +0000 (16:28 +0000)]
platform/x86: mlx-platform: Add more definitions for system attributes

Add new attributes for "next-generation" type systems:
- Reset cause indication, when system reset has been caused by the
  platform reset request through CPLD, by AC power failure,
  by software power off request through CPLD. by signal asserted by SOC
  through ACPI register. It introduces more reset causes, which can
  be monitored after the reboots.
- Setting and removing system VPD (EEPROM) hardware write protection.
  It allows to access VPD during production cycle and prevents VPD
  corruption on system in field.
- Voltage regulator devices configuration update status and version. It
  allows to monitor configuration update status and current active
  version for such sort of devices.
- PCIe ASIC reset disable - when set ASIC will go down upon PCIe
  root complex reset, otherwise ASIC will stay up during PCIe root
  complex reset.
- System configuration Ids to provide system static topology
  identification, like system's static I2C topology, number and type of
  FPGA devices within the system and so on.

Add the existing attribute for "iio" bank selection for system type
"msn21xx".

All the above attributes are exposed through "sysfs" by "mlxreg-io"
driver.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoDocumentation/ABI: Style changes
Vadim Pasternak [Mon, 13 Jan 2020 16:28:32 +0000 (16:28 +0000)]
Documentation/ABI: Style changes

Remove blank lines between "What" and "Date" keywords.
Start each section with "What" keyword.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoDocumentation/ABI: Add missed attribute for mlxreg-io sysfs interfaces
Vadim Pasternak [Mon, 13 Jan 2020 16:28:31 +0000 (16:28 +0000)]
Documentation/ABI: Add missed attribute for mlxreg-io sysfs interfaces

Add missed "cpld4_version" attribute.

Fixes: 52675da1d087 ("Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces")
Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoDocumentation/ABI: Fix documentation inconsistency for mlxreg-io sysfs interfaces
Vadim Pasternak [Mon, 13 Jan 2020 16:28:30 +0000 (16:28 +0000)]
Documentation/ABI: Fix documentation inconsistency for mlxreg-io sysfs interfaces

Fix attribute name from "jtag_enable", which described twice to
"cpld3_version", which is expected to be instead of second appearance
of "jtag_enable".

Fixes: 2752e34442b5 ("Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces")
Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: mlx-platform: Cosmetic changes
Vadim Pasternak [Mon, 13 Jan 2020 16:28:29 +0000 (16:28 +0000)]
platform/x86: mlx-platform: Cosmetic changes

Remove redundant semicolons at the end of few functions.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoMAINTAINERS: Update for the intel uncore frequency control
Srinivas Pandruvada [Mon, 13 Jan 2020 18:00:15 +0000 (10:00 -0800)]
MAINTAINERS: Update for the intel uncore frequency control

Add an entry for drivers/platform/x86/intel-uncore-frequency.c.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: Add support for Uncore frequency control
Srinivas Pandruvada [Mon, 13 Jan 2020 18:00:14 +0000 (10:00 -0800)]
platform/x86: Add support for Uncore frequency control

Some server users set limits on the uncore frequency using MSR 620H, while
running latency sensitive workloads. Here uncore frequency controls
RING/LLC(last-level cache) clocks.

But MSR control is not always possible from the user space, so this driver
provides a sysfs interface to set max and min frequency limits. This MSR
620H is a die scoped in multi-die system or package scoped in non multi-die
systems.

When this driver is loaded, a new directory is created under
 /sys/devices/system/cpu.

For example on a two package Skylake server:
$cd /sys/devices/system/cpu/intel_uncore_frequency

$ls
package_00_die_00 package_01_die_00

$ls package_00_die_00
max_freq_khz  min_freq_khz  initial_max_freq_khz
initial_min_freq_khz

$grep . *
    max_freq_khz:2400000
    min_freq_khz:1200000
    initial_max_freq_khz:2400000
    initial_min_freq_khz:1200000

Here, initial_max_freq_khz and initial_min_freq_khz are read only
attributes to show power up or initial values of max and min frequencies
respectively. Other attributes are read-write, so that users can modify.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0
Jian-Hong Pan [Mon, 30 Dec 2019 08:30:45 +0000 (16:30 +0800)]
platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0

Some of ASUS laptops like UX431FL keyboard backlight cannot be set to
brightness 0. According to ASUS' information, the brightness should be
0x80 ~ 0x83. This patch fixes it by following the logic.

Fixes: e9809c0b9670 ("asus-wmi: add keyboard backlight support")
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Reviewed-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_atomisp2_pm: Spelling fixes
Andy Shevchenko [Thu, 9 Jan 2020 14:15:09 +0000 (16:15 +0200)]
platform/x86: intel_atomisp2_pm: Spelling fixes

Fix ambiguous spelling in the comments.

While here, update two lines to fit one.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_atomisp2_pm: Refactor timeout loop
Andy Shevchenko [Thu, 9 Jan 2020 14:08:25 +0000 (16:08 +0200)]
platform/x86: intel_atomisp2_pm: Refactor timeout loop

The timeout loop look more naturally when done like

unsigned long timeout = ...;
...
do {
...
if (cond)
return %OK;

sleep(...);
} while (time_before(timeout));

...print timeout error...
return %ERROR;

It also saves LOCs. Convert the driver to this format of timeout loop.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: asus_wmi: Set throttle thermal policy to default
Leonid Maksymchuk [Sun, 15 Dec 2019 14:27:24 +0000 (16:27 +0200)]
platform/x86: asus_wmi: Set throttle thermal policy to default

ASUS TUF FX705DY/FX505DY starts in silent mode and under heavy
CPU load it overheats and drops CPU frequency to 399MHz and stays
at it until reboot [1]. Set throttle thermal policy to default
to avoid overheating and throttlig.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=203733
Signed-off-by: Leonid Maksymchuk <leonmaxx@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: asus_wmi: Support throttle thermal policy
Leonid Maksymchuk [Sun, 15 Dec 2019 14:26:34 +0000 (16:26 +0200)]
platform/x86: asus_wmi: Support throttle thermal policy

Throttle thermal policy ACPI device is used to control CPU cooling and
throttling. This patch adds sysfs entry for setting current mode and
Fn+F5 hotkey that switches to next.

Policy modes:
* 0x00 - default
* 0x01 - overboost
* 0x02 - silent

Signed-off-by: Leonid Maksymchuk <leonmaxx@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: touchscreen_dmi: Fix indentation in several places
Andy Shevchenko [Thu, 9 Jan 2020 15:34:05 +0000 (17:34 +0200)]
platform/x86: touchscreen_dmi: Fix indentation in several places

1. Put on one line PROPERTY_ENTRY_STRING("firmware-name", ...) lines. In most
   cases this doesn't over the limit, the rest is pretty much obvious from
   reading point of view.
2. Put on one line DMI_MATCH() parameters, we already have over the limit lines.
3. Reduce indentation of function parameters.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: touchscreen_dmi: Add info for the PiPO W11 tablet
Tim Josten [Fri, 3 Jan 2020 15:00:59 +0000 (16:00 +0100)]
platform/x86: touchscreen_dmi: Add info for the PiPO W11 tablet

Add touchscreen info for the PiPO W11 tablet.

Signed-off-by: Tim Josten <timjosten@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_pmc_core: update Comet Lake platform driver
Harry Pan [Mon, 6 Jan 2020 09:57:00 +0000 (17:57 +0800)]
platform/x86: intel_pmc_core: update Comet Lake platform driver

Adding new CML CPU model ID into platform driver support list.

Signed-off-by: Harry Pan <harry.pan@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: GPD pocket fan: Allow somewhat lower/higher temperature limits
Hans de Goede [Mon, 6 Jan 2020 14:42:19 +0000 (15:42 +0100)]
platform/x86: GPD pocket fan: Allow somewhat lower/higher temperature limits

Allow the user to configure the fan to turn on / speed-up at lower
thresholds then before (20 degrees Celcius as minimum instead of 40) and
likewise also allow the user to delay the fan speeding-up till the
temperature hits 90 degrees Celcius (was 70).

Cc: Jason Anderson <jasona.594@gmail.com>
Reported-by: Jason Anderson <jasona.594@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: GPD pocket fan: Use default values when wrong modparams are given
Hans de Goede [Mon, 6 Jan 2020 14:42:18 +0000 (15:42 +0100)]
platform/x86: GPD pocket fan: Use default values when wrong modparams are given

Use our default values when wrong module-parameters are given, instead of
refusing to load. Refusing to load leaves the fan at the BIOS default
setting, which is "Off". The CPU's thermal throttling should protect the
system from damage, but not-loading is really not the best fallback in this
case.

This commit fixes this by re-setting module-parameter values to their
defaults if they are out of range, instead of failing the probe with
-EINVAL.

Cc: stable@vger.kernel.org
Cc: Jason Anderson <jasona.594@gmail.com>
Reported-by: Jason Anderson <jasona.594@gmail.com>
Fixes: 594ce6db326e ("platform/x86: GPD pocket fan: Use a min-speed of 2 while charging")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/mellanox: fix potential deadlock in the tmfifo driver
Liming Sun [Fri, 20 Dec 2019 17:04:33 +0000 (12:04 -0500)]
platform/mellanox: fix potential deadlock in the tmfifo driver

This commit fixes the potential deadlock caused by the console Rx
and Tx processing at the same time. Rx and Tx both take the console
and tmfifo spinlock but in different order which causes potential
deadlock. The fix is to use different tmfifo spinlock for Rx and
Tx since they protect different resources and it's safe to split
the lock.

Below is the reported call trace when copying/pasting large string
in the console.

Rx:
    _raw_spin_lock_irqsave (hvc lock)
    __hvc_poll
    hvc_poll
    in_intr
    vring_interrupt
    mlxbf_tmfifo_rxtx_one_desc (tmfifo lock)
    mlxbf_tmfifo_rxtx
    mlxbf_tmfifo_work_rxtx
Tx:
    _raw_spin_lock_irqsave (tmfifo lock)
    mlxbf_tmfifo_virtio_notify
    virtqueue_notify
    virtqueue_kick
    put_chars
    hvc_push
    hvc_write (hvc lock)
    ...
    do_tty_write
    tty_write

Fixes: 1357dfd7261f ("platform/mellanox: Add TmFifo driver for Mellanox BlueField Soc")
Cc: <stable@vger.kernel.org> # 5.4+
Reviewed-by: David Woods <dwoods@mellanox.com>
Signed-off-by: Liming Sun <lsun@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel-ips: Use the correct style for SPDX License Identifier
Nishad Kamdar [Thu, 19 Dec 2019 14:30:01 +0000 (20:00 +0530)]
platform/x86: intel-ips: Use the correct style for SPDX License Identifier

This patch corrects the SPDX License Identifier style in
header files related to x86 Platform Specific Drivers.
For C header files Documentation/process/license-rules.rst
mandates C-like comments (opposed to C source files where
C++ style should be used).

Changes made by using a script provided by Joe Perches here:
https://lkml.org/lkml/2019/2/7/46.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_telemetry_debugfs: Respect error code of kstrtou32_from_user()
Andy Shevchenko [Wed, 18 Dec 2019 18:42:29 +0000 (20:42 +0200)]
platform/x86: intel_telemetry_debugfs: Respect error code of kstrtou32_from_user()

kstrtou32_from_user() may return different error codes on certain
circumstances. Respect all possible values.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_pmc_core: Fix spelling of MHz unit
Andy Shevchenko [Wed, 18 Dec 2019 18:35:44 +0000 (20:35 +0200)]
platform/x86: intel_pmc_core: Fix spelling of MHz unit

Fix spelling of MHz unit in a comment.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_pmc_core: Fix indentation in function definitions
Andy Shevchenko [Wed, 18 Dec 2019 18:37:19 +0000 (20:37 +0200)]
platform/x86: intel_pmc_core: Fix indentation in function definitions

There are two problematic places where indentation is not good to a reader
and maintainer. Fix them here.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_pmc_core: Put more stuff under #ifdef DEBUG_FS
Andy Shevchenko [Wed, 18 Dec 2019 18:39:27 +0000 (20:39 +0200)]
platform/x86: intel_pmc_core: Put more stuff under #ifdef DEBUG_FS

There is a function which is solely used for DebugFS interface,
do not build it otherwise.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_pmc_core: Respect error code of kstrtou32_from_user()
Andy Shevchenko [Wed, 18 Dec 2019 18:42:29 +0000 (20:42 +0200)]
platform/x86: intel_pmc_core: Respect error code of kstrtou32_from_user()

kstrtou32_from_user() may return different error codes on certain
circumstances. Respect all possible values.

While here, move it out of the lock: there is no data access that lock guards.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_telemetry_pltdrv: use devm_platform_ioremap_resource()
Andy Shevchenko [Mon, 21 Oct 2019 09:24:43 +0000 (12:24 +0300)]
platform/x86: intel_telemetry_pltdrv: use devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify the code a bit.

While here, drop initialized but unused ssram_base_addr and ssram_size members.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_pmc_core: Add Intel Elkhart Lake support
Gayatri Kammela [Thu, 12 Dec 2019 18:38:47 +0000 (10:38 -0800)]
platform/x86: intel_pmc_core: Add Intel Elkhart Lake support

Add Intel Elkhart Lake to the list of the platforms that driver supports
for the PMC device.

Just like Ice Lake and Tiger Lake, Elkhart Lake can also reuse all the
Cannon Lake PCH IPs. Also, it uses the same PCH IPs of Tiger Lake, no
additional effort is needed to enable but to simply reuse them.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: David E. Box <david.e.box@intel.com>
Cc: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_pmc_core: Add Intel Tiger Lake support
Gayatri Kammela [Thu, 12 Dec 2019 18:38:46 +0000 (10:38 -0800)]
platform/x86: intel_pmc_core: Add Intel Tiger Lake support

Add Intel Tiger Lake to the list of the platforms that driver supports
for the PMC device.

Just like Ice Lake, Tiger Lake can also reuse all the Cannon Lake PCH
IPs. Since Tiger Lake has almost the same number of PCH IPs as Ice Lake,
reuse Ice Lake's PPFEAR_NUM_ENTRIES instead of defining a new macro.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: David E. Box <david.e.box@intel.com>
Cc: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_pmc_core: Make debugfs entry for pch_ip_power_gating_status condi...
Gayatri Kammela [Thu, 12 Dec 2019 18:38:45 +0000 (10:38 -0800)]
platform/x86: intel_pmc_core: Make debugfs entry for pch_ip_power_gating_status conditional

Check if the platform supports and only then add a debugfs entry for PCH
IP power gating status.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: David E. Box <david.e.box@intel.com>
Cc: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_pmc_core: Create platform dependent bitmap structs
Gayatri Kammela [Thu, 12 Dec 2019 18:38:44 +0000 (10:38 -0800)]
platform/x86: intel_pmc_core: Create platform dependent bitmap structs

The current implementation of intel_pmc_core driver allows to reuse, but does
not reflect the exact number and names of IPs for a newer platform which
does not necessarily support all the IPs in the entries. The names and
number of these IPs might differ from its previous platforms. The number
of PCH IPs per platform is calculated based on PPFEAR_NUM_ENTRIES
defined, where each entry represents a bucket (8 bits). The platform can
support 'n' entries, but not necessarily all 'n * 8' IPs.

Create platform dependent bitmap structures to specify the exact number,
names of IPs while reusing the existing IPs.

The changes in this patch are preparatory to accommodate future SoCs
that might reuse the CNL/ICL PCH IPs, and to reflect the exact number of
IPs with its names.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: David E. Box <david.e.box@intel.com>
Cc: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_pmc_core: Remove unnecessary assignments
Andy Shevchenko [Wed, 18 Dec 2019 12:53:31 +0000 (14:53 +0200)]
platform/x86: intel_pmc_core: Remove unnecessary assignments

There is no need to assign NULL or 0 in the static structures explicitly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: intel_pmc_core: Clean up: Remove comma after the termination line
Gayatri Kammela [Thu, 12 Dec 2019 18:38:43 +0000 (10:38 -0800)]
platform/x86: intel_pmc_core: Clean up: Remove comma after the termination line

It is common practice to place a comma after the last entry in an
initialized array to avoid the need to add one in future patches that
extend the array. But when the last element is a termination marker, the
comma could be harmful. Any new entries must be added before the
terminator (and the comma would prevent the compiler from issuing a
warning about an entry after the terminator).

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: David E. Box <david.e.box@intel.com>
Cc: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: pcengines-apuv2: Spelling fixes in the driver
Andy Shevchenko [Wed, 18 Dec 2019 12:48:07 +0000 (14:48 +0200)]
platform/x86: pcengines-apuv2: Spelling fixes in the driver

Mainly does:
 - capitalize gpio and bios to GPIO and BIOS
 - capitalize beginning of comments
 - add periods in multi-line comments

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: pcengines-apuv2: detect apuv4 board
Enrico Weigelt, metux IT consult [Thu, 12 Dec 2019 13:27:56 +0000 (14:27 +0100)]
platform/x86: pcengines-apuv2: detect apuv4 board

GPIO stuff on APUv4 seems to be the same as on APUv2, so we just
need to match on DMI data.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: pcengines-apuv2: fix simswap GPIO assignment
Enrico Weigelt, metux IT consult [Thu, 12 Dec 2019 11:23:48 +0000 (12:23 +0100)]
platform/x86: pcengines-apuv2: fix simswap GPIO assignment

The mapping entry has to hold the GPIO line index instead of
controller's register number.

Fixes: 5037d4ddda31 ("platform/x86: pcengines-apuv2: wire up simswitch gpio as led")
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: pmc_atom: Add Siemens CONNECT X300 to critclk_systems DMI table
Michael Haener [Fri, 29 Nov 2019 09:16:49 +0000 (10:16 +0100)]
platform/x86: pmc_atom: Add Siemens CONNECT X300 to critclk_systems DMI table

The CONNECT X300 uses the PMC clock for on-board components and gets
stuck during boot if the clock is disabled. Therefore, add this
device to the critical systems list.
Tested on CONNECT X300.

Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Signed-off-by: Michael Haener <michael.haener@siemens.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes
Hans de Goede [Tue, 17 Dec 2019 19:06:04 +0000 (20:06 +0100)]
platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes

At least on the HP Envy x360 15-cp0xxx model the WMI interface
for HPWMI_FEATURE2_QUERY requires an outsize of at least 128 bytes,
otherwise it fails with an error code 5 (HPWMI_RET_INVALID_PARAMETERS):

Dec 06 00:59:38 kernel: hp_wmi: query 0xd returned error 0x5

We do not care about the contents of the buffer, we just want to know
if the HPWMI_FEATURE2_QUERY command is supported.

This commits bumps the buffer size, fixing the error.

Fixes: 8a1513b4932 ("hp-wmi: limit hotkey enable")
Cc: stable@vger.kernel.org
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoplatform/mellanox: fix the mlx-bootctl sysfs
Liming Sun [Wed, 18 Dec 2019 18:35:27 +0000 (13:35 -0500)]
platform/mellanox: fix the mlx-bootctl sysfs

This is a follow-up commit for the sysfs attributes to change
from DRIVER_ATTR to DEVICE_ATTR according to some initial comments.
In such case, it's better to point the sysfs path to the device
itself instead of the driver. The ABI document is also updated.

Fixes: 79e29cb8fbc5 ("platform/mellanox: Add bootctl driver for Mellanox BlueField Soc")
Signed-off-by: Liming Sun <lsun@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoLinux 5.5-rc2
Linus Torvalds [Sun, 15 Dec 2019 23:16:08 +0000 (15:16 -0800)]
Linux 5.5-rc2

4 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Linus Torvalds [Sun, 15 Dec 2019 22:58:13 +0000 (14:58 -0800)]
Merge tag 'for-linus' of git://git./linux/kernel/git/rdma/rdma

Pull rdma fixes from Doug Ledford:
 "A small collection of -rc fixes. Mostly. One API addition, but that's
  because we wanted to use it in a fix. There's also a bug fix that is
  going to render the 5.5 kernel's soft-RoCE driver incompatible with
  all soft-RoCE versions prior, but it's required to actually implement
  the protocol according to the RoCE spec and required in order for the
  soft-RoCE driver to be able to successfully work with actual RoCE
  hardware.

  Summary:

   - Update Steve Wise info

   - Fix for soft-RoCE crc calculations (will break back compatibility,
     but only with the soft-RoCE driver, which has had this bug since it
     was introduced and it is an on-the-wire bug, but will make
     soft-RoCE fully compatible with real RoCE hardware)

   - cma init fixup

   - counters oops fix

   - fix for mlx4 init/teardown sequence

   - fix for mkx5 steering rules

   - introduce a cleanup API, which isn't a fix, but we want to use it
     in the next fix

   - fix for mlx5 memory management that uses API in previous patch"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
  IB/mlx5: Fix device memory flows
  IB/core: Introduce rdma_user_mmap_entry_insert_range() API
  IB/mlx5: Fix steering rule of drop and count
  IB/mlx4: Follow mirror sequence of device add during device removal
  RDMA/counter: Prevent auto-binding a QP which are not tracked with res
  rxe: correctly calculate iCRC for unaligned payloads
  Update mailmap info for Steve Wise
  RDMA/cma: add missed unregister_pernet_subsys in init failure

4 years agoMerge tag 'riscv/for-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv...
Linus Torvalds [Sun, 15 Dec 2019 20:27:31 +0000 (12:27 -0800)]
Merge tag 'riscv/for-v5.5-rc2' of git://git./linux/kernel/git/riscv/linux

Pull RISC-V fixes from Paul Walmsley:
 "Two minor build fixes:

   - Fix builds of the ELF loader when built with 'make -j1' (nommu
     only)

   - Fix CONFIG_SOC_SIFIVE builds when CONFIG_TTY is disabled (found
     during randconfig testing)"

* tag 'riscv/for-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  riscv: only select serial sifive if TTY is enabled
  riscv: Fix build dependency for loader

4 years agoMerge tag 'for-linus-5.5b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 15 Dec 2019 20:24:44 +0000 (12:24 -0800)]
Merge tag 'for-linus-5.5b-rc2-tag' of git://git./linux/kernel/git/xen/tip

Pull xen fixes from Juergen Gross:
 "Two fixes: one for a resource accounting bug in some configurations
  and a fix for another patch which went into rc1"

* tag 'for-linus-5.5b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen/balloon: fix ballooned page accounting without hotplug enabled
  xen-blkback: prevent premature module unload

4 years agoMerge branch 'remove-ksys-mount-dup' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 15 Dec 2019 19:36:12 +0000 (11:36 -0800)]
Merge branch 'remove-ksys-mount-dup' of git://git./linux/kernel/git/brodo/linux

Pull ksys_mount() and ksys_dup() removal from Dominik Brodowski:
 "This small series replaces all in-kernel calls to the
  userspace-focused ksys_mount() and ksys_dup() with calls to
  kernel-centric functions:

  For each replacement of ksys_mount() with do_mount(), one needs to
  verify that the first and third parameter (char *dev_name, char *type)
  are strings allocated in kernelspace and that the fifth parameter
  (void *data) is either NULL or refers to a full page (only occurence
  in init/do_mounts.c::do_mount_root()). The second and fourth
  parameters (char *dir_name, unsigned long flags) are passed by
  ksys_mount() to do_mount() unchanged, and therefore do not require
  particular care.

  Moreover, instead of pretending to be userspace, the opening of
  /dev/console as stdin/stdout/stderr can be implemented using in-kernel
  functions as well. Thereby, ksys_dup() can be removed for good"

[ This doesn't get rid of the special "kernel init runs with KERNEL_DS"
  case, but it at least removes _some_ of the users of "treat kernel
  pointers as user pointers for our magical init sequence".

  One day we'll hopefully be rid of it all, and can initialize our
  init_thread addr_limit to USER_DS.    - Linus ]

* 'remove-ksys-mount-dup' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux:
  fs: remove ksys_dup()
  init: unify opening /dev/console as stdin/stdout/stderr
  init: use do_mount() instead of ksys_mount()
  initrd: use do_mount() instead of ksys_mount()
  devtmpfs: use do_mount() instead of ksys_mount()

4 years agoMerge tag 'Wimplicit-fallthrough-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Torvalds [Sun, 15 Dec 2019 00:10:22 +0000 (16:10 -0800)]
Merge tag 'Wimplicit-fallthrough-5.5-rc2' of git://git./linux/kernel/git/gustavoars/linux

Pull fall through fix from Gustavo Silva:
 "Fix compile error on sh by marking expected switch fall-through"

* tag 'Wimplicit-fallthrough-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
  sh: kgdb: Mark expected switch fall-throughs

4 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sat, 14 Dec 2019 20:51:57 +0000 (12:51 -0800)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "24 fixes, all in drivers. The lion's share (16) are qla2xxx and the
  rest are iscsi (3), ufs (2), smarpqi, lpfc and libsas"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (24 commits)
  scsi: iscsi: Avoid potential deadlock in iscsi_if_rx func
  scsi: iscsi: Fix a potential deadlock in the timeout handler
  scsi: smartpqi: Update attribute name to `driver_version`
  scsi: libsas: stop discovering if oob mode is disconnected
  scsi: ufs: Disable autohibern8 feature in Cadence UFS
  scsi: iscsi: qla4xxx: fix double free in probe
  scsi: ufs: Give an unique ID to each ufs-bsg
  scsi: qla2xxx: Add debug dump of LOGO payload and ELS IOCB
  scsi: qla2xxx: Ignore PORT UPDATE after N2N PLOGI
  scsi: qla2xxx: Don't defer relogin unconditonally
  scsi: qla2xxx: Send Notify ACK after N2N PLOGI
  scsi: qla2xxx: Configure local loop for N2N target
  scsi: qla2xxx: Fix PLOGI payload and ELS IOCB dump length
  scsi: qla2xxx: Don't call qlt_async_event twice
  scsi: qla2xxx: Allow PLOGI in target mode
  scsi: qla2xxx: Change discovery state before PLOGI
  scsi: qla2xxx: Drop superfluous INIT_WORK of del_work
  scsi: qla2xxx: Initialize free_work before flushing it
  scsi: qla2xxx: Use explicit LOGO in target mode
  scsi: qla2xxx: Ignore NULL pointer in tcm_qla2xxx_free_mcmd
  ...

4 years agoMerge tag 'char-misc-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 14 Dec 2019 20:49:20 +0000 (12:49 -0800)]
Merge tag 'char-misc-5.5-rc2' of git://git./linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are six small fixes for some reported char/misc driver issues:

   - fix build warnings with new 'awk' with the raid6 code

   - four interconnect driver bugfixes

   - binder fix for reported problem

  All of these except the binder fix have been in linux-next with no
  reported issues. The binder fix is "new" but Todd says it is good as
  he has tested it :)"

* tag 'char-misc-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  binder: fix incorrect calculation for num_valid
  interconnect: qcom: msm8974: Walk the list safely on node removal
  interconnect: qcom: qcs404: Walk the list safely on node removal
  interconnect: qcom: sdm845: Walk the list safely on node removal
  interconnect: qcom: Fix Kconfig indentation
  lib: raid6: fix awk build warnings

4 years agoMerge tag 'driver-core-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 14 Dec 2019 20:45:36 +0000 (12:45 -0800)]
Merge tag 'driver-core-5.5-rc2' of git://git./linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
 "Here are two small driver core fixes to resolve some reported issues

  The first is to handle the much-reported (by the build systems)
  problem that superH does not boot anymore.

  The second handles an issue in the new platform logic that a number of
  people ran into with the automated tests in kbuild

  Both of these have been in linux-next with no reported issues"

* tag 'driver-core-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  drivers: Fix boot problem on SuperH
  of/platform: Unconditionally pause/resume sync state during kernel init

4 years agoMerge tag 'staging-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 14 Dec 2019 20:43:57 +0000 (12:43 -0800)]
Merge tag 'staging-5.5-rc2' of git://git./linux/kernel/git/gregkh/staging

Pull staging/IIO fixes from Greg KH:
 "Here are a number of small staging and IIO driver fixes for reported
  issues for 5.5-rc2

  Nothing major, a bunch of tiny IIO driver issues resolved, and some
  staging driver fixes for things that people ran into with 5.5-rc1.
  Full details are in the shortlog.

  All of these have been in linux-next with no reported issues"

* tag 'staging-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (28 commits)
  fbtft: Fix the initialization from property algorithm
  staging: rtl8712: fix interface sanity check
  staging: rtl8188eu: fix interface sanity check
  staging: gigaset: add endpoint-type sanity check
  staging: gigaset: fix illegal free on probe errors
  staging: gigaset: fix general protection fault on probe
  staging: vchiq: call unregister_chrdev_region() when driver registration fails
  staging: exfat: fix multiple definition error of `rename_file'
  staging/wlan-ng: add CRC32 dependency in Kconfig
  staging: hp100: Fix build error without ETHERNET
  staging: fbtft: Do not hardcode SPI CS polarity inversion
  staging: exfat: properly support discard in clr_alloc_bitmap()
  staging/octeon: Mark Ethernet driver as BROKEN
  iio: adc: max9611: Fix too short conversion time delay
  iio: ad7949: fix channels mixups
  iio: imu: st_lsm6dsx: do not power-off accel if events are enabled
  iio: imu: st_lsm6dsx: track hw FIFO buffering with fifo_mask
  iio: imu: st_lsm6dsx: fix decimation factor estimation
  iio: imu: inv_mpu6050: fix temperature reporting using bad unit
  iio: humidity: hdc100x: fix IIO_HUMIDITYRELATIVE channel reporting
  ...

4 years agoMerge tag 'usb-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sat, 14 Dec 2019 20:40:39 +0000 (12:40 -0800)]
Merge tag 'usb-5.5-rc2' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some small USB driver fixes for reported issues for 5.5-rc2

  There's the usual gadget and xhci fixes, as well as some other
  problems that syzbot has been finding during it's fuzzing runs. Full
  details are in the shortlog.

  All of these have been in linux-next with no reported issues"

* tag 'usb-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (21 commits)
  usb: dwc3: pci: add ID for the Intel Comet Lake -H variant
  xhci: make sure interrupts are restored to correct state
  xhci: handle some XHCI_TRUST_TX_LENGTH quirks cases as default behaviour.
  xhci: Increase STS_HALT timeout in xhci_suspend()
  usb: xhci: only set D3hot for pci device
  xhci: fix USB3 device initiated resume race with roothub autosuspend
  xhci: Fix memory leak in xhci_add_in_port()
  USB: Fix incorrect DMA allocations for local memory pool drivers
  usb: gadget: fix wrong endpoint desc
  usb: dwc3: ep0: Clear started flag on completion
  usb: dwc3: gadget: Clear started flag for non-IOC
  usb: dwc3: gadget: Fix logical condition
  USB: atm: ueagle-atm: add missing endpoint check
  USB: adutux: fix interface sanity check
  USB: idmouse: fix interface sanity checks
  USB: serial: io_edgeport: fix epic endpoint lookup
  usb: mon: Fix a deadlock in usbmon between mmap and read
  usb: common: usb-conn-gpio: Don't log an error on probe deferral
  usb: core: urb: fix URB structure initialization function
  usb: typec: fix use after free in typec_register_port()
  ...

4 years agoMerge tag 's390-5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Sat, 14 Dec 2019 20:34:37 +0000 (12:34 -0800)]
Merge tag 's390-5.5-3' of git://git./linux/kernel/git/s390/linux

Pull s390 updates from Vasily Gorbik:

 - Add support for KASAN_VMALLOC feature.

 - Remove the last user of problematic diag 0x44 call.

 - Adjust sampling interval and avoid sample data block overflow
   condition on pressure in perf code.

 - Prefer EOPNOTSUPP over ENOTSUPP and comments fixes.

* tag 's390-5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/kasan: add KASAN_VMALLOC support
  s390: remove last diag 0x44 caller
  s390/uv: use EOPNOTSUPP instead of ENOTSUPP
  s390/cpum_sf: Avoid SBD overflow condition in irq handler
  s390/cpum_sf: Adjust sampling interval to avoid hitting sample limits
  s390/test_unwind: fix spelling mistake "reqister" -> "register"
  s390/spinlock: remove confusing comment in arch_spin_lock_wait

4 years agoMerge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Sat, 14 Dec 2019 20:32:28 +0000 (12:32 -0800)]
Merge branch 'linus' of git://git./linux/kernel/git/herbert/crypto-2.6

Pull crypto fix from Herbert Xu:
 "Fix another build problem for Wireguard without Crypto"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: arm/curve25519 - add arch-specific key generation function

4 years agoMerge tag '5.5-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sat, 14 Dec 2019 19:44:14 +0000 (11:44 -0800)]
Merge tag '5.5-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull cfis fixes from Steve French:
 "Three small smb3 fixes: this addresses two recent issues reported in
  additional testing during rc1, a refcount underflow and a problem with
  an intermittent crash in SMB2_open_init"

* tag '5.5-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  CIFS: Close cached root handle only if it has a lease
  SMB3: Fix crash in SMB2_open_init due to uninitialized field in compounding path
  smb3: fix refcount underflow warning on unmount when no directory leases

4 years agoMerge tag 'ovl-fixes-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszere...
Linus Torvalds [Sat, 14 Dec 2019 19:13:54 +0000 (11:13 -0800)]
Merge tag 'ovl-fixes-5.5-rc2' of git://git./linux/kernel/git/mszeredi/vfs

Pull overlayfs fixes from Miklos Szeredi:
 "Fix some bugs and documentation"

* tag 'ovl-fixes-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
  docs: filesystems: overlayfs: Fix restview warnings
  docs: filesystems: overlayfs: Rename overlayfs.txt to .rst
  ovl: relax WARN_ON() on rename to self
  ovl: fix corner case of non-unique st_dev;st_ino
  ovl: don't use a temp buf for encoding real fh
  ovl: make sure that real fid is 32bit aligned in memory
  ovl: fix lookup failure on multi lower squashfs

4 years agobinder: fix incorrect calculation for num_valid
Todd Kjos [Fri, 13 Dec 2019 20:25:31 +0000 (12:25 -0800)]
binder: fix incorrect calculation for num_valid

For BINDER_TYPE_PTR and BINDER_TYPE_FDA transactions, the
num_valid local was calculated incorrectly causing the
range check in binder_validate_ptr() to miss out-of-bounds
offsets.

Fixes: bde4a19fc04f ("binder: use userspace pointer as base of buffer space")
Signed-off-by: Todd Kjos <tkjos@google.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191213202531.55010-1-tkjos@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoMerge tag 'nios2-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan...
Linus Torvalds [Fri, 13 Dec 2019 23:05:00 +0000 (15:05 -0800)]
Merge tag 'nios2-v5.5-rc2' of git://git./linux/kernel/git/lftan/nios2

Pull nios2 fix from Ley Foon Tan:
 "Fix nios2 ioremap regression"

* tag 'nios2-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
  nios2: Fix ioremap

4 years agoMerge tag 'devicetree-fixes-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 13 Dec 2019 23:03:25 +0000 (15:03 -0800)]
Merge tag 'devicetree-fixes-for-5.5' of git://git./linux/kernel/git/robh/linux

Pull Devicetree fixes from Rob Herring:

 - Fix for dependency tracking caused by unittest interaction

 - Fix some schema errors in Tegra memory controller schema

 - Update Maxime Ripard's email address

 - Review fixes to TI cpsw-switch

 - Add wakeup-source prop for STM32 rproc. Got dropped in the schema
   conversion.

* tag 'devicetree-fixes-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  of/platform: Unconditionally pause/resume sync state during kernel init
  dt-bindings: memory-controllers: tegra: Fix type references
  dt-bindings: Change maintainer address
  dt-bindings: net: ti: cpsw-switch: update to fix comments
  dt-bindings: remoteproc: stm32: add wakeup-source property

4 years agoMerge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Linus Torvalds [Fri, 13 Dec 2019 22:58:24 +0000 (14:58 -0800)]
Merge tag 'for_linus' of git://git./linux/kernel/git/mst/vhost

Pull virtio fixes from Michael Tsirkin:
 "Some fixes and cleanup patches"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  virtio_balloon: divide/multiply instead of shifts
  virtio_balloon: name cleanups
  virtio-balloon: fix managed page counts when migrating pages between zones

4 years agoMerge tag 'pci-v5.5-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Linus Torvalds [Fri, 13 Dec 2019 22:52:03 +0000 (14:52 -0800)]
Merge tag 'pci-v5.5-fixes-1' of git://git./linux/kernel/git/helgaas/pci

Pull PCI fix from Bjorn Helgaas:
 "Fix rockchip outbound ATU issue that prevented Google Kevin
  Chromebooks from booting (Enric Balletbo i Serra)"

* tag 'pci-v5.5-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: rockchip: Fix IO outbound ATU register number

4 years agoMerge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Fri, 13 Dec 2019 22:45:40 +0000 (14:45 -0800)]
Merge branch 'i2c/for-next' of git://git./linux/kernel/git/wsa/linux

Pull i2c updates from Wolfram Sang:

 - removal of an old API where all in-kernel users have been converted
   as of this merge window.

 - a kdoc fix

 - a new helper that will make dependencies for the next API conversion
   a tad easier

* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: add helper to check if a client has a driver attached
  i2c: fix header file kernel-doc warning
  i2c: remove i2c_new_dummy() API

4 years agoMerge tag 'pm-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Fri, 13 Dec 2019 22:43:26 +0000 (14:43 -0800)]
Merge tag 'pm-5.5-rc2' of git://git./linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "These add PM QoS support to devfreq and fix a few issues in that
  subsystem, fix two cpuidle issues and do one minor cleanup in there,
  and address an ACPI power management problem related to devices with
  special power management requirements, like fans.

  Specifics:

   - Add PM QoS support, based on the frequency QoS introduced during
     the 5.4 cycle, to devfreq (Leonard Crestez).

   - Fix some assorted devfreq issues (Leonard Crestez).

   - Fix an unintentional cpuidle behavior change (introduced during the
     5.4 cycle) related to the active polling time limit (Marcelo
     Tosatti).

   - Fix a recently introduced cpuidle helper function and do a minor
     cleanup in the cpuidle core (Rafael Wysocki).

   - Avoid adding devices with special power management requirements,
     like fans, to the generic ACPI PM domain (Rafael Wysocki)"

* tag 'pm-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpuidle: Drop unnecessary type cast in cpuidle_poll_time()
  cpuidle: Fix cpuidle_driver_state_disabled()
  ACPI: PM: Avoid attaching ACPI PM domain to certain devices
  cpuidle: use first valid target residency as poll time
  PM / devfreq: Use PM QoS for sysfs min/max_freq
  PM / devfreq: Add PM QoS support
  PM / devfreq: Don't fail devfreq_dev_release if not in list
  PM / devfreq: Introduce get_freq_range helper
  PM / devfreq: Set scaling_max_freq to max on OPP notifier error
  PM / devfreq: Fix devfreq_notifier_call returning errno

4 years agoMerge tag 'sound-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Fri, 13 Dec 2019 22:40:38 +0000 (14:40 -0800)]
Merge tag 'sound-5.5-rc2' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A small collection of fixes.

  The main changes are fixes for a couple of regressions in AMD HD-audio
  and FireWire that were introduced in 5.5-rc1. The rest are small fixes
  for echoaudio and FireWire, as well as a usual Dell HD-audio fixup"

* tag 'sound-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek - Line-out jack doesn't work on a Dell AIO
  ALSA: hda/hdmi - Fix duplicate unref of pci_dev
  ALSA: fireface: fix return value in error path of isochronous resources reservation
  ALSA: oxfw: fix return value in error path of isochronous resources reservation
  ALSA: firewire-motu: fix double unlocked 'motu->mutex'
  ALSA: echoaudio: simplify get_audio_levels

4 years agoMerge tag 'drm-fixes-2019-12-13' of git://anongit.freedesktop.org/drm/drm
Linus Torvalds [Fri, 13 Dec 2019 22:36:45 +0000 (14:36 -0800)]
Merge tag 'drm-fixes-2019-12-13' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Usual round of rc2 fixes.

  i915 and amdgpu leading the charge, but a few others in here,
  including some nouveau fixes, all seems pretty for rc2, but hey it's a
  Fri 13th pull so I'm sure it'll cause untold bad fortune.

  dma-buf:
   - memory leak fix
   - expand MAINTAINERS scope

  core:
   - fix mode matching for drivers not using picture_aspect_ratio

  nouveau:
   - panel scaling fix
   - MST BPC fix
   - atomic fixes

  i915:
   - GPU hang on idle transition
   - GLK+ FBC corruption fix
   - non-priv OA access on Tigerlake
   - HDCP state fix
   - CI found race fixes

  amdgpu:
   - renoir DC fixes
   - GFX8 fence flush alignment with userspace
   - Arcturus power profile fix
   - DC aux + i2c over aux fixes
   - GPUVM invalidation semaphore fixes
   - gfx10 golden registers update

  mgag200:
   - expand startadd fix

  panfrost:
   - devfreq fix
   - memory fixes

  mcde:
   - DSI pointer deref fix"

* tag 'drm-fixes-2019-12-13' of git://anongit.freedesktop.org/drm/drm: (51 commits)
  drm/amdgpu: add invalidate semaphore limit for SRIOV in gmc10
  drm/amdgpu: add invalidate semaphore limit for SRIOV and picasso in gmc9
  drm/amdgpu: avoid using invalidate semaphore for picasso
  Revert "drm/amdgpu: dont schedule jobs while in reset"
  drm/amdgpu: fix license on Kconfig and Makefiles
  drm/amdgpu/gfx10: update gfx golden settings for navi14
  drm/amdgpu/gfx10: update gfx golden settings
  drm/amdgpu/gfx10: update gfx golden settings for navi14
  drm/amdgpu/gfx10: update gfx golden settings
  drm/i915: Serialise with remote retirement
  drm/amd/display: include linux/slab.h where needed
  drm/amd/display: fix undefined struct member reference
  drm/nouveau/kms/nv50-: fix panel scaling
  drm/nouveau/kms/nv50-: Limit MST BPC to 8
  drm/nouveau/kms/nv50-: Store the bpc we're using in nv50_head_atom
  drm/nouveau/kms/nv50-: Call outp_atomic_check_view() before handling PBN
  drm/nouveau: Fix drm-core using atomic code-paths on pre-nv50 hardware
  drm/nouveau: Move the declaration of struct nouveau_conn_atom up a bit
  drm/i915/gt: Detect if we miss WaIdleLiteRestore
  drm/i915/hdcp: Nuke intel_hdcp_transcoder_config()
  ...

4 years agoMerge tag 'for-linus-20191212' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 13 Dec 2019 22:27:19 +0000 (14:27 -0800)]
Merge tag 'for-linus-20191212' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:

 - stable fix for the bi_size overflow. Not a corruption issue, but a
   case wher we could merge but disallowed (Andreas)

 - NVMe pull request via Keith, with various fixes.

 - MD pull request from Song.

 - Merge window regression fix for the rq passthrough stats (Logan)

 - Remove unused blkcg_drain_queue() function (Guoqing)

* tag 'for-linus-20191212' of git://git.kernel.dk/linux-block:
  blk-cgroup: remove blkcg_drain_queue
  block: fix NULL pointer dereference in account statistics with IDE
  md: make sure desc_nr less than MD_SB_DISKS
  md: raid1: check rdev before reference in raid1_sync_request func
  raid5: need to set STRIPE_HANDLE for batch head
  block: fix "check bi_size overflow before merge"
  nvme/pci: Fix read queue count
  nvme/pci Limit write queue sizes to possible cpus
  nvme/pci: Fix write and poll queue types
  nvme/pci: Remove last_cq_head
  nvme: Namepace identification descriptor list is optional
  nvme-fc: fix double-free scenarios on hw queues
  nvme: else following return is not needed
  nvme: add error message on mismatching controller ids
  nvme_fc: add module to ops template to allow module references
  nvmet-loop: Avoid preallocating big SGL for data
  nvme-fc: Avoid preallocating big SGL for data
  nvme-rdma: Avoid preallocating big SGL for data

4 years agoMerge tag 'io_uring-5.5-20191212' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 13 Dec 2019 22:24:54 +0000 (14:24 -0800)]
Merge tag 'io_uring-5.5-20191212' of git://git.kernel.dk/linux-block

Pull io_uring fixes from Jens Axboe:

 - A tweak to IOSQE_IO_LINK (also marked for stable) to allow links that
   don't sever if the result is < 0.

   This is mostly for linked timeouts, where if we ask for a pure
   timeout we always get -ETIME. This makes links useless for that case,
   hence allow a case where it works.

 - Five minor optimizations to fix and improve cases that regressed
   since v5.4.

 - An SQTHREAD locking fix.

 - A sendmsg/recvmsg iov assignment fix.

 - Net fix where read_iter/write_iter don't honor IOCB_NOWAIT, and
   subsequently ensuring that works for io_uring.

 - Fix a case where for an invalid opcode we might return -EBADF instead
   of -EINVAL, if the ->fd of that sqe was set to an invalid fd value.

* tag 'io_uring-5.5-20191212' of git://git.kernel.dk/linux-block:
  io_uring: ensure we return -EINVAL on unknown opcode
  io_uring: add sockets to list of files that support non-blocking issue
  net: make socket read/write_iter() honor IOCB_NOWAIT
  io_uring: only hash regular files for async work execution
  io_uring: run next sqe inline if possible
  io_uring: don't dynamically allocate poll data
  io_uring: deferred send/recvmsg should assign iov
  io_uring: sqthread should grab ctx->uring_lock for submissions
  io-wq: briefly spin for new work after finishing work
  io-wq: remove worker->wait waitqueue
  io_uring: allow unbreakable links

4 years agoMerge tag 'for-5.5/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
Linus Torvalds [Fri, 13 Dec 2019 22:13:15 +0000 (14:13 -0800)]
Merge tag 'for-5.5/dm-fixes' of git://git./linux/kernel/git/device-mapper/linux-dm

Pull device mapper fixes from Mike Snitzer:

 - Fix DM multipath by restoring full path selector functionality for
   bio-based configurations that don't haave a SCSI device handler.

 - Fix dm-btree removal to ensure non-root btree nodes have at least
   (max_entries / 3) entries. This resolves userspace thin_check
   utility's report of "too few entries in btree_node".

 - Fix both the DM thin-provisioning and dm-clone targets to properly
   flush the data device prior to metadata commit. This resolves the
   potential for inconsistency across a power loss event when the data
   device has a volatile writeback cache.

 - Small documentation fixes to dm-clone and dm-integrity.

* tag 'for-5.5/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  docs: dm-integrity: remove reference to ARC4
  dm thin: Flush data device before committing metadata
  dm thin metadata: Add support for a pre-commit callback
  dm clone: Flush destination device before committing metadata
  dm clone metadata: Use a two phase commit
  dm clone metadata: Track exact changes per transaction
  dm btree: increase rebalance threshold in __rebalance2()
  dm: add dm-clone to the documentation index
  dm mpath: remove harmful bio-based optimization

4 years agoMerge tag 'sizeof_field-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 13 Dec 2019 22:02:12 +0000 (14:02 -0800)]
Merge tag 'sizeof_field-v5.5-rc2' of git://git./linux/kernel/git/kees/linux

Pull FIELD_SIZEOF conversion from Kees Cook:
 "A mostly mechanical treewide conversion from FIELD_SIZEOF() to
  sizeof_field(). This avoids the redundancy of having 2 macros
  (actually 3) doing the same thing, and consolidates on sizeof_field().
  While "field" is not an accurate name, it is the common name used in
  the kernel, and doesn't result in any unintended innuendo.

  As there are still users of FIELD_SIZEOF() in -next, I will clean up
  those during this coming development cycle and send the final old
  macro removal patch at that time"

* tag 'sizeof_field-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  treewide: Use sizeof_field() macro
  MIPS: OCTEON: Replace SIZEOF_FIELD() macro

4 years agoMerge branches 'pm-cpuidle' and 'acpi-pm'
Rafael J. Wysocki [Fri, 13 Dec 2019 09:29:45 +0000 (10:29 +0100)]
Merge branches 'pm-cpuidle' and 'acpi-pm'

* pm-cpuidle:
  cpuidle: Drop unnecessary type cast in cpuidle_poll_time()
  cpuidle: Fix cpuidle_driver_state_disabled()
  cpuidle: use first valid target residency as poll time

* acpi-pm:
  ACPI: PM: Avoid attaching ACPI PM domain to certain devices

4 years agoxen/balloon: fix ballooned page accounting without hotplug enabled
Juergen Gross [Thu, 12 Dec 2019 14:17:50 +0000 (15:17 +0100)]
xen/balloon: fix ballooned page accounting without hotplug enabled

When CONFIG_XEN_BALLOON_MEMORY_HOTPLUG is not defined
reserve_additional_memory() will set balloon_stats.target_pages to a
wrong value in case there are still some ballooned pages allocated via
alloc_xenballooned_pages().

This will result in balloon_process() no longer be triggered when
ballooned pages are freed in batches.

Reported-by: Nicholas Tsirakis <niko.tsirakis@gmail.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
4 years agoxen-blkback: prevent premature module unload
Paul Durrant [Tue, 10 Dec 2019 14:53:05 +0000 (14:53 +0000)]
xen-blkback: prevent premature module unload

Objects allocated by xen_blkif_alloc come from the 'blkif_cache' kmem
cache. This cache is destoyed when xen-blkif is unloaded so it is
necessary to wait for the deferred free routine used for such objects to
complete. This necessity was missed in commit 14855954f636 "xen-blkback:
allow module to be cleanly unloaded". This patch fixes the problem by
taking/releasing extra module references in xen_blkif_alloc/free()
respectively.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
4 years agoCIFS: Close cached root handle only if it has a lease
Pavel Shilovsky [Tue, 10 Dec 2019 19:44:52 +0000 (11:44 -0800)]
CIFS: Close cached root handle only if it has a lease

SMB2_tdis() checks if a root handle is valid in order to decide
whether it needs to close the handle or not. However if another
thread has reference for the handle, it may end up with putting
the reference twice. The extra reference that we want to put
during the tree disconnect is the reference that has a directory
lease. So, track the fact that we have a directory lease and
close the handle only in that case.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
4 years agoSMB3: Fix crash in SMB2_open_init due to uninitialized field in compounding path
Steve French [Tue, 10 Dec 2019 04:34:10 +0000 (22:34 -0600)]
SMB3: Fix crash in SMB2_open_init due to uninitialized field in compounding path

Ran into an intermittent crash in
SMB2_open_init+0x2f6/0x970
due to oparms.cifs_sb not being initialized when called from:
smb2_compound_op+0x45d/0x1690
Zero the whole oparms struct in the compounding path before setting up the
oparms so we don't risk any uninitialized fields.

Fixes: fdef665ba44a ("smb3: fix mode passed in on create for modetosid mount option")

Signed-off-by: Steve French <stfrench@microsoft.com>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
4 years agoMerge tag 'drm-fixes-5.5-2019-12-12' of git://people.freedesktop.org/~agd5f/linux...
Dave Airlie [Fri, 13 Dec 2019 04:50:01 +0000 (14:50 +1000)]
Merge tag 'drm-fixes-5.5-2019-12-12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

drm-fixes-5.5-2019-12-12:

amdgpu:
- DC fixes for renoir
- Gfx8 fence flush align with mesa
- Power profile fix for arcturus
- Freesync fix
- DC I2c over aux fix
- DC aux defer fix
- GPU reset fix
- GPUVM invalidation semaphore fixes for PCO and SR-IOV
- Golden settings updates for gfx10

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191212223211.8034-1-alexander.deucher@amd.com
4 years agoMerge tag 'drm-intel-fixes-2019-12-12' of git://anongit.freedesktop.org/drm/drm-intel...
Dave Airlie [Fri, 13 Dec 2019 04:44:08 +0000 (14:44 +1000)]
Merge tag 'drm-intel-fixes-2019-12-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes

- Fix user reported issue #673: GPU hang on transition to idle
- Avoid corruption on the top of the screen on GLK+ by disabling FBC
- Fix non-privileged access to OA on Tigerlake
- Fix HDCP code not to touch global state when just computing commit
- Fix CI splat by saving irqstate around virtual_context_destroy
- Serialise context retirement possibly on another CPU

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191212100759.GA22260@jlahtine-desk.ger.corp.intel.com
4 years agoMerge tag 'drm-misc-next-fixes-2019-12-12' of git://anongit.freedesktop.org/drm/drm...
Dave Airlie [Fri, 13 Dec 2019 04:32:30 +0000 (14:32 +1000)]
Merge tag 'drm-misc-next-fixes-2019-12-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

-mgag200: more startadd mitigation (Thomas)
-panfrost: devfreq fix + several memory fixes (Steven, Boris)

Cc: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Steven Price <steven.price@arm.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Sean Paul <sean@poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20191212140145.GA145200@art_vandelay
4 years agoof/platform: Unconditionally pause/resume sync state during kernel init
Saravana Kannan [Mon, 9 Dec 2019 19:31:19 +0000 (11:31 -0800)]
of/platform: Unconditionally pause/resume sync state during kernel init

Commit 5e6669387e22 ("of/platform: Pause/resume sync state during init
and of_platform_populate()") paused/resumed sync state during init only
if Linux had parsed and populated a devicetree.

However, the check for that (of_have_populated_dt()) can change after
of_platform_default_populate_init() executes.  One example of this is
when devicetree unittests are enabled.  This causes an unmatched
pause/resume of sync state. To avoid this, just unconditionally
pause/resume sync state during init.

Fixes: 5e6669387e22 ("of/platform: Pause/resume sync state during init and of_platform_populate()")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Reviewed-by: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>