platform/kernel/linux-starfive.git
5 years agodt-bindings: watchdog: renesas-wdt: Document r8a774b1 support
Fabrizio Castro [Fri, 4 Oct 2019 08:35:27 +0000 (09:35 +0100)]
dt-bindings: watchdog: renesas-wdt: Document r8a774b1 support

RZ/G2N (a.k.a. R8A774B1) watchdog implementation is compatible
with R-Car Gen3, therefore add the relevant documentation.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: iommu: Convert Arm SMMUv3 to DT schema
Rob Herring [Mon, 2 Sep 2019 14:30:59 +0000 (15:30 +0100)]
dt-bindings: iommu: Convert Arm SMMUv3 to DT schema

Convert the Arm SMMv3 binding to the DT schema format.

Cc: Joerg Roedel <joro@8bytes.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: iommu@lists.linux-foundation.org
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: iommu: Convert Arm SMMU to DT schema
Rob Herring [Fri, 20 Sep 2019 13:48:28 +0000 (08:48 -0500)]
dt-bindings: iommu: Convert Arm SMMU to DT schema

Convert the Arm SMMU binding to DT schema.

The existing binding doc doesn't cover the number of variations of
compatible properties found in .dts files. "qcom,msm8998-smmu-v2" was
also missing, so add it.

SoCFPGA Stratix10 has a single clock defined which doesn't match the
binding. This issue remains.

Cc: Joerg Roedel <joro@8bytes.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Robin Murphy <Robin.Murphy@arm.com>
Cc: iommu@lists.linux-foundation.org
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: display: Convert sharp, ld-d5116z01b panel to DT schema
Jeffrey Hugo [Thu, 10 Oct 2019 21:06:54 +0000 (14:06 -0700)]
dt-bindings: display: Convert sharp, ld-d5116z01b panel to DT schema

Convert the sharp,ld-d5116z01b panel binding to DT schema.

Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: usb: generic-ehci: Add "companion" entry
Alexandre Torgue [Mon, 7 Oct 2019 13:44:10 +0000 (15:44 +0200)]
dt-bindings: usb: generic-ehci: Add "companion" entry

"companion" entry is present in "generic.txt" usb binding file. This commit
adds it also in generic-ehci yaml binding.

Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
[robh: restrict type to phandle instead of phandle-array]
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: pinctrl: stm32: Fix 'st, syscfg' description field
Alexandre Torgue [Mon, 7 Oct 2019 13:44:09 +0000 (15:44 +0200)]
dt-bindings: pinctrl: stm32: Fix 'st, syscfg' description field

As there is only one item "st,syscfg" this commit moves phandle description
fields under "description" tag. It'll fix a validation issue seen  during
stm32 DT check.

Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: arm: stm32: Add missing STM32 boards
Alexandre Torgue [Mon, 7 Oct 2019 13:44:08 +0000 (15:44 +0200)]
dt-bindings: arm: stm32: Add missing STM32 boards

This commit documents missing STM32 boards:

-STM32MCU: F429 disco/eval, F469-disco, F746 disco/eval, F769 disco,
H743 disco/eval.

-STM32MPU: MP157 dk1/dk2/ed1/ev1.

Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: irqchip: renesas-irqc: Document r8a774b1 bindings
Biju Das [Fri, 4 Oct 2019 07:16:03 +0000 (08:16 +0100)]
dt-bindings: irqchip: renesas-irqc: Document r8a774b1 bindings

Document SoC specific bindings for RZ/G2N (r8a774b1) SoC.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: pwm: rcar: Add r8a774b1 support
Biju Das [Tue, 1 Oct 2019 12:02:40 +0000 (13:02 +0100)]
dt-bindings: pwm: rcar: Add r8a774b1 support

Document RZ/G2N (R8A774B1) SoC bindings.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: iio: adc: exynos: Use defines instead of clock numbers
Krzysztof Kozlowski [Wed, 2 Oct 2019 16:07:44 +0000 (18:07 +0200)]
dt-bindings: iio: adc: exynos: Use defines instead of clock numbers

Make the examples in Exynos ADC bindings more readable and bring them
closer to real DTS by using defines for clocks.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: rtc: s3c: Include generic dt-schema bindings
Krzysztof Kozlowski [Wed, 2 Oct 2019 16:07:43 +0000 (18:07 +0200)]
dt-bindings: rtc: s3c: Include generic dt-schema bindings

Include the generic rtc.yaml bindings in Samsung S3C RTC bindings.  This
brings the requirement of proper node names and adds parsing of
additional properties.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: rtc: s3c: Use defines instead of clock numbers
Krzysztof Kozlowski [Wed, 2 Oct 2019 16:07:42 +0000 (18:07 +0200)]
dt-bindings: rtc: s3c: Use defines instead of clock numbers

Make the examples in S3C RTC bindings more readable and bring them
closer to real DTS by using defines for clocks.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: samsung: Indent examples with four spaces
Krzysztof Kozlowski [Wed, 2 Oct 2019 16:07:41 +0000 (18:07 +0200)]
dt-bindings: samsung: Indent examples with four spaces

Change the indentation of examples used in json-schema bindings from two
to four spaces as this makes the code easier to read and seems to be
preferred in other files.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Sebastian Reichel <sre@kernel.org> # for power/reset
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: serio: Convert Allwinner PS2 controller to a schema
Maxime Ripard [Wed, 2 Oct 2019 12:06:45 +0000 (14:06 +0200)]
dt-bindings: serio: Convert Allwinner PS2 controller to a schema

The older Allwinner SoCs have a PS2 controller that is supported in Linux,
with a matching Device Tree binding.

Now that we have the DT validation in place, let's convert the device tree
bindings for that controller over to a YAML schemas.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: display: Convert stm32 display bindings to json-schema
Benjamin Gaignard [Tue, 15 Oct 2019 12:31:51 +0000 (14:31 +0200)]
dt-bindings: display: Convert stm32 display bindings to json-schema

Convert the STM32 display binding to DT schema format using json-schema.
Split the original bindings in two yaml files:
- one for display controller (ltdc)
- one for DSI controller

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
[robh: drop maxItems from phy-dsi-supply]
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: timer: Convert stm32 timer bindings to json-schema
Benjamin Gaignard [Mon, 14 Oct 2019 09:23:16 +0000 (11:23 +0200)]
dt-bindings: timer: Convert stm32 timer bindings to json-schema

Convert the STM32 timer binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: thermal: Convert stm32 thermal bindings to json-schema
Benjamin Gaignard [Mon, 14 Oct 2019 09:22:00 +0000 (11:22 +0200)]
dt-bindings: thermal: Convert stm32 thermal bindings to json-schema

Convert the STM32 thermal binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: media: Convert stm32 dcmi bindings to json-schema
Benjamin Gaignard [Mon, 14 Oct 2019 09:20:21 +0000 (11:20 +0200)]
dt-bindings: media: Convert stm32 dcmi bindings to json-schema

Convert the STM32 dcmi binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: media: Convert stm32 cec bindings to json-schema
Benjamin Gaignard [Mon, 14 Oct 2019 09:20:20 +0000 (11:20 +0200)]
dt-bindings: media: Convert stm32 cec bindings to json-schema

Convert the STM32 cec binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: hwlock: Convert stm32 hwspinlock bindings to json-schema
Benjamin Gaignard [Mon, 14 Oct 2019 09:17:56 +0000 (11:17 +0200)]
dt-bindings: hwlock: Convert stm32 hwspinlock bindings to json-schema

Convert the STM32 hwspinlock binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: Clean-up regulator '-supply' schemas
Rob Herring [Fri, 11 Oct 2019 18:44:13 +0000 (13:44 -0500)]
dt-bindings: Clean-up regulator '-supply' schemas

Regulator '*-supply' properties are always a single phandle, so
'maxItems: 1' or a $ref is not necessary. All that's needed is either
'true' or an optional 'description'. Following this clean-up, the
meta-schema will enforce this pattern.

There's one case in tree with 'innolux,n156bge-l21' having 2 phandles.
This appears to be a mistake or abuse of simple-panel as it's 2 different
voltage rails connected to 'power-supply'.

Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: linux-iio@vger.kernel.org
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agocheckpatch: Warn if DT bindings are not in schema format
Rob Herring [Thu, 12 Sep 2019 14:18:20 +0000 (15:18 +0100)]
checkpatch: Warn if DT bindings are not in schema format

DT bindings are moving to using a json-schema based schema format
instead of freeform text. Add a checkpatch.pl check to encourage using
the schema for new bindings. It's not yet a requirement, but is
progressively being required by some maintainers.

Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: riscv: Fix CPU schema errors
Rob Herring [Tue, 24 Sep 2019 19:37:56 +0000 (14:37 -0500)]
dt-bindings: riscv: Fix CPU schema errors

Fix the errors in the RiscV CPU DT schema:

Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: 'timebase-frequency' is a required property
Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@1: 'timebase-frequency' is a required property
Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: compatible:0: 'riscv' is not one of ['sifive,rocket0', 'sifive,e5', 'sifive,e51', 'sifive,u54-mc', 'sifive,u54', 'sifive,u5']
Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: compatible: ['riscv'] is too short
Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: 'timebase-frequency' is a required property

The DT spec allows for 'timebase-frequency' to be in 'cpu' or 'cpus' node
and RiscV requires it in /cpus node, so make it disallowed in cpu
nodes.

Fixes: 4fd669a8c487 ("dt-bindings: riscv: convert cpu binding to json-schema")
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linux-riscv@lists.infradead.org
Acked-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: display: clps711x-fb: fix native-mode setting
Martin Kaiser [Sat, 5 Oct 2019 13:09:21 +0000 (15:09 +0200)]
dt-bindings: display: clps711x-fb: fix native-mode setting

Move the native-mode setting inside the display-timing node. Outside of
display-timing, it is ignored.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: display: imx: fix native-mode setting
Martin Kaiser [Sat, 5 Oct 2019 13:09:20 +0000 (15:09 +0200)]
dt-bindings: display: imx: fix native-mode setting

Move the native-mode setting inside the display-timing node. Outside of
display-timing, it is ignored.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoASoC: samsung: i2s: Document clocks macros
Maciej Falkowski [Thu, 26 Sep 2019 11:02:19 +0000 (13:02 +0200)]
ASoC: samsung: i2s: Document clocks macros

Document clocks macros with their description
from 'Documentation/devicetree/bindings/sound/samsung-i2s.txt'

Signed-off-by: Maciej Falkowski <m.falkowski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: rtc: rtc-sh: convert bindings to json-schema
Simon Horman [Mon, 23 Sep 2019 12:14:04 +0000 (14:14 +0200)]
dt-bindings: rtc: rtc-sh: convert bindings to json-schema

Convert Real Time Clock for Renesas SH and ARM SoCs bindings documentation
to json-schema.  Also name bindings documentation file according to the
compat string being documented.

Also correct syntax error in interrupts field in example.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: crypto: samsung: Convert SSS and SlimSSS bindings to json-schema
Krzysztof Kozlowski [Fri, 20 Sep 2019 16:36:35 +0000 (18:36 +0200)]
dt-bindings: crypto: samsung: Convert SSS and SlimSSS bindings to json-schema

Convert Samsung Exynos Security SubSystem (SSS) and SlimSSS hardware
crypto accelerator bindings to DT schema format using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: memory-controllers: Convert Samsung Exynos SROM bindings to json-schema
Krzysztof Kozlowski [Wed, 18 Sep 2019 17:31:37 +0000 (19:31 +0200)]
dt-bindings: memory-controllers: Convert Samsung Exynos SROM bindings to json-schema

Convert Samsung Exynos SROM controller bindings to DT schema format
using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: rng: exynos4-rng: Convert Exynos PRNG bindings to json-schema
Krzysztof Kozlowski [Wed, 2 Oct 2019 16:13:40 +0000 (18:13 +0200)]
dt-bindings: rng: exynos4-rng: Convert Exynos PRNG bindings to json-schema

Convert Samsung Exynos Pseudo Random Number Generator bindings to DT
schema format using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: at24: add new compatible
Bartosz Golaszewski [Wed, 2 Oct 2019 07:20:47 +0000 (09:20 +0200)]
dt-bindings: at24: add new compatible

arch/arm/boot/dts/at91-dvk_som60.dt.yaml uses the compatible string
'giantec,gt24c32a' for an at24 EEPROM with a fallback to 'atmel,24c32'.

Add this model as a special case to the binding document.

Reported-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: at24: convert the binding document to yaml
Bartosz Golaszewski [Wed, 2 Oct 2019 07:20:46 +0000 (09:20 +0200)]
dt-bindings: at24: convert the binding document to yaml

Convert the binding document for at24 EEPROMs from txt to yaml. The
compatible property uses a regex pattern to address all the possible
combinations of "vendor,model" strings.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
[robh: rework compatible schema, fix missing allOf for $ref, fix errors in example]
Signed-off-by: Rob Herring <robh@kernel.org>
[Bartosz: added comments explaining the compatible property]
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoof: Make of_dma_get_range() work on bus nodes
Robin Murphy [Wed, 3 Jul 2019 17:42:20 +0000 (18:42 +0100)]
of: Make of_dma_get_range() work on bus nodes

Since the "dma-ranges" property is only valid for a node representing a
bus, of_dma_get_range() currently assumes the node passed in is a leaf
representing a device, and starts the walk from its parent. In cases
like PCI host controllers on typical FDT systems, however, where the PCI
endpoints are probed dynamically the initial leaf node represents the
'bus' itself, and this logic means we fail to consider any "dma-ranges"
describing the host bridge itself. Rework the logic such that
of_dma_get_range() also works correctly starting from a bus node
containing "dma-ranges".

While this does mean "dma-ranges" could incorrectly be in a device leaf
node, there isn't really any way in this function to ensure that a leaf
node is or isn't a bus node.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
[robh: Allow for the bus child node to still be passed in]
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
5 years agoof/address: Fix of_pci_range_parser_one translation of DMA addresses
Rob Herring [Thu, 5 Sep 2019 09:47:26 +0000 (10:47 +0100)]
of/address: Fix of_pci_range_parser_one translation of DMA addresses

of_pci_range_parser_one() has a bug when parsing dma-ranges. When it
translates the parent address (aka cpu address in the code), 'ranges' is
always being used. This happens to work because most users are just 1:1
translation.

Cc: Robin Murphy <robin.murphy@arm.com>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoof/address: Translate 'dma-ranges' for parent nodes missing 'dma-ranges'
Rob Herring [Wed, 4 Sep 2019 10:43:30 +0000 (11:43 +0100)]
of/address: Translate 'dma-ranges' for parent nodes missing 'dma-ranges'

'dma-ranges' frequently exists without parent nodes having 'dma-ranges'.
While this is an error for 'ranges', this is fine because DMA capable
devices always have a translatable DMA address. Also, with no
'dma-ranges' at all, the assumption is that DMA addresses are 1:1 with
no restrictions unless perhaps the device itself has implicit
restrictions.

Cc: Robin Murphy <robin.murphy@arm.com>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoof/unittest: Add dma-ranges address translation tests
Rob Herring [Fri, 20 Sep 2019 18:28:53 +0000 (13:28 -0500)]
of/unittest: Add dma-ranges address translation tests

The functions for parsing 'dma-ranges' ranges are buggy and fail to
handle several conditions. Add new tests for of_dma_get_range() and
for_each_of_pci_range().

With this test, we get 5 new failures which are fixed in subsequent
commits:

OF: translation of DMA address(0) to CPU address failed node(/testcase-data/address-tests/device@70000000)
FAIL of_unittest_dma_ranges_one():798 of_dma_get_range failed on node /testcase-data/address-tests/device@70000000 rc=-22
OF: translation of DMA address(10000000) to CPU address failed node(/testcase-data/address-tests/bus@80000000/device@1000)
FAIL of_unittest_dma_ranges_one():798 of_dma_get_range failed on node /testcase-data/address-tests/bus@80000000/device@1000 rc=-22
OF: translation of DMA address(0) to CPU address failed node(/testcase-data/address-tests/pci@90000000)
FAIL of_unittest_dma_ranges_one():798 of_dma_get_range failed on node /testcase-data/address-tests/pci@90000000 rc=-22
FAIL of_unittest_pci_dma_ranges():851 for_each_of_pci_range wrong CPU addr (d0000000) on node /testcase-data/address-tests/pci@90000000
FAIL of_unittest_pci_dma_ranges():861 for_each_of_pci_range wrong CPU addr (ffffffffffffffff) on node /testcase-data/address-tests/pci@90000000

Cc: Robin Murphy <robin.murphy@arm.com>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoof: Factor out #{addr,size}-cells parsing
Robin Murphy [Tue, 2 Jul 2019 17:42:39 +0000 (18:42 +0100)]
of: Factor out #{addr,size}-cells parsing

In some cases such as PCI host controllers, we may have a "parent bus"
which is an OF leaf node, but still need to correctly parse ranges from
the point of view of that bus. For that, factor out variants of the
"#addr-cells" and "#size-cells" parsers which do not assume they have a
device node and thus immediately traverse upwards before reading the
relevant property.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
[robh: don't make of_bus_n_{addr,size}_cells() public]
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoof: address: Follow DMA parent for "dma-coherent"
Robin Murphy [Wed, 3 Jul 2019 13:47:31 +0000 (14:47 +0100)]
of: address: Follow DMA parent for "dma-coherent"

Much like for address translation, when checking for DMA coherence we
should be sure to walk up the DMA hierarchy, rather than the MMIO one,
now that we can accommodate them being different.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoof/address: Introduce of_get_next_dma_parent() helper
Robin Murphy [Wed, 3 Jul 2019 17:23:01 +0000 (18:23 +0100)]
of/address: Introduce of_get_next_dma_parent() helper

Add of_get_next_dma_parent() helper which is similar to
__of_get_dma_parent(), but can be used in iterators and decrements the
ref count on the prior parent.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoof: address: Report of_dma_get_range() errors meaningfully
Robin Murphy [Thu, 4 Jul 2019 13:54:12 +0000 (14:54 +0100)]
of: address: Report of_dma_get_range() errors meaningfully

If we failed to translate a DMA address, at least show the offending
address rather than the uninitialised contents of the destination
argument.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoof: Make of_dma_get_range() private
Rob Herring [Thu, 5 Sep 2019 10:53:27 +0000 (11:53 +0100)]
of: Make of_dma_get_range() private

of_dma_get_range() is only used within the DT core code, so remove the
export and move the header declaration to the private header.

Cc: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoof: Remove unused of_find_matching_node_by_address()
Rob Herring [Thu, 5 Sep 2019 10:44:24 +0000 (11:44 +0100)]
of: Remove unused of_find_matching_node_by_address()

of_find_matching_node_by_address() is unused, so remove it.

Cc: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoMerge branch 'dt/linus' into dt/next
Rob Herring [Mon, 7 Oct 2019 15:04:11 +0000 (10:04 -0500)]
Merge branch 'dt/linus' into dt/next

5 years agodt-bindings: watchdog: meson-gxbb-wdt: Include generic watchdog bindings
Krzysztof Kozlowski [Fri, 20 Sep 2019 16:21:24 +0000 (18:21 +0200)]
dt-bindings: watchdog: meson-gxbb-wdt: Include generic watchdog bindings

Include generic watchdog DT schema bindings in Amlogic GXBB Watchdog
bindings.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: watchdog: Add missing clocks requirement in Samsung SoC watchdog
Krzysztof Kozlowski [Fri, 20 Sep 2019 16:21:23 +0000 (18:21 +0200)]
dt-bindings: watchdog: Add missing clocks requirement in Samsung SoC watchdog

The Samsung SoC watchdog driver always required providing a clock
(either through platform data or from DT).  However when bindings were
added in commit 9487a9cc7140 ("watchdog: s3c2410: Add support for device
tree based probe"), they missed the requirement of clock.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: watchdog: Convert Samsung SoC watchdog bindings to json-schema
Krzysztof Kozlowski [Fri, 20 Sep 2019 16:21:22 +0000 (18:21 +0200)]
dt-bindings: watchdog: Convert Samsung SoC watchdog bindings to json-schema

Convert Samsung S3C/S5P/Exynos watchdog bindings to DT schema format
using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: pwm: renesas: tpu: convert bindings to json-schema
Yoshihiro Kaneko [Fri, 20 Sep 2019 19:36:29 +0000 (04:36 +0900)]
dt-bindings: pwm: renesas: tpu: convert bindings to json-schema

Convert Renesas R-Car Timer Pulse Unit PWM Controller bindings documentation
to json-schema.

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: pwm: renesas: pwm-rcar: convert bindings to json-schema
Yoshihiro Kaneko [Fri, 20 Sep 2019 19:35:27 +0000 (04:35 +0900)]
dt-bindings: pwm: renesas: pwm-rcar: convert bindings to json-schema

Convert Renesas R-Car PWM Timer Controller bindings documentation to
json-schema.

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: phy: lantiq: Fix Property Name
Maxime Ripard [Wed, 2 Oct 2019 14:46:40 +0000 (16:46 +0200)]
dt-bindings: phy: lantiq: Fix Property Name

The binding has a typo where resets-names should read reset-names, which in
turn leads to a warning when the example is validated, since reset-names is
being used, and the binding prevent the usage of any property that isn't
described.

Fixes: 088e88be5a38 ("dt-bindings: phy: add binding for the Lantiq VRX200 and ARX300 PCIe PHYs")
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: iio: ad7192: Fix DTC warning in the example
Maxime Ripard [Wed, 2 Oct 2019 14:45:42 +0000 (16:45 +0200)]
dt-bindings: iio: ad7192: Fix DTC warning in the example

The example contains an SPI bus and device, but doesn't have the
appropriate size and address cells size.

This creates a DTC warning when the example is compiled since the default
ones will not match what the device uses. Let's add them to remove that
warning.

Fixes: f7356e47032c ("dt-bindings: iio: adc: ad7192: Add binding documentation for AD7192")
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: iio: ad7192: Fix Regulator Properties
Maxime Ripard [Wed, 2 Oct 2019 14:45:41 +0000 (16:45 +0200)]
dt-bindings: iio: ad7192: Fix Regulator Properties

The AD7192 binding describes two regulator properties, avdd-supply and
dvdd-supply, but describes it as a constant string that must be avdd and
dvdd. This is wrong since a *-supply property is actually a phandle, and
results in warnings when the example is validated (or any device tree using
that device, for that matter).

Let's remove that requirement.

Fixes: f7356e47032c ("dt-bindings: iio: adc: ad7192: Add binding documentation for AD7192")
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: media: rc: Fix redundant string
Maxime Ripard [Wed, 2 Oct 2019 14:44:00 +0000 (16:44 +0200)]
dt-bindings: media: rc: Fix redundant string

The linux,rc-map-name property is described using an enum, yet a value has
been put in that enum twice, resulting in a warning. Let's fix that.

Fixes: 7c31b9d67342 ("media: dt-bindings: media: Add YAML schemas for the generic RC bindings")
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: dsp: Fix fsl,dsp example
Maxime Ripard [Wed, 2 Oct 2019 14:42:04 +0000 (16:42 +0200)]
dt-bindings: dsp: Fix fsl,dsp example

The fsl,dsp binding requires a memory-region, yet its example doesn't have
one which results in a warning. Let's add a memory-region phandle to the
example.

Fixes: 7db2f2dfc701 ("dt-bindings: dsp: fsl: Add DSP core binding support")
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: gpu: Convert Samsung 2D Graphics Accelerator to dt-schema
Maciej Falkowski [Fri, 27 Sep 2019 14:33:19 +0000 (16:33 +0200)]
dt-bindings: gpu: Convert Samsung 2D Graphics Accelerator to dt-schema

Convert Samsung 2D Graphics Accelerator to newer dt-schema format

Signed-off-by: Maciej Falkowski <m.falkowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: gpu: Convert Samsung Image Scaler to dt-schema
Maciej Falkowski [Fri, 27 Sep 2019 14:33:06 +0000 (16:33 +0200)]
dt-bindings: gpu: Convert Samsung Image Scaler to dt-schema

Convert Samsung Image Scaler to newer dt-schema format.

Signed-off-by: Maciej Falkowski <m.falkowski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: bus: renesas-bsc: convert bindings to json-schema
Simon Horman [Mon, 30 Sep 2019 11:52:04 +0000 (13:52 +0200)]
dt-bindings: bus: renesas-bsc: convert bindings to json-schema

Convert Renesas Bus State Controller (BSC) bindings documentation to
json-schema.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: bus: simple-pm-bus: convert bindings to json-schema
Simon Horman [Mon, 30 Sep 2019 11:52:03 +0000 (13:52 +0200)]
dt-bindings: bus: simple-pm-bus: convert bindings to json-schema

Convert Simple Power-Managed Bus bindings documentation to json-schema.

As a side effect of this change only simple-pm-bus is used in example. A
follow-up patch will provide an example for the separately documented
Renesas Bus State Controller (BSC) that uses "renesas,bsc-sh73a0" and
"renesas,bsc" compat strings.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: timer: Use defines instead of numbers in Exynos MCT examples
Krzysztof Kozlowski [Mon, 30 Sep 2019 15:44:18 +0000 (17:44 +0200)]
dt-bindings: timer: Use defines instead of numbers in Exynos MCT examples

Make the examples in Exynos Multi Core Timer bindings more readable and
bring them closer to real DTS by using defines for interrupt flags.
Fix also GIC interrupt type in example for Exynos4412 (from SPI to PPI).

Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: timer: Convert Exynos MCT bindings to json-schema
Krzysztof Kozlowski [Mon, 30 Sep 2019 15:44:17 +0000 (17:44 +0200)]
dt-bindings: timer: Convert Exynos MCT bindings to json-schema

Convert Samsung Exynos Soc Multi Core Timer bindings to DT schema format
using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoof/fdt: don't ignore errors from of_setup_earlycon
Christoph Hellwig [Tue, 10 Sep 2019 05:58:33 +0000 (07:58 +0200)]
of/fdt: don't ignore errors from of_setup_earlycon

If of_setup_earlycon we should keep on iterating earlycon options
instead of breaking out of the loop.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: arm: samsung: Convert Exynos PMU bindings to json-schema
Krzysztof Kozlowski [Fri, 20 Sep 2019 16:26:00 +0000 (18:26 +0200)]
dt-bindings: arm: samsung: Convert Exynos PMU bindings to json-schema

Convert Samsung Exynos Power Management Unit (PMU) bindings to DT schema
format using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: arm: samsung: Convert Exynos System Registers bindings to json-schema
Krzysztof Kozlowski [Fri, 20 Sep 2019 16:25:59 +0000 (18:25 +0200)]
dt-bindings: arm: samsung: Convert Exynos System Registers bindings to json-schema

Convert Samsung Exynos System Registers (SYSREG) bindings to DT schema
format using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: irqchip: renesas-irqc: convert bindings to json-schema
Yoshihiro Kaneko [Thu, 19 Sep 2019 17:48:31 +0000 (02:48 +0900)]
dt-bindings: irqchip: renesas-irqc: convert bindings to json-schema

Convert Renesas Interrupt Controller bindings documentation to json-schema.

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: iommu: Convert Samsung Exynos IOMMU H/W, System MMU to dt-schema
Maciej Falkowski [Thu, 19 Sep 2019 13:19:44 +0000 (15:19 +0200)]
dt-bindings: iommu: Convert Samsung Exynos IOMMU H/W, System MMU to dt-schema

Convert Samsung Exynos IOMMU H/W, System Memory Management Unit
to newer dt-schema format.

Signed-off-by: Maciej Falkowski <m.falkowski@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: iio: adc: exynos: Remove old requirement of two register address ranges
Krzysztof Kozlowski [Sat, 7 Sep 2019 09:20:07 +0000 (11:20 +0200)]
dt-bindings: iio: adc: exynos: Remove old requirement of two register address ranges

Commit fafb37cfae6d ("iio: exyno-adc: use syscon for PMU
register access") changed the Exynos ADC driver so the PMU syscon
phandle is required instead of second register address space.  The
bindings were not updated so fix them now.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: iio: adc: exynos: Convert Exynos ADC bindings to json-schema
Krzysztof Kozlowski [Sat, 7 Sep 2019 09:20:06 +0000 (11:20 +0200)]
dt-bindings: iio: adc: exynos: Convert Exynos ADC bindings to json-schema

Convert Samsung Exynos Analog to Digital Converter bindings to DT schema
format using json-schema.

This is a direct conversion of existing bindings so it also copies the
existing error in the bindings regarding the requirement of two register
address ranges for certain compatibles.  The inconsistency in binding
was caused by commit fafb37cfae6d ("iio: exyno-adc: use syscon for PMU
register access").

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: rtc: s3c: Convert S3C/Exynos RTC bindings to json-schema
Krzysztof Kozlowski [Sat, 7 Sep 2019 09:20:05 +0000 (11:20 +0200)]
dt-bindings: rtc: s3c: Convert S3C/Exynos RTC bindings to json-schema

Convert Samsung S3C/Exynos Real Time Clock bindings to DT schema format
using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: arm: samsung: Convert Exynos Chipid bindings to json-schema
Krzysztof Kozlowski [Sat, 7 Sep 2019 09:20:02 +0000 (11:20 +0200)]
dt-bindings: arm: samsung: Convert Exynos Chipid bindings to json-schema

Convert Samsung Exynos Chipid bindings to DT schema format using
json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: arm: samsung: Document missing Exynos7 boards bindings
Krzysztof Kozlowski [Sat, 7 Sep 2019 09:20:01 +0000 (11:20 +0200)]
dt-bindings: arm: samsung: Document missing Exynos7 boards bindings

Add missing documentation of ARMv8 Samsung Exynos7 SoC based boards
bindings.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: arm: samsung: Document missing S5Pv210 boards bindings
Krzysztof Kozlowski [Sat, 7 Sep 2019 09:20:00 +0000 (11:20 +0200)]
dt-bindings: arm: samsung: Document missing S5Pv210 boards bindings

Add missing documentation of Samsung S5Pv210 SoC based boards bindings.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: arm: samsung: Convert Samsung board/soc bindings to json-schema
Krzysztof Kozlowski [Sat, 7 Sep 2019 09:19:59 +0000 (11:19 +0200)]
dt-bindings: arm: samsung: Convert Samsung board/soc bindings to json-schema

Convert Samsung S5P and Exynos SoC bindings to DT schema format using
json-schema.  This is purely conversion of already documented bindings
so it does not cover all of DTS in the Linux kernel (few S5P/Exynos and
all S3C are missing).

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: power: syscon-poweroff: Convert bindings to json-schema
Krzysztof Kozlowski [Sat, 7 Sep 2019 09:19:58 +0000 (11:19 +0200)]
dt-bindings: power: syscon-poweroff: Convert bindings to json-schema

Convert the Syscon poweroff bindings to DT schema format using
json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: power: syscon-reboot: Convert bindings to json-schema
Krzysztof Kozlowski [Sat, 7 Sep 2019 09:19:57 +0000 (11:19 +0200)]
dt-bindings: power: syscon-reboot: Convert bindings to json-schema

Convert the Syscon reboot bindings to DT schema format using
json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agodt-bindings: gpu: Convert Samsung Image Rotator to dt-schema
Maciej Falkowski [Tue, 17 Sep 2019 10:37:27 +0000 (12:37 +0200)]
dt-bindings: gpu: Convert Samsung Image Rotator to dt-schema

Convert Samsung Image Rotator to newer dt-schema format.

Signed-off-by: Maciej Falkowski <m.falkowski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Rob Herring <robh@kernel.org>
5 years agoLinux 5.4-rc1
Linus Torvalds [Mon, 30 Sep 2019 17:35:40 +0000 (10:35 -0700)]
Linux 5.4-rc1

5 years agoMerge tag 'for-5.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
Linus Torvalds [Mon, 30 Sep 2019 17:25:24 +0000 (10:25 -0700)]
Merge tag 'for-5.4-rc1-tag' of git://git./linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:
 "A bunch of fixes that accumulated in recent weeks, mostly material for
  stable.

  Summary:

   - fix for regression from 5.3 that prevents to use balance convert
     with single profile

   - qgroup fixes: rescan race, accounting leak with multiple writers,
     potential leak after io failure recovery

   - fix for use after free in relocation (reported by KASAN)

   - other error handling fixups"

* tag 'for-5.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: qgroup: Fix reserved data space leak if we have multiple reserve calls
  btrfs: qgroup: Fix the wrong target io_tree when freeing reserved data space
  btrfs: Fix a regression which we can't convert to SINGLE profile
  btrfs: relocation: fix use-after-free on dead relocation roots
  Btrfs: fix race setting up and completing qgroup rescan workers
  Btrfs: fix missing error return if writeback for extent buffer never started
  btrfs: adjust dirty_metadata_bytes after writeback failure of extent buffer
  Btrfs: fix selftests failure due to uninitialized i_mode in test inodes

5 years agoMerge tag 'csky-for-linus-5.4-rc1' of git://github.com/c-sky/csky-linux
Linus Torvalds [Mon, 30 Sep 2019 17:16:17 +0000 (10:16 -0700)]
Merge tag 'csky-for-linus-5.4-rc1' of git://github.com/c-sky/csky-linux

Pull csky updates from Guo Ren:
 "This round of csky subsystem just some fixups:

   - Fix mb() synchronization problem

   - Fix dma_alloc_coherent with PAGE_SO attribute

   - Fix cache_op failed when cross memory ZONEs

   - Optimize arch_sync_dma_for_cpu/device with dma_inv_range

   - Fix ioremap function losing

   - Fix arch_get_unmapped_area() implementation

   - Fix defer cache flush for 610

   - Support kernel non-aligned access

   - Fix 610 vipt cache flush mechanism

   - Fix add zero_fp fixup perf backtrace panic

   - Move static keyword to the front of declaration

   - Fix csky_pmu.max_period assignment

   - Use generic free_initrd_mem()

   - entry: Remove unneeded need_resched() loop"

* tag 'csky-for-linus-5.4-rc1' of git://github.com/c-sky/csky-linux:
  csky: Move static keyword to the front of declaration
  csky: entry: Remove unneeded need_resched() loop
  csky: Fixup csky_pmu.max_period assignment
  csky: Fixup add zero_fp fixup perf backtrace panic
  csky: Use generic free_initrd_mem()
  csky: Fixup 610 vipt cache flush mechanism
  csky: Support kernel non-aligned access
  csky: Fixup defer cache flush for 610
  csky: Fixup arch_get_unmapped_area() implementation
  csky: Fixup ioremap function losing
  csky: Optimize arch_sync_dma_for_cpu/device with dma_inv_range
  csky/dma: Fixup cache_op failed when cross memory ZONEs
  csky: Fixup dma_alloc_coherent with PAGE_SO attribute
  csky: Fixup mb() synchronization problem

5 years agoMerge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Linus Torvalds [Mon, 30 Sep 2019 17:04:28 +0000 (10:04 -0700)]
Merge tag 'armsoc-fixes' of git://git./linux/kernel/git/soc/soc

Pull ARM SoC fixes from Olof Johansson:
 "A few fixes that have trickled in through the merge window:

   - Video fixes for OMAP due to panel-dpi driver removal

   - Clock fixes for OMAP that broke no-idle quirks + nfsroot on DRA7

   - Fixing arch version on ASpeed ast2500

   - Two fixes for reset handling on ARM SCMI"

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  ARM: aspeed: ast2500 is ARMv6K
  reset: reset-scmi: add missing handle initialisation
  firmware: arm_scmi: reset: fix reset_state assignment in scmi_domain_reset
  bus: ti-sysc: Remove unpaired sysc_clkdm_deny_idle()
  ARM: dts: logicpd-som-lv: Fix i2c2 and i2c3 Pin mux
  ARM: dts: am3517-evm: Fix missing video
  ARM: dts: logicpd-torpedo-baseboard: Fix missing video
  ARM: omap2plus_defconfig: Fix missing video
  bus: ti-sysc: Fix handling of invalid clocks
  bus: ti-sysc: Fix clock handling for no-idle quirks

5 years agoMerge tag 'trace-v5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
Linus Torvalds [Mon, 30 Sep 2019 16:29:53 +0000 (09:29 -0700)]
Merge tag 'trace-v5.4-3' of git://git./linux/kernel/git/rostedt/linux-trace

Pull tracing fixes from Steven Rostedt:
 "A few more tracing fixes:

   - Fix a buffer overflow by checking nr_args correctly in probes

   - Fix a warning that is reported by clang

   - Fix a possible memory leak in error path of filter processing

   - Fix the selftest that checks for failures, but wasn't failing

   - Minor clean up on call site output of a memory trace event"

* tag 'trace-v5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  selftests/ftrace: Fix same probe error test
  mm, tracing: Print symbol name for call_site in trace events
  tracing: Have error path in predicate_parse() free its allocated memory
  tracing: Fix clang -Wint-in-bool-context warnings in IF_ASSIGN macro
  tracing/probe: Fix to check the difference of nr_args before adding probe

5 years agoMerge tag 'mmc-v5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Linus Torvalds [Mon, 30 Sep 2019 16:21:53 +0000 (09:21 -0700)]
Merge tag 'mmc-v5.4-2' of git://git./linux/kernel/git/ulfh/mmc

Pull more MMC updates from Ulf Hansson:
 "A couple more updates/fixes for MMC:

   - sdhci-pci: Add Genesys Logic GL975x support

   - sdhci-tegra: Recover loss in throughput for DMA

   - sdhci-of-esdhc: Fix DMA bug"

* tag 'mmc-v5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: host: sdhci-pci: Add Genesys Logic GL975x support
  mmc: tegra: Implement ->set_dma_mask()
  mmc: sdhci: Let drivers define their DMA mask
  mmc: sdhci-of-esdhc: set DMA snooping based on DMA coherence
  mmc: sdhci: improve ADMA error reporting

5 years agocsky: Move static keyword to the front of declaration
Krzysztof Wilczynski [Tue, 3 Sep 2019 11:36:51 +0000 (13:36 +0200)]
csky: Move static keyword to the front of declaration

Move the static keyword to the front of declaration of
csky_pmu_of_device_ids, and resolve the following compiler
warning that can be seen when building with warnings
enabled (W=1):

arch/csky/kernel/perf_event.c:1340:1: warning:
  ‘static’ is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
5 years agocsky: entry: Remove unneeded need_resched() loop
Valentin Schneider [Mon, 23 Sep 2019 14:36:14 +0000 (15:36 +0100)]
csky: entry: Remove unneeded need_resched() loop

Since the enabling and disabling of IRQs within preempt_schedule_irq()
is contained in a need_resched() loop, we don't need the outer arch
code loop.

Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
5 years agoMerge tag 'char-misc-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Mon, 30 Sep 2019 02:52:52 +0000 (19:52 -0700)]
Merge tag 'char-misc-5.4-rc1' of git://git./linux/kernel/git/gregkh/char-misc

Pull Documentation/process update from Greg KH:
 "Here are two small Documentation/process/embargoed-hardware-issues.rst
  file updates that missed my previous char/misc pull request.

  The first one adds an Intel representative for the process, and the
  second one cleans up the text a bit more when it comes to how the
  disclosure rules work, as it was a bit confusing to some companies"

* tag 'char-misc-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  Documentation/process: Clarify disclosure rules
  Documentation/process: Volunteer as the ambassador for Intel

5 years agoMerge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Mon, 30 Sep 2019 02:42:07 +0000 (19:42 -0700)]
Merge branch 'work.misc' of git://git./linux/kernel/git/viro/vfs

Pull more vfs updates from Al Viro:
 "A couple of misc patches"

* 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  afs dynroot: switch to simple_dir_operations
  fs/handle.c - fix up kerneldoc

5 years agoMerge tag '5.4-rc-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Mon, 30 Sep 2019 02:37:32 +0000 (19:37 -0700)]
Merge tag '5.4-rc-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull more cifs updates from Steve French:
 "Fixes from the recent SMB3 Test events and Storage Developer
  Conference (held the last two weeks).

  Here are nine smb3 patches including an important patch for debugging
  traces with wireshark, with three patches marked for stable.

  Additional fixes from last week to better handle some newly discovered
  reparse points, and a fix the create/mkdir path for setting the mode
  more atomically (in SMB3 Create security descriptor context), and one
  for path name processing are still being tested so are not included
  here"

* tag '5.4-rc-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  CIFS: Fix oplock handling for SMB 2.1+ protocols
  smb3: missing ACL related flags
  smb3: pass mode bits into create calls
  smb3: Add missing reparse tags
  CIFS: fix max ea value size
  fs/cifs/sess.c: Remove set but not used variable 'capabilities'
  fs/cifs/smb2pdu.c: Make SMB2_notify_init static
  smb3: fix leak in "open on server" perf counter
  smb3: allow decryption keys to be dumped by admin for debugging

5 years agocsky: Fixup csky_pmu.max_period assignment
Mao Han [Wed, 25 Sep 2019 09:23:02 +0000 (17:23 +0800)]
csky: Fixup csky_pmu.max_period assignment

The csky_pmu.max_period has type u64, and BIT() can only return
32 bits unsigned long on C-SKY. The initialization for max_period
will be incorrect when count_width is bigger than 32.

Use BIT_ULL()

Signed-off-by: Mao Han <han_mao@c-sky.com>
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
5 years agocsky: Fixup add zero_fp fixup perf backtrace panic
Guo Ren [Wed, 25 Sep 2019 11:56:16 +0000 (19:56 +0800)]
csky: Fixup add zero_fp fixup perf backtrace panic

We need set fp zero to let backtrace know the end. The patch fixup perf
callchain panic problem, because backtrace didn't know what is the end
of fp.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Reported-by: Mao Han <han_mao@c-sky.com>
5 years agocsky: Use generic free_initrd_mem()
Mike Rapoport [Wed, 28 Aug 2019 13:35:19 +0000 (16:35 +0300)]
csky: Use generic free_initrd_mem()

The csky implementation of free_initrd_mem() is an open-coded version of
free_reserved_area() without poisoning.

Remove it and make csky use the generic version of free_initrd_mem().

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
5 years agoMerge branch 'entropy'
Linus Torvalds [Mon, 30 Sep 2019 02:25:39 +0000 (19:25 -0700)]
Merge branch 'entropy'

Merge active entropy generation updates.

This is admittedly partly "for discussion".  We need to have a way
forward for the boot time deadlocks where user space ends up waiting for
more entropy, but no entropy is forthcoming because the system is
entirely idle just waiting for something to happen.

While this was triggered by what is arguably a user space bug with
GDM/gnome-session asking for secure randomness during early boot, when
they didn't even need any such truly secure thing, the issue ends up
being that our "getrandom()" interface is prone to that kind of
confusion, because people don't think very hard about whether they want
to block for sufficient amounts of entropy.

The approach here-in is to decide to not just passively wait for entropy
to happen, but to start actively collecting it if it is missing.  This
is not necessarily always possible, but if the architecture has a CPU
cycle counter, there is a fair amount of noise in the exact timings of
reasonably complex loads.

We may end up tweaking the load and the entropy estimates, but this
should be at least a reasonable starting point.

As part of this, we also revert the revert of the ext4 IO pattern
improvement that ended up triggering the reported lack of external
entropy.

* getrandom() active entropy waiting:
  Revert "Revert "ext4: make __ext4_get_inode_loc plug""
  random: try to actively add entropy rather than passively wait for it

5 years agoRevert "Revert "ext4: make __ext4_get_inode_loc plug""
Linus Torvalds [Mon, 30 Sep 2019 00:59:23 +0000 (17:59 -0700)]
Revert "Revert "ext4: make __ext4_get_inode_loc plug""

This reverts commit 72dbcf72156641fde4d8ea401e977341bfd35a05.

Instead of waiting forever for entropy that may just not happen, we now
try to actively generate entropy when required, and are thus hopefully
avoiding the problem that caused the nice ext4 IO pattern fix to be
reverted.

So revert the revert.

Cc: Ahmed S. Darwish <darwish.07@gmail.com>
Cc: Ted Ts'o <tytso@mit.edu>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Alexander E. Patrakov <patrakov@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
5 years agorandom: try to actively add entropy rather than passively wait for it
Linus Torvalds [Sat, 28 Sep 2019 23:53:52 +0000 (16:53 -0700)]
random: try to actively add entropy rather than passively wait for it

For 5.3 we had to revert a nice ext4 IO pattern improvement, because it
caused a bootup regression due to lack of entropy at bootup together
with arguably broken user space that was asking for secure random
numbers when it really didn't need to.

See commit 72dbcf721566 (Revert "ext4: make __ext4_get_inode_loc plug").

This aims to solve the issue by actively generating entropy noise using
the CPU cycle counter when waiting for the random number generator to
initialize.  This only works when you have a high-frequency time stamp
counter available, but that's the case on all modern x86 CPU's, and on
most other modern CPU's too.

What we do is to generate jitter entropy from the CPU cycle counter
under a somewhat complex load: calling the scheduler while also
guaranteeing a certain amount of timing noise by also triggering a
timer.

I'm sure we can tweak this, and that people will want to look at other
alternatives, but there's been a number of papers written on jitter
entropy, and this should really be fairly conservative by crediting one
bit of entropy for every timer-induced jump in the cycle counter.  Not
because the timer itself would be all that unpredictable, but because
the interaction between the timer and the loop is going to be.

Even if (and perhaps particularly if) the timer actually happens on
another CPU, the cacheline interaction between the loop that reads the
cycle counter and the timer itself firing is going to add perturbations
to the cycle counter values that get mixed into the entropy pool.

As Thomas pointed out, with a modern out-of-order CPU, even quite simple
loops show a fair amount of hard-to-predict timing variability even in
the absense of external interrupts.  But this tries to take that further
by actually having a fairly complex interaction.

This is not going to solve the entropy issue for architectures that have
no CPU cycle counter, but it's not clear how (and if) that is solvable,
and the hardware in question is largely starting to be irrelevant.  And
by doing this we can at least avoid some of the even more contentious
approaches (like making the entropy waiting time out in order to avoid
the possibly unbounded waiting).

Cc: Ahmed Darwish <darwish.07@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Nicholas Mc Guire <hofrat@opentech.at>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Alexander E. Patrakov <patrakov@gmail.com>
Cc: Lennart Poettering <mzxreary@0pointer.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
5 years agoMerge tag 'fixes-5.4-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Sun, 29 Sep 2019 18:19:25 +0000 (11:19 -0700)]
Merge tag 'fixes-5.4-merge-window' of git://git./linux/kernel/git/tmlind/linux-omap into arm/fixes

Fixes for omap variants

Few fixes for ti-sysc interconnect target module driver for no-idle
quirks that caused nfsroot to fail on some dra7 boards.

And let's fixes to get LCD working again for logicpd board that got
broken a while back with removal of panel-dpi driver. We need to now
use generic CONFIG_DRM_PANEL_SIMPLE instead.

* tag 'fixes-5.4-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  bus: ti-sysc: Remove unpaired sysc_clkdm_deny_idle()
  ARM: dts: logicpd-som-lv: Fix i2c2 and i2c3 Pin mux
  ARM: dts: am3517-evm: Fix missing video
  ARM: dts: logicpd-torpedo-baseboard: Fix missing video
  ARM: omap2plus_defconfig: Fix missing video
  bus: ti-sysc: Fix handling of invalid clocks
  bus: ti-sysc: Fix clock handling for no-idle quirks

Link: https://lore.kernel.org/r/pull-1568819401-72461@atomide.com
Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoMerge tag 'scmi-fixes-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Olof Johansson [Sun, 29 Sep 2019 18:19:18 +0000 (11:19 -0700)]
Merge tag 'scmi-fixes-5.4' of git://git./linux/kernel/git/sudeep.holla/linux into arm/fixes

ARM SCMI fixes for v5.4

Couple of fixes: one in scmi reset driver initialising missed scmi handle
and an other in scmi reset API implementation fixing the assignment of
reset state

* tag 'scmi-fixes-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  reset: reset-scmi: add missing handle initialisation
  firmware: arm_scmi: reset: fix reset_state assignment in scmi_domain_reset

Link: https://lore.kernel.org/r/20190918142139.GA4370@bogus
Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoMerge tag 'libnvdimm-fixes-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 29 Sep 2019 17:33:41 +0000 (10:33 -0700)]
Merge tag 'libnvdimm-fixes-5.4-rc1' of git://git./linux/kernel/git/nvdimm/nvdimm

More libnvdimm updates from Dan Williams:

 - Complete the reworks to interoperate with powerpc dynamic huge page
   sizes

 - Fix a crash due to missed accounting for the powerpc 'struct
   page'-memmap mapping granularity

 - Fix badblock initialization for volatile (DRAM emulated) pmem ranges

 - Stop triggering request_key() notifications to userspace when
   NVDIMM-security is disabled / not present

 - Miscellaneous small fixups

* tag 'libnvdimm-fixes-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  libnvdimm/region: Enable MAP_SYNC for volatile regions
  libnvdimm: prevent nvdimm from requesting key when security is disabled
  libnvdimm/region: Initialize bad block for volatile namespaces
  libnvdimm/nfit_test: Fix acpi_handle redefinition
  libnvdimm/altmap: Track namespace boundaries in altmap
  libnvdimm: Fix endian conversion issues 
  libnvdimm/dax: Pick the right alignment default when creating dax devices
  powerpc/book3s64: Export has_transparent_hugepage() related functions.

5 years agoMerge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux...
Linus Torvalds [Sun, 29 Sep 2019 17:24:23 +0000 (10:24 -0700)]
Merge branch 'linus' of git://git./linux/kernel/git/evalenti/linux-soc-thermal

Pull thermal SoC updates from Eduardo Valentin:
 "This is a really small pull in the midst of a lot of pending patches.

  We are in the middle of restructuring how we are maintaining the
  thermal subsystem, as per discussion in our last LPC. For now, I am
  sending just some changes that were pending in my tree. Looking
  forward to get a more streamlined process in the next merge window"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
  thermal: db8500: Rewrite to be a pure OF sensor
  thermal: db8500: Use dev helper variable
  thermal: db8500: Finalize device tree conversion
  thermal: thermal_mmio: remove some dead code

5 years agoMerge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sun, 29 Sep 2019 17:20:16 +0000 (10:20 -0700)]
Merge branch 'i2c/for-next' of git://git./linux/kernel/git/wsa/linux

Pull  more i2c updates from Wolfram Sang:

 - make Lenovo Yoga C630 boot now that the dependencies are merged

 - restore BlockProcessCall for i801, accidently removed in this merge
   window

 - a bugfix for the riic driver

 - an improvement to the slave-eeprom driver which should have been in
   the first pull request but sadly got lost in the process

* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: slave-eeprom: Add read only mode
  i2c: i801: Bring back Block Process Call support for certain platforms
  i2c: riic: Clear NACK in tend isr
  i2c: qcom-geni: Disable DMA processing on the Lenovo Yoga C630

5 years agoMerge tag 'iommu-fixes-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 29 Sep 2019 17:00:14 +0000 (10:00 -0700)]
Merge tag 'iommu-fixes-5.4-rc1' of git://git./linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:
 "A couple of fixes for the AMD IOMMU driver have piled up:

   - Some fixes for the reworked IO page-table which caused memory leaks
     or did not allow to downgrade mappings under some conditions.

   - Locking fixes to fix a couple of possible races around accessing
     'struct protection_domain'. The races got introduced when the
     dma-ops path became lock-less in the fast-path"

* tag 'iommu-fixes-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/amd: Lock code paths traversing protection_domain->dev_list
  iommu/amd: Lock dev_data in attach/detach code paths
  iommu/amd: Check for busy devices earlier in attach_device()
  iommu/amd: Take domain->lock for complete attach/detach path
  iommu/amd: Remove amd_iommu_devtable_lock
  iommu/amd: Remove domain->updated
  iommu/amd: Wait for completion of IOTLB flush in attach_device
  iommu/amd: Unmap all L7 PTEs when downgrading page-sizes
  iommu/amd: Introduce first_pte_l7() helper
  iommu/amd: Fix downgrading default page-sizes in alloc_pte()
  iommu/amd: Fix pages leak in free_pagetable()

5 years agoDocumentation/process: Clarify disclosure rules
Thomas Gleixner [Wed, 25 Sep 2019 08:29:49 +0000 (10:29 +0200)]
Documentation/process: Clarify disclosure rules

The role of the contact list provided by the disclosing party and how it
affects the disclosure process and the ability to include experts into
the development process is not really well explained.

Neither is it entirely clear when the disclosing party will be informed
about the fact that a developer who is not covered by an employer NDA needs
to be brought in and disclosed.

Explain the role of the contact list and the information policy along with
an eventual conflict resolution better.

Reported-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/r/alpine.DEB.2.21.1909251028390.10825@nanos.tec.linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Linus Torvalds [Sun, 29 Sep 2019 00:47:33 +0000 (17:47 -0700)]
Merge git://git./linux/kernel/git/netdev/net

Pull networking fixes from David Miller:

 1) Sanity check URB networking device parameters to avoid divide by
    zero, from Oliver Neukum.

 2) Disable global multicast filter in NCSI, otherwise LLDP and IPV6
    don't work properly. Longer term this needs a better fix tho. From
    Vijay Khemka.

 3) Small fixes to selftests (use ping when ping6 is not present, etc.)
    from David Ahern.

 4) Bring back rt_uses_gateway member of struct rtable, it's semantics
    were not well understood and trying to remove it broke things. From
    David Ahern.

 5) Move usbnet snaity checking, ignore endpoints with invalid
    wMaxPacketSize. From Bjørn Mork.

 6) Missing Kconfig deps for sja1105 driver, from Mao Wenan.

 7) Various small fixes to the mlx5 DR steering code, from Alaa Hleihel,
    Alex Vesker, and Yevgeny Kliteynik

 8) Missing CAP_NET_RAW checks in various places, from Ori Nimron.

 9) Fix crash when removing sch_cbs entry while offloading is enabled,
    from Vinicius Costa Gomes.

10) Signedness bug fixes, generally in looking at the result given by
    of_get_phy_mode() and friends. From Dan Crapenter.

11) Disable preemption around BPF_PROG_RUN() calls, from Eric Dumazet.

12) Don't create VRF ipv6 rules if ipv6 is disabled, from David Ahern.

13) Fix quantization code in tcp_bbr, from Kevin Yang.

* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (127 commits)
  net: tap: clean up an indentation issue
  nfp: abm: fix memory leak in nfp_abm_u32_knode_replace
  tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state
  sk_buff: drop all skb extensions on free and skb scrubbing
  tcp_bbr: fix quantization code to not raise cwnd if not probing bandwidth
  mlxsw: spectrum_flower: Fail in case user specifies multiple mirror actions
  Documentation: Clarify trap's description
  mlxsw: spectrum: Clear VLAN filters during port initialization
  net: ena: clean up indentation issue
  NFC: st95hf: clean up indentation issue
  net: phy: micrel: add Asym Pause workaround for KSZ9021
  net: socionext: ave: Avoid using netdev_err() before calling register_netdev()
  ptp: correctly disable flags on old ioctls
  lib: dimlib: fix help text typos
  net: dsa: microchip: Always set regmap stride to 1
  nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs
  nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs
  net/sched: Set default of CONFIG_NET_TC_SKB_EXT to N
  vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled
  net: sched: sch_sfb: don't call qdisc_put() while holding tree lock
  ...

5 years agoMerge branch 'hugepage-fallbacks' (hugepatch patches from David Rientjes)
Linus Torvalds [Sat, 28 Sep 2019 21:26:47 +0000 (14:26 -0700)]
Merge branch 'hugepage-fallbacks' (hugepatch patches from David Rientjes)

Merge hugepage allocation updates from David Rientjes:
 "We (mostly Linus, Andrea, and myself) have been discussing offlist how
  to implement a sane default allocation strategy for hugepages on NUMA
  platforms.

  With these reverts in place, the page allocator will happily allocate
  a remote hugepage immediately rather than try to make a local hugepage
  available. This incurs a substantial performance degradation when
  memory compaction would have otherwise made a local hugepage
  available.

  This series reverts those reverts and attempts to propose a more sane
  default allocation strategy specifically for hugepages. Andrea
  acknowledges this is likely to fix the swap storms that he originally
  reported that resulted in the patches that removed __GFP_THISNODE from
  hugepage allocations.

  The immediate goal is to return 5.3 to the behavior the kernel has
  implemented over the past several years so that remote hugepages are
  not immediately allocated when local hugepages could have been made
  available because the increased access latency is untenable.

  The next goal is to introduce a sane default allocation strategy for
  hugepages allocations in general regardless of the configuration of
  the system so that we prevent thrashing of local memory when
  compaction is unlikely to succeed and can prefer remote hugepages over
  remote native pages when the local node is low on memory."

Note on timing: this reverts the hugepage VM behavior changes that got
introduced fairly late in the 5.3 cycle, and that fixed a huge
performance regression for certain loads that had been around since
4.18.

Andrea had this note:

 "The regression of 4.18 was that it was taking hours to start a VM
  where 3.10 was only taking a few seconds, I reported all the details
  on lkml when it was finally tracked down in August 2018.

     https://lore.kernel.org/linux-mm/20180820032640.9896-2-aarcange@redhat.com/

  __GFP_THISNODE in MADV_HUGEPAGE made the above enterprise vfio
  workload degrade like in the "current upstream" above. And it still
  would have been that bad as above until 5.3-rc5"

where the bad behavior ends up happening as you fill up a local node,
and without that change, you'd get into the nasty swap storm behavior
due to compaction working overtime to make room for more memory on the
nodes.

As a result 5.3 got the two performance fix reverts in rc5.

However, David Rientjes then noted that those performance fixes in turn
regressed performance for other loads - although not quite to the same
degree.  He suggested reverting the reverts and instead replacing them
with two small changes to how hugepage allocations are done (patch
descriptions rephrased by me):

 - "avoid expensive reclaim when compaction may not succeed": just admit
   that the allocation failed when you're trying to allocate a huge-page
   and compaction wasn't successful.

 - "allow hugepage fallback to remote nodes when madvised": when that
   node-local huge-page allocation failed, retry without forcing the
   local node.

but by then I judged it too late to replace the fixes for a 5.3 release.
So 5.3 was released with behavior that harked back to the pre-4.18 logic.

But now we're in the merge window for 5.4, and we can see if this
alternate model fixes not just the horrendous swap storm behavior, but
also restores the performance regression that the late reverts caused.

Fingers crossed.

* emailed patches from David Rientjes <rientjes@google.com>:
  mm, page_alloc: allow hugepage fallback to remote nodes when madvised
  mm, page_alloc: avoid expensive reclaim when compaction may not succeed
  Revert "Revert "Revert "mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask""
  Revert "Revert "mm, thp: restore node-local hugepage allocations""