* [PATCH v6 00/19] dt-bindings: usb: Add generic USB HCD, xHCI, DWC USB3 DT schema
From: Serge Semin @ 2020-12-10 9:09 UTC (permalink / raw)
To: Mathias Nyman, Felipe Balbi, Krzysztof Kozlowski,
Greg Kroah-Hartman, Rob Herring, Chunfeng Yun
Cc: devicetree, Ahmad Zainie, linux-mips, linux-snps-arc,
Neil Armstrong, Martin Blumenstingl, Kevin Hilman,
Yoshihiro Shimoda, linux-usb, linux-kernel, Lad Prabhakar,
Serge Semin, Bjorn Andersson, Serge Semin, Manu Gautam,
Andy Gross, Pavel Parkhomenko, Alexey Malahov, linuxppc-dev,
linux-arm-kernel, Roger Quadros
We've performed some work on the Generic USB HCD, xHCI and DWC USB3 DT
bindings in the framework of the Baikal-T1 SoC support integration into
the kernel. This patchset is a result of that work.
First of all we moved the generic USB properties from the legacy text
bindings to the USB DT schema. The properties have been distributed
between three DT schemas dedicated for particular types of USB
controllers: Generic USB controller properties (like node-naming, phys,
maximum-speed, etc), Generic USB Host Controller bindings (companion and
TPL support), Dual-Role USB Controller (OTG revision, DR mode,
HNP/SRP/ADP protocols, etc). So the USB controllers DT bindings from now
can validate the nodes against a generic USB-controller schema suitable
for the controller functionality.
Secondly we converted generic USB xHCI text bindings file into the DT
schema. It had to be split up into two bindings: DT schema with generic
xHCI properties and a generic xHCI device DT schema. The later will be
used to validate the pure xHCI-based nodes, while the former can be
utilized by some vendor-specific versions of xHCI.
Thirdly, what was primarily intended to be done for Baikal-T1 SoC USB we
converted the legacy text-based DWC USB3 bindings to DT schema and altered
the result a bit so it would be more coherent with what actually
controller and its driver support. Since we've now got the DWC USB3 DT
schema, we made it used to validate the sub-nodes of the Qualcom, TI and
Amlogic DWC3 DT nodes.
Link: https://lore.kernel.org/linux-usb/20201010224121.12672-1-Sergey.Semin@baikalelectronics.ru/
Changelog v2:
- Thanks to Sergei Shtylyov for suggesting the commit logs grammar fixes:
[PATCH 04/18] dt-bindings: usb: usb-hcd: Add "ulpi/serial/hsic" PHY types
[PATCH 05/18] dt-bindings: usb: usb-hcd: Add "tpl-support" property
[PATCH 11/18] dt-bindings: usb: dwc3: Add interrupt-names property support
[PATCH 13/18] dt-bindings: usb: dwc3: Add Tx De-emphasis restrictions
[PATCH 17/18] dt-bindings: usb: keystone-dwc3: Validate DWC3 sub-node
- Set FL-adj of the amlogiv,meson-g12a-usb controller with value 0x20 instead
of completely removing the property.
- Drop the patch:
[PATCH 02/18] dt-bindings: usb: usb-hcd: Add "wireless" maximum-speed
property value
since "wireless" speed type is depracated due to lack of the device
supporting it.
- Drop quotes from around the compat string constant.
- Discard '|' from the property descriptions, since we don't need to preserve
the text formatting.
- Convert abbreviated form of the "maximum-speed" enum constraint into
the multi-lined version of the list.
- Fix the DW USB3 "clock-names" prop description to be refererring to the
enumerated clock-names instead of the ones from the Databook.
- Add explicit "additionalProperties: true" to the usb-xhci.yaml schema,
since additionalProperties/unevaluatedProperties are going to be mandary
for each binding.
- Use "oneOf: [dwc2.yaml#, snps,dwc3.yaml#]" instead of the bulky "if:
properties: compatibe: ..." statement.
- Discard the "^dwc3@[0-9a-f]+$" nodes from being acceptable as sub-nodes
of the Qualcomm DWC3 DT nodes.
- Add new patches:
[PATCH 18/20] arch: dts: Fix EHCI/OHCI DT nodes name
[PATCH 19/20] arch: dts: Fix xHCI DT nodes name
[PATCH 20/20] arch: dts: Fix DWC USB3 DT nodes name
Link: https://lore.kernel.org/linux-usb/20201014101402.18271-1-Sergey.Semin@baikalelectronics.ru
Changelog v3:
- Drop the patches:
[PATCH 18/20] arch: dts: Fix EHCI/OHCI DT nodes name
[PATCH 19/20] arch: dts: Fix xHCI DT nodes name
[PATCH 20/20] arch: dts: Fix DWC USB3 DT nodes name
as they are going to be submitted in the framework of a dedicated patchset.
- Drop the patch:
[PATCH 11/20] dt-bindings: usb: dwc3: Add synopsys,dwc3 compatible string
since it's going to be replaced with the driver/dts fixup and moved to a
dedicated patchset.
- Apply usb-xhci.yaml# schema for the DWC USB3 node only if the controller is
supposed to work as either host or otg.
Link: https://lore.kernel.org/linux-usb/20201020112101.19077-1-Sergey.Semin@baikalelectronics.ru
Changelog v4:
- Get the patch
[PATCH 11/17] dt-bindings: usb: dwc3: Add synopsys,dwc3 compatible string
back, since we can't discard the deprecated prefix from the driver.
- Discard the block scalar style modifier "|" from the interrupts property
description.
- Split the generic USB controller properties into three schemas: Generic USB
controllers, USB Host controllers and USB OTG controllers.
Link: https://lore.kernel.org/linux-usb/20201111090853.14112-1-Sergey.Semin@baikalelectronics.ru
Changelog v5:
- Add "snps,dis-split-quirk" property to the DWC USB3 DT schema.
- Add a text to the
[PATCH v4 10/18] dt-bindings: usb: Convert DWC USB3 bindings to DT schema
patch log about the small change in the clock-related properties bindings
with respect to the original binding file.
- Discard duplicated "additionalProperties" from the usb-hcd.yaml schema.
- Make sure dr_mode exist in DW USB3 node to apply the USB-gadget-only schema.
- Add a new patch:
[PATCH v5 19/19] dt-bindings: usb: intel,keembay-dwc3: Validate DWC3 sub-node
since the Intel Keem Bay DWC3 bindings has been just added.
Link: https://lore.kernel.org/linux-usb/20201205152427.29537-1-Sergey.Semin@baikalelectronics.ru
Changelog v6:
- Fix typo in the commit log:
[PATCH v5 19/19] dt-bindings: usb: intel,keembay-dwc3: Validate DWC3 sub-node
Qualcomm sub-node should be called as Intel eem Bay sub-node.
- Fix identations in the "usb-phy" property definition.
- Fix identations in the "maximum-speed" property definition.
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Manu Gautam <mgautam@codeaurora.org>
Cc: Roger Quadros <rogerq@ti.com>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-snps-arc@lists.infradead.org
Cc: linux-mips@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-usb@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Serge Semin (19):
dt-bindings: usb: usb-hcd: Detach generic USB controller properties
dt-bindings: usb: Convert generic USB properties to DT schemas
dt-bindings: usb: usb-drd: Add "otg-rev" property constraints
dt-bindings: usb: Add "ulpi/serial/hsic" PHY types
dt-bindings: usb: usb-hcd: Add "tpl-support" property
dt-bindings: usb: Add generic "usb-phy" property
dt-bindings: usb: Convert xHCI bindings to DT schema
dt-bindings: usb: xhci: Add Broadcom STB v2 compatible device
dt-bindings: usb: renesas-xhci: Refer to the usb-xhci.yaml file
dt-bindings: usb: Convert DWC USB3 bindings to DT schema
dt-bindings: usb: dwc3: Add interrupt-names property support
dt-bindings: usb: dwc3: Add synopsys,dwc3 compatible string
dt-bindings: usb: dwc3: Add Tx De-emphasis constraints
dt-bindings: usb: dwc3: Add Frame Length Adj constraints
dt-bindings: usb: meson-g12a-usb: Fix FL-adj property value
dt-bindings: usb: meson-g12a-usb: Validate DWC2/DWC3 sub-nodes
dt-bindings: usb: keystone-dwc3: Validate DWC3 sub-node
dt-bindings: usb: qcom,dwc3: Validate DWC3 sub-node
dt-bindings: usb: intel,keembay-dwc3: Validate DWC3 sub-node
.../usb/amlogic,meson-g12a-usb-ctrl.yaml | 6 +-
.../devicetree/bindings/usb/dwc3.txt | 128 -------
.../devicetree/bindings/usb/generic-xhci.yaml | 65 ++++
.../devicetree/bindings/usb/generic.txt | 57 ---
.../bindings/usb/intel,keembay-dwc3.yaml | 9 +-
.../devicetree/bindings/usb/qcom,dwc3.yaml | 9 +-
.../bindings/usb/renesas,usb-xhci.yaml | 4 +-
.../devicetree/bindings/usb/snps,dwc3.yaml | 332 ++++++++++++++++++
.../bindings/usb/ti,keystone-dwc3.yaml | 4 +-
.../devicetree/bindings/usb/usb-drd.yaml | 78 ++++
.../devicetree/bindings/usb/usb-hcd.yaml | 19 +-
.../devicetree/bindings/usb/usb-xhci.txt | 41 ---
.../devicetree/bindings/usb/usb-xhci.yaml | 42 +++
.../devicetree/bindings/usb/usb.yaml | 60 ++++
14 files changed, 600 insertions(+), 254 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/usb/dwc3.txt
create mode 100644 Documentation/devicetree/bindings/usb/generic-xhci.yaml
delete mode 100644 Documentation/devicetree/bindings/usb/generic.txt
create mode 100644 Documentation/devicetree/bindings/usb/snps,dwc3.yaml
create mode 100644 Documentation/devicetree/bindings/usb/usb-drd.yaml
delete mode 100644 Documentation/devicetree/bindings/usb/usb-xhci.txt
create mode 100644 Documentation/devicetree/bindings/usb/usb-xhci.yaml
create mode 100644 Documentation/devicetree/bindings/usb/usb.yaml
--
2.29.2
^ permalink raw reply
* [PATCH v6 02/19] dt-bindings: usb: Convert generic USB properties to DT schemas
From: Serge Semin @ 2020-12-10 9:09 UTC (permalink / raw)
To: Mathias Nyman, Felipe Balbi, Krzysztof Kozlowski,
Greg Kroah-Hartman, Rob Herring, Chunfeng Yun
Cc: Neil Armstrong, linux-kernel, Pavel Parkhomenko, Rob Herring,
Kevin Hilman, Ahmad Zainie, Andy Gross, linux-snps-arc,
devicetree, Martin Blumenstingl, Lad Prabhakar, Alexey Malahov,
Bjorn Andersson, linux-arm-kernel, Roger Quadros,
Yoshihiro Shimoda, linux-usb, linux-mips, Serge Semin,
Serge Semin, Manu Gautam, linuxppc-dev
In-Reply-To: <20201210090944.16283-1-Sergey.Semin@baikalelectronics.ru>
The generic USB properties have been described in the legacy bindings
text file: Documentation/devicetree/bindings/usb/generic.txt . Let's
convert its content into the generic USB, USB HCD and USB DRD DT
schemas. So the Generic USB schema will be applicable to all USB
controllers, USB HCD - for the generic USB Host controllers and the USB
DRD - for the USB Dual-role controllers.
Note the USB DRD schema is supposed to work in conjunction with
the USB peripheral/gadget and USB host controllers DT schemas.
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changelog v2:
- Discard '|' in all the new properties, since we don't need to preserve
the text formatting.
- Convert abbreviated form of the "maximum-speed" enum restriction into
the multi-lined version of the list.
- Drop quotes from around the string constants.
Changelog v4:
- Redistribute the properties between generic ones, USB HCD-specific and
USB DRD-specific.
- Discard the Rob'es Reviewed-by tag. Please review the patch one more time.
Changelog v6:
- Fix identations in the "maximum-speed" property definition.
---
.../devicetree/bindings/usb/generic.txt | 57 --------------
.../devicetree/bindings/usb/usb-drd.yaml | 77 +++++++++++++++++++
.../devicetree/bindings/usb/usb-hcd.yaml | 5 ++
.../devicetree/bindings/usb/usb.yaml | 22 ++++++
4 files changed, 104 insertions(+), 57 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/usb/generic.txt
create mode 100644 Documentation/devicetree/bindings/usb/usb-drd.yaml
diff --git a/Documentation/devicetree/bindings/usb/generic.txt b/Documentation/devicetree/bindings/usb/generic.txt
deleted file mode 100644
index ba472e7aefc9..000000000000
--- a/Documentation/devicetree/bindings/usb/generic.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-Generic USB Properties
-
-Optional properties:
- - maximum-speed: tells USB controllers we want to work up to a certain
- speed. Valid arguments are "super-speed-plus",
- "super-speed", "high-speed", "full-speed" and
- "low-speed". In case this isn't passed via DT, USB
- controllers should default to their maximum HW
- capability.
- - dr_mode: tells Dual-Role USB controllers that we want to work on a
- particular mode. Valid arguments are "host",
- "peripheral" and "otg". In case this attribute isn't
- passed via DT, USB DRD controllers should default to
- OTG.
- - phy_type: tells USB controllers that we want to configure the core to support
- a UTMI+ PHY with an 8- or 16-bit interface if UTMI+ is
- selected. Valid arguments are "utmi" and "utmi_wide".
- In case this isn't passed via DT, USB controllers should
- default to HW capability.
- - otg-rev: tells usb driver the release number of the OTG and EH supplement
- with which the device and its descriptors are compliant,
- in binary-coded decimal (i.e. 2.0 is 0200H). This
- property is used if any real OTG features(HNP/SRP/ADP)
- is enabled, if ADP is required, otg-rev should be
- 0x0200 or above.
- - companion: phandle of a companion
- - hnp-disable: tells OTG controllers we want to disable OTG HNP, normally HNP
- is the basic function of real OTG except you want it
- to be a srp-capable only B device.
- - srp-disable: tells OTG controllers we want to disable OTG SRP, SRP is
- optional for OTG device.
- - adp-disable: tells OTG controllers we want to disable OTG ADP, ADP is
- optional for OTG device.
- - usb-role-switch: boolean, indicates that the device is capable of assigning
- the USB data role (USB host or USB device) for a given
- USB connector, such as Type-C, Type-B(micro).
- see connector/usb-connector.yaml.
- - role-switch-default-mode: indicating if usb-role-switch is enabled, the
- device default operation mode of controller while usb
- role is USB_ROLE_NONE. Valid arguments are "host" and
- "peripheral". Defaults to "peripheral" if not
- specified.
-
-
-This is an attribute to a USB controller such as:
-
-dwc3@4a030000 {
- compatible = "synopsys,dwc3";
- reg = <0x4a030000 0xcfff>;
- interrupts = <0 92 4>
- usb-phy = <&usb2_phy>, <&usb3,phy>;
- maximum-speed = "super-speed";
- dr_mode = "otg";
- phy_type = "utmi_wide";
- otg-rev = <0x0200>;
- adp-disable;
-};
diff --git a/Documentation/devicetree/bindings/usb/usb-drd.yaml b/Documentation/devicetree/bindings/usb/usb-drd.yaml
new file mode 100644
index 000000000000..f3a64c46dcd0
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/usb-drd.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/usb-drd.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic USB OTG Controller Device Tree Bindings
+
+maintainers:
+ - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+properties:
+ otg-rev:
+ description:
+ Tells usb driver the release number of the OTG and EH supplement with
+ which the device and its descriptors are compliant, in binary-coded
+ decimal (i.e. 2.0 is 0200H). This property is used if any real OTG
+ features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be
+ 0x0200 or above.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ dr_mode:
+ description:
+ Tells Dual-Role USB controllers that we want to work on a particular
+ mode. In case this attribute isn't passed via DT, USB DRD controllers
+ should default to OTG.
+ $ref: /schemas/types.yaml#/definitions/string
+ enum: [host, peripheral, otg]
+
+ hnp-disable:
+ description:
+ Tells OTG controllers we want to disable OTG HNP. Normally HNP is the
+ basic function of real OTG except you want it to be a srp-capable only B
+ device.
+ type: boolean
+
+ srp-disable:
+ description:
+ Tells OTG controllers we want to disable OTG SRP. SRP is optional for OTG
+ device.
+ type: boolean
+
+ adp-disable:
+ description:
+ Tells OTG controllers we want to disable OTG ADP. ADP is optional for OTG
+ device.
+ type: boolean
+
+ usb-role-switch:
+ description:
+ Indicates that the device is capable of assigning the USB data role
+ (USB host or USB device) for a given USB connector, such as Type-C,
+ Type-B(micro). See connector/usb-connector.yaml.
+
+ role-switch-default-mode:
+ description:
+ Indicates if usb-role-switch is enabled, the device default operation
+ mode of controller while usb role is USB_ROLE_NONE.
+ $ref: /schemas/types.yaml#/definitions/string
+ enum: [host, peripheral]
+ default: peripheral
+
+additionalProperties: true
+
+examples:
+ - |
+ usb@4a030000 {
+ compatible = "snps,dwc3";
+ reg = <0x4a030000 0xcfff>;
+ interrupts = <0 92 4>;
+ usb-phy = <&usb2_phy>, <&usb3_phy>;
+ maximum-speed = "super-speed";
+ dr_mode = "otg";
+ phy_type = "utmi_wide";
+ otg-rev = <0x0200>;
+ adp-disable;
+ };
diff --git a/Documentation/devicetree/bindings/usb/usb-hcd.yaml b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
index 81f3ad1419d8..52cc84c400c0 100644
--- a/Documentation/devicetree/bindings/usb/usb-hcd.yaml
+++ b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
@@ -12,6 +12,11 @@ maintainers:
allOf:
- $ref: usb.yaml#
+properties:
+ companion:
+ description: Phandle of a companion device
+ $ref: /schemas/types.yaml#/definitions/phandle
+
additionalProperties: true
examples:
diff --git a/Documentation/devicetree/bindings/usb/usb.yaml b/Documentation/devicetree/bindings/usb/usb.yaml
index 941ad59fbac5..aab74c671ccc 100644
--- a/Documentation/devicetree/bindings/usb/usb.yaml
+++ b/Documentation/devicetree/bindings/usb/usb.yaml
@@ -24,6 +24,28 @@ properties:
description:
Name specifier for the USB PHY
+ phy_type:
+ description:
+ Tells USB controllers that we want to configure the core to support a
+ UTMI+ PHY with an 8- or 16-bit interface if UTMI+ is selected. In case
+ this isn't passed via DT, USB controllers should default to HW
+ capability.
+ $ref: /schemas/types.yaml#/definitions/string
+ enum: [utmi, utmi_wide]
+
+ maximum-speed:
+ description:
+ Tells USB controllers we want to work up to a certain speed. In case this
+ isn't passed via DT, USB controllers should default to their maximum HW
+ capability.
+ $ref: /schemas/types.yaml#/definitions/string
+ enum:
+ - low-speed
+ - full-speed
+ - high-speed
+ - super-speed
+ - super-speed-plus
+
additionalProperties: true
...
--
2.29.2
^ permalink raw reply related
* [PATCH v6 03/19] dt-bindings: usb: usb-drd: Add "otg-rev" property constraints
From: Serge Semin @ 2020-12-10 9:09 UTC (permalink / raw)
To: Mathias Nyman, Felipe Balbi, Krzysztof Kozlowski,
Greg Kroah-Hartman, Rob Herring, Chunfeng Yun
Cc: Neil Armstrong, linux-kernel, Pavel Parkhomenko, Rob Herring,
Kevin Hilman, Ahmad Zainie, Andy Gross, linux-snps-arc,
devicetree, Martin Blumenstingl, Lad Prabhakar, Alexey Malahov,
Bjorn Andersson, linux-arm-kernel, Roger Quadros,
Yoshihiro Shimoda, linux-usb, linux-mips, Serge Semin,
Serge Semin, Manu Gautam, linuxppc-dev
In-Reply-To: <20201210090944.16283-1-Sergey.Semin@baikalelectronics.ru>
There are only four OTG revisions are currently supported by the kernel:
0x0100, 0x0120, 0x0130, 0x0200. Any another value is considered as
invalid.
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changelog v4:
- Move the constraints to the usb-drd.yaml schema where the otg-rev
property is now defined.
---
Documentation/devicetree/bindings/usb/usb-drd.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/usb/usb-drd.yaml b/Documentation/devicetree/bindings/usb/usb-drd.yaml
index f3a64c46dcd0..f229fc8068d9 100644
--- a/Documentation/devicetree/bindings/usb/usb-drd.yaml
+++ b/Documentation/devicetree/bindings/usb/usb-drd.yaml
@@ -18,6 +18,7 @@ properties:
features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be
0x0200 or above.
$ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0x0100, 0x0120, 0x0130, 0x0200]
dr_mode:
description:
--
2.29.2
^ permalink raw reply related
* [PATCH v6 04/19] dt-bindings: usb: Add "ulpi/serial/hsic" PHY types
From: Serge Semin @ 2020-12-10 9:09 UTC (permalink / raw)
To: Mathias Nyman, Felipe Balbi, Krzysztof Kozlowski,
Greg Kroah-Hartman, Rob Herring, Chunfeng Yun
Cc: Neil Armstrong, linux-kernel, Pavel Parkhomenko, Rob Herring,
Kevin Hilman, Ahmad Zainie, Andy Gross, linux-snps-arc,
devicetree, Martin Blumenstingl, Lad Prabhakar, Alexey Malahov,
Bjorn Andersson, linux-arm-kernel, Roger Quadros,
Yoshihiro Shimoda, linux-usb, linux-mips, Serge Semin,
Serge Semin, Manu Gautam, linuxppc-dev
In-Reply-To: <20201210090944.16283-1-Sergey.Semin@baikalelectronics.ru>
Aside from the UTMI+ there are also ULPI, Serial and HSIC PHY types
that can be specified in the phy_type HCD property. Add them to the
enumeration of the acceptable values.
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changelog v2:
- Grammar fix: "s/PHY types can be/PHY types that can be"
- Drop quotes from around the string constants.
Changelog v4:
- Move the new PHY types definitions into the usb.yaml schema where the
phy_type property is now defined.
---
Documentation/devicetree/bindings/usb/usb.yaml | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/usb.yaml b/Documentation/devicetree/bindings/usb/usb.yaml
index aab74c671ccc..53144c4600c0 100644
--- a/Documentation/devicetree/bindings/usb/usb.yaml
+++ b/Documentation/devicetree/bindings/usb/usb.yaml
@@ -27,11 +27,13 @@ properties:
phy_type:
description:
Tells USB controllers that we want to configure the core to support a
- UTMI+ PHY with an 8- or 16-bit interface if UTMI+ is selected. In case
- this isn't passed via DT, USB controllers should default to HW
- capability.
+ UTMI+ PHY with an 8- or 16-bit interface if UTMI+ is selected, UTMI+ low
+ pin interface if ULPI is specified, Serial core/PHY interconnect if
+ serial is specified and High-Speed Inter-Chip feature if HSIC is
+ selected. In case this isn't passed via DT, USB controllers should
+ default to HW capability.
$ref: /schemas/types.yaml#/definitions/string
- enum: [utmi, utmi_wide]
+ enum: [utmi, utmi_wide, ulpi, serial, hsic]
maximum-speed:
description:
--
2.29.2
^ permalink raw reply related
* [PATCH v6 01/19] dt-bindings: usb: usb-hcd: Detach generic USB controller properties
From: Serge Semin @ 2020-12-10 9:09 UTC (permalink / raw)
To: Mathias Nyman, Felipe Balbi, Krzysztof Kozlowski,
Greg Kroah-Hartman, Rob Herring, Chunfeng Yun
Cc: Neil Armstrong, linux-kernel, Pavel Parkhomenko, Rob Herring,
Kevin Hilman, Ahmad Zainie, Andy Gross, linux-snps-arc,
devicetree, Martin Blumenstingl, Lad Prabhakar, Alexey Malahov,
Bjorn Andersson, linux-arm-kernel, Roger Quadros,
Yoshihiro Shimoda, linux-usb, linux-mips, Serge Semin,
Serge Semin, Manu Gautam, linuxppc-dev
In-Reply-To: <20201210090944.16283-1-Sergey.Semin@baikalelectronics.ru>
There can be three distinctive types of the USB controllers: USB hosts,
USB peripherals/gadgets and USB OTG, which can switch from one role to
another. In order to have that hierarchy handled in the DT binding files,
we need to collect common properties in a common DT schema and specific
properties in dedicated schemas. Seeing the usb-hcd.yaml DT schema is
dedicated for the USB host controllers only, let's move some common
properties from there into the usb.yaml schema. So the later would be
available to evaluate all currently supported types of the USB
controllers.
While at it add an explicit "additionalProperties: true" into the
usb-hcd.yaml as setting the additionalProperties/unevaluateProperties
properties is going to be get mandatory soon.
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changelog v4:
- This is a new patch created as a result of the comment left
by Chunfeng Yun in v3
Changelog v5:
- Discard duplicated additionalProperties property definition.
---
.../devicetree/bindings/usb/usb-hcd.yaml | 14 ++-------
.../devicetree/bindings/usb/usb.yaml | 29 +++++++++++++++++++
2 files changed, 31 insertions(+), 12 deletions(-)
create mode 100644 Documentation/devicetree/bindings/usb/usb.yaml
diff --git a/Documentation/devicetree/bindings/usb/usb-hcd.yaml b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
index b545b087b342..81f3ad1419d8 100644
--- a/Documentation/devicetree/bindings/usb/usb-hcd.yaml
+++ b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
@@ -9,18 +9,8 @@ title: Generic USB Host Controller Device Tree Bindings
maintainers:
- Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-properties:
- $nodename:
- pattern: "^usb(@.*)?"
-
- phys:
- $ref: /schemas/types.yaml#/definitions/phandle-array
- description:
- List of all the USB PHYs on this HCD
-
- phy-names:
- description:
- Name specifier for the USB PHY
+allOf:
+ - $ref: usb.yaml#
additionalProperties: true
diff --git a/Documentation/devicetree/bindings/usb/usb.yaml b/Documentation/devicetree/bindings/usb/usb.yaml
new file mode 100644
index 000000000000..941ad59fbac5
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/usb.yaml
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/usb.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic USB Controller Device Tree Bindings
+
+maintainers:
+ - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+select: false
+
+properties:
+ $nodename:
+ pattern: "^usb(@.*)?"
+
+ phys:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ description:
+ List of all the USB PHYs on this HCD
+
+ phy-names:
+ description:
+ Name specifier for the USB PHY
+
+additionalProperties: true
+
+...
--
2.29.2
^ permalink raw reply related
* Re: [PATCH 2/2] powerpc/64s: Trim offlined CPUs from mm_cpumasks
From: Geert Uytterhoeven @ 2020-12-10 9:06 UTC (permalink / raw)
To: Nicholas Piggin
Cc: Peter Zijlstra, Aneesh Kumar K.V, Linux Kernel Mailing List,
Anton Vorontsov, Thomas Gleixner, linuxppc-dev
In-Reply-To: <20201120025757.325930-3-npiggin@gmail.com>
Hi Nicholas,
On Fri, Nov 20, 2020 at 4:01 AM Nicholas Piggin <npiggin@gmail.com> wrote:
>
> When offlining a CPU, powerpc/64s does not flush TLBs, rather it just
> leaves the CPU set in mm_cpumasks, so it continues to receive TLBIEs
> to manage its TLBs.
>
> However the exit_flush_lazy_tlbs() function expects that after
> returning, all CPUs (except self) have flushed TLBs for that mm, in
> which case TLBIEL can be used for this flush. This breaks for offline
> CPUs because they don't get the IPI to flush their TLB. This can lead
> to stale translations.
>
> Fix this by clearing the CPU from mm_cpumasks, then flushing all TLBs
> before going offline.
>
> These offlined CPU bits stuck in the cpumask also prevents the cpumask
> from being trimmed back to local mode, which means continual broadcast
> IPIs or TLBIEs are needed for TLB flushing. This patch prevents that
> situation too.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Thanks for your patch!
> --- a/arch/powerpc/platforms/powermac/smp.c
> +++ b/arch/powerpc/platforms/powermac/smp.c
> @@ -911,6 +911,8 @@ static int smp_core99_cpu_disable(void)
>
> mpic_cpu_set_priority(0xf);
>
> + cleanup_cpu_mmu_context();
> +
I guess this change broke pmac32_defconfig+SMP in v5.10-rc7?
arch/powerpc/platforms/powermac/smp.c: error: implicit
declaration of function 'cleanup_cpu_mmu_context'
[-Werror=implicit-function-declaration]: => 914:2
http://kisskb.ellerman.id.au/kisskb/buildresult/14423174/
> return 0;
> }
>
> diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c
> index 54c4ba45c7ce..cbb67813cd5d 100644
> --- a/arch/powerpc/platforms/powernv/smp.c
> +++ b/arch/powerpc/platforms/powernv/smp.c
> @@ -143,6 +143,9 @@ static int pnv_smp_cpu_disable(void)
> xive_smp_disable_cpu();
> else
> xics_migrate_irqs_away();
> +
> + cleanup_cpu_mmu_context();
> +
> return 0;
> }
>
> diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
> index f2837e33bf5d..a02012f1b04a 100644
> --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
> +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
> @@ -90,6 +90,9 @@ static int pseries_cpu_disable(void)
> xive_smp_disable_cpu();
> else
> xics_migrate_irqs_away();
> +
> + cleanup_cpu_mmu_context();
> +
> return 0;
> }
>
> --
> 2.23.0
>
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* Re: [PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications
From: Rasmus Villemoes @ 2020-12-10 7:52 UTC (permalink / raw)
To: Jakub Kicinski
Cc: netdev, linux-kernel, Li Yang, Vladimir Oltean, linuxppc-dev,
David S. Miller, linux-arm-kernel, Qiang Zhao
In-Reply-To: <20201205132716.4c68e35d@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com>
On 05/12/2020 22.27, Jakub Kicinski wrote:
> On Sat, 5 Dec 2020 22:11:39 +0100 Rasmus Villemoes wrote:
>>> Looks like a nice clean up on a quick look.
>>>
>>> Please separate patches 1 and 11 (which are the two bug fixes I see)
>>
>> I think patch 2 is a bug fix as well, but I'd like someone from NXP to
>> comment.
>
> Sure, makes sense.
>
>>> rebase (retest) and post them against the net tree:
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
>>
>> So I thought this would go through Li Yang's tree.
Li, any preference? Will you take this series, or are you ok with the
three soc/fsl/qe patches going through the net tree along with the rest?
Rasmus
^ permalink raw reply
* Re: [PATCH v2 4/5] powerpc/smp: Add support detecting thread-groups sharing L2 cache
From: kernel test robot @ 2020-12-10 4:30 UTC (permalink / raw)
To: Gautham R. Shenoy, Srikar Dronamraju, Anton Blanchard,
Vaidyanathan Srinivasan, Michael Ellerman, Michael Neuling,
Nicholas Piggin, Nathan Lynch, Peter Zijlstra, Valentin Schneider
Cc: clang-built-linux, kbuild-all, linuxppc-dev
In-Reply-To: <1607533700-5546-5-git-send-email-ego@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 10071 bytes --]
Hi "Gautham,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on powerpc/next]
[also build test WARNING on v5.10-rc7 next-20201209]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Gautham-R-Shenoy/Extend-Parsing-ibm-thread-groups-for-Shared-L2-information/20201210-011226
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc64-randconfig-r035-20201209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1968804ac726e7674d5de22bc2204b45857da344)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/0day-ci/linux/commit/61bc65c11bf36fdc3827c6d6f4f555fba5306bd9
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Gautham-R-Shenoy/Extend-Parsing-ibm-thread-groups-for-Shared-L2-information/20201210-011226
git checkout 61bc65c11bf36fdc3827c6d6f4f555fba5306bd9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:233:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/smp.c:22:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:235:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/smp.c:22:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:2:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/smp.c:22:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:4:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/smp.c:22:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:6:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
arch/powerpc/kernel/smp.c:569:6: warning: no previous prototype for function 'tick_broadcast' [-Wmissing-prototypes]
void tick_broadcast(const struct cpumask *mask)
^
arch/powerpc/kernel/smp.c:569:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tick_broadcast(const struct cpumask *mask)
^
static
arch/powerpc/kernel/smp.c:579:6: warning: no previous prototype for function 'debugger_ipi_callback' [-Wmissing-prototypes]
void debugger_ipi_callback(struct pt_regs *regs)
^
arch/powerpc/kernel/smp.c:579:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void debugger_ipi_callback(struct pt_regs *regs)
^
static
>> arch/powerpc/kernel/smp.c:905:11: warning: variable 'mask' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
else if (cache_property == THREAD_GROUP_SHARE_L2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/kernel/smp.c:908:26: note: uninitialized use occurs here
zalloc_cpumask_var_node(mask, GFP_KERNEL, cpu_to_node(cpu));
^~~~
arch/powerpc/kernel/smp.c:905:7: note: remove the 'if' if its condition is always true
else if (cache_property == THREAD_GROUP_SHARE_L2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/kernel/smp.c:886:21: note: initialize the variable 'mask' to silence this warning
cpumask_var_t *mask;
^
= NULL
15 warnings generated.
vim +905 arch/powerpc/kernel/smp.c
881
882 {
883 int first_thread = cpu_first_thread_sibling(cpu);
884 int i, cpu_group_start = -1, err = 0;
885 struct thread_groups *tg = NULL;
886 cpumask_var_t *mask;
887
888 if (cache_property != THREAD_GROUP_SHARE_L1 &&
889 cache_property != THREAD_GROUP_SHARE_L2)
890 return -EINVAL;
891
892 tg = get_thread_groups(cpu, cache_property, &err);
893 if (!tg)
894 return err;
895
896 cpu_group_start = get_cpu_thread_group_start(cpu, tg);
897
898 if (unlikely(cpu_group_start == -1)) {
899 WARN_ON_ONCE(1);
900 return -ENODATA;
901 }
902
903 if (cache_property == THREAD_GROUP_SHARE_L1)
904 mask = &per_cpu(thread_group_l1_cache_map, cpu);
> 905 else if (cache_property == THREAD_GROUP_SHARE_L2)
906 mask = &per_cpu(thread_group_l2_cache_map, cpu);
907
908 zalloc_cpumask_var_node(mask, GFP_KERNEL, cpu_to_node(cpu));
909
910 for (i = first_thread; i < first_thread + threads_per_core; i++) {
911 int i_group_start = get_cpu_thread_group_start(i, tg);
912
913 if (unlikely(i_group_start == -1)) {
914 WARN_ON_ONCE(1);
915 return -ENODATA;
916 }
917
918 if (i_group_start == cpu_group_start)
919 cpumask_set_cpu(i, *mask);
920 }
921
922 return 0;
923 }
924
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27079 bytes --]
^ permalink raw reply
* Re: [PATCH v1 1/2] KVM: PPC: Book3S HV: Add support for H_RPT_INVALIDATE (nested case only)
From: Bharata B Rao @ 2020-12-10 4:24 UTC (permalink / raw)
To: Paul Mackerras; +Cc: aneesh.kumar, npiggin, kvm-ppc, linuxppc-dev, David Gibson
In-Reply-To: <20201209041542.GA29825@thinks.paulus.ozlabs.org>
On Wed, Dec 09, 2020 at 03:15:42PM +1100, Paul Mackerras wrote:
> On Mon, Oct 19, 2020 at 04:56:41PM +0530, Bharata B Rao wrote:
> > Implements H_RPT_INVALIDATE hcall and supports only nested case
> > currently.
> >
> > A KVM capability KVM_CAP_RPT_INVALIDATE is added to indicate the
> > support for this hcall.
>
> I have a couple of questions about this patch:
>
> 1. Is this something that is useful today, or is it something that may
> become useful in the future depending on future product plans? In
> other words, what advantage is there to forcing L2 guests to use this
> hcall instead of doing tlbie themselves?
H_RPT_INVALIDATE will replace the use of the existing H_TLB_INVALIDATE
for nested partition scoped invalidations. Implementations that want to
off-load invalidations to the host (when GTSE=0) would have to bother
about only one hcall (H_RPT_INVALIDATE)
>
> 2. Why does it need to be added to the default-enabled hcall list?
>
> There is a concern that if this is enabled by default we could get the
> situation where a guest using it gets migrated to a host that doesn't
> support it, which would be bad. That is the reason that all new
> things like this are disabled by default and only enabled by userspace
> (i.e. QEMU) in situations where we can enforce that it is available on
> all hosts to which the VM might be migrated.
As you suggested privately, I am thinking of falling back to
H_TLB_INVALIDATE in case where this new hcall fails due to not being
present. That should address the migration case that you mention
above. With that and leaving the new hcall enabled by default
is good okay?
Regards,
Bharata.
^ permalink raw reply
* Re: [PATCH v5 12/19] dt-bindings: usb: dwc3: Add synopsys, dwc3 compatible string
From: Rob Herring @ 2020-12-10 3:24 UTC (permalink / raw)
To: Serge Semin
Cc: Neil Armstrong, Bjorn Andersson, Pavel Parkhomenko, Kevin Hilman,
Krzysztof Kozlowski, Ahmad Zainie, Andy Gross, Chunfeng Yun,
linux-snps-arc, devicetree, Mathias Nyman, Martin Blumenstingl,
Lad Prabhakar, Alexey Malahov, Rob Herring, linux-arm-kernel,
Roger Quadros, Felipe Balbi, Greg Kroah-Hartman,
Yoshihiro Shimoda, linux-usb, linux-mips, Serge Semin,
linux-kernel, Manu Gautam, linuxppc-dev
In-Reply-To: <20201205152427.29537-13-Sergey.Semin@baikalelectronics.ru>
On Sat, 05 Dec 2020 18:24:19 +0300, Serge Semin wrote:
> The DWC USB3 driver and some DTS files like Exynos 5250, Keystone k2e, etc
> expects the DWC USB3 DT node to have the compatible string with the
> "synopsys" vendor prefix. Let's add the corresponding compatible string to
> the controller DT schema, but mark it as deprecated seeing the Synopsys,
> Inc. is presented with just "snps" vendor prefix.
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
>
> ---
>
> Changelog v2:
> - Drop quotes from around the compat string constant.
>
> Changelog v4:
> - Get the patch back, since we can't discard the deprecated prefix from the
> driver.
> ---
> Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply
* Re: [PATCH v5 01/19] dt-bindings: usb: usb-hcd: Detach generic USB controller properties
From: Rob Herring @ 2020-12-10 3:23 UTC (permalink / raw)
To: Serge Semin
Cc: Neil Armstrong, Bjorn Andersson, Pavel Parkhomenko, Kevin Hilman,
Krzysztof Kozlowski, Ahmad Zainie, Andy Gross, Chunfeng Yun,
linux-snps-arc, devicetree, Mathias Nyman, Martin Blumenstingl,
Lad Prabhakar, Alexey Malahov, Rob Herring, linux-arm-kernel,
Roger Quadros, Felipe Balbi, Greg Kroah-Hartman,
Yoshihiro Shimoda, linux-usb, linux-mips, Serge Semin,
linux-kernel, Manu Gautam, linuxppc-dev
In-Reply-To: <20201205152427.29537-2-Sergey.Semin@baikalelectronics.ru>
On Sat, 05 Dec 2020 18:24:08 +0300, Serge Semin wrote:
> There can be three distinctive types of the USB controllers: USB hosts,
> USB peripherals/gadgets and USB OTG, which can switch from one role to
> another. In order to have that hierarchy handled in the DT binding files,
> we need to collect common properties in a common DT schema and specific
> properties in dedicated schemas. Seeing the usb-hcd.yaml DT schema is
> dedicated for the USB host controllers only, let's move some common
> properties from there into the usb.yaml schema. So the later would be
> available to evaluate all currently supported types of the USB
> controllers.
>
> While at it add an explicit "additionalProperties: true" into the
> usb-hcd.yaml as setting the additionalProperties/unevaluateProperties
> properties is going to be get mandatory soon.
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
>
> ---
>
> Changelog v4:
> - This is a new patch created as a result of the comment left
> by Chunfeng Yun in v3
>
> Changelog v5:
> - Discard duplicated additionalProperties property definition.
> ---
> .../devicetree/bindings/usb/usb-hcd.yaml | 14 ++-------
> .../devicetree/bindings/usb/usb.yaml | 29 +++++++++++++++++++
> 2 files changed, 31 insertions(+), 12 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/usb/usb.yaml
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply
* Re: [PATCH 07/20] ethernet: ucc_geth: use qe_muram_free_addr()
From: Andrew Lunn @ 2020-12-10 1:36 UTC (permalink / raw)
To: Rasmus Villemoes
Cc: Vladimir Oltean, linux-kernel, Li Yang, netdev, Jakub Kicinski,
linuxppc-dev, David S. Miller, Zhao Qiang
In-Reply-To: <20201205191744.7847-8-rasmus.villemoes@prevas.dk>
On Sat, Dec 05, 2020 at 08:17:30PM +0100, Rasmus Villemoes wrote:
> This removes the explicit NULL checks, and allows us to stop storing
> at least some of the _offset values separately.
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
This seems to rely on one of the missing patches. Please don't split
patches like this, it makes review very difficult.
Andrew
^ permalink raw reply
* Re: [PATCH 01/20] ethernet: ucc_geth: set dev->max_mtu to 1518
From: Andrew Lunn @ 2020-12-10 1:25 UTC (permalink / raw)
To: Rasmus Villemoes
Cc: Florian Fainelli, Vladimir Oltean, linux-kernel,
Murali Krishna Policharla, netdev, Jakub Kicinski, Li Yang,
linuxppc-dev, David S. Miller, Zhao Qiang
In-Reply-To: <20201205191744.7847-2-rasmus.villemoes@prevas.dk>
On Sat, Dec 05, 2020 at 08:17:24PM +0100, Rasmus Villemoes wrote:
> All the buffers and registers are already set up appropriately for an
> MTU slightly above 1500, so we just need to expose this to the
> networking stack. AFAICT, there's no need to implement .ndo_change_mtu
> when the receive buffers are always set up to support the max_mtu.
>
> This fixes several warnings during boot on our mpc8309-board with an
> embedded mv88e6250 switch:
>
> mv88e6085 mdio@e0102120:10: nonfatal error -34 setting MTU 1500 on port 0
> ...
> mv88e6085 mdio@e0102120:10: nonfatal error -34 setting MTU 1500 on port 4
> ucc_geth e0102000.ethernet eth1: error -22 setting MTU to 1504 to include DSA overhead
>
> The last line explains what the DSA stack tries to do: achieving an MTU
> of 1500 on-the-wire requires that the master netdevice connected to
> the CPU port supports an MTU of 1500+the tagging overhead.
>
> Fixes: bfcb813203e6 ("net: dsa: configure the MTU for switch ports")
> Cc: Vladimir Oltean <vladimir.oltean@nxp.com>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH v2 4/5] powerpc/smp: Add support detecting thread-groups sharing L2 cache
From: kernel test robot @ 2020-12-10 0:57 UTC (permalink / raw)
To: Gautham R. Shenoy, Srikar Dronamraju, Anton Blanchard,
Vaidyanathan Srinivasan, Michael Ellerman, Michael Neuling,
Nicholas Piggin, Nathan Lynch, Peter Zijlstra, Valentin Schneider
Cc: clang-built-linux, kbuild-all, linuxppc-dev
In-Reply-To: <1607533700-5546-5-git-send-email-ego@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 10510 bytes --]
Hi "Gautham,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.10-rc7 next-20201209]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Gautham-R-Shenoy/Extend-Parsing-ibm-thread-groups-for-Shared-L2-information/20201210-011226
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc64-randconfig-r003-20201209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1968804ac726e7674d5de22bc2204b45857da344)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/0day-ci/linux/commit/61bc65c11bf36fdc3827c6d6f4f555fba5306bd9
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Gautham-R-Shenoy/Extend-Parsing-ibm-thread-groups-for-Shared-L2-information/20201210-011226
git checkout 61bc65c11bf36fdc3827c6d6f4f555fba5306bd9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:164:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/smp.c:22:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:166:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/smp.c:22:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:168:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/smp.c:22:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:170:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/smp.c:22:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:172:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
arch/powerpc/kernel/smp.c:569:6: error: no previous prototype for function 'tick_broadcast' [-Werror,-Wmissing-prototypes]
void tick_broadcast(const struct cpumask *mask)
^
arch/powerpc/kernel/smp.c:569:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tick_broadcast(const struct cpumask *mask)
^
static
arch/powerpc/kernel/smp.c:579:6: error: no previous prototype for function 'debugger_ipi_callback' [-Werror,-Wmissing-prototypes]
void debugger_ipi_callback(struct pt_regs *regs)
^
arch/powerpc/kernel/smp.c:579:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void debugger_ipi_callback(struct pt_regs *regs)
^
static
>> arch/powerpc/kernel/smp.c:905:11: error: variable 'mask' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
else if (cache_property == THREAD_GROUP_SHARE_L2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/kernel/smp.c:908:26: note: uninitialized use occurs here
zalloc_cpumask_var_node(mask, GFP_KERNEL, cpu_to_node(cpu));
^~~~
arch/powerpc/kernel/smp.c:905:7: note: remove the 'if' if its condition is always true
else if (cache_property == THREAD_GROUP_SHARE_L2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/kernel/smp.c:886:21: note: initialize the variable 'mask' to silence this warning
cpumask_var_t *mask;
^
= NULL
arch/powerpc/kernel/smp.c:1560:5: error: no previous prototype for function 'setup_profiling_timer' [-Werror,-Wmissing-prototypes]
int setup_profiling_timer(unsigned int multiplier)
^
arch/powerpc/kernel/smp.c:1560:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int setup_profiling_timer(unsigned int multiplier)
^
static
16 errors generated.
vim +905 arch/powerpc/kernel/smp.c
881
882 {
883 int first_thread = cpu_first_thread_sibling(cpu);
884 int i, cpu_group_start = -1, err = 0;
885 struct thread_groups *tg = NULL;
886 cpumask_var_t *mask;
887
888 if (cache_property != THREAD_GROUP_SHARE_L1 &&
889 cache_property != THREAD_GROUP_SHARE_L2)
890 return -EINVAL;
891
892 tg = get_thread_groups(cpu, cache_property, &err);
893 if (!tg)
894 return err;
895
896 cpu_group_start = get_cpu_thread_group_start(cpu, tg);
897
898 if (unlikely(cpu_group_start == -1)) {
899 WARN_ON_ONCE(1);
900 return -ENODATA;
901 }
902
903 if (cache_property == THREAD_GROUP_SHARE_L1)
904 mask = &per_cpu(thread_group_l1_cache_map, cpu);
> 905 else if (cache_property == THREAD_GROUP_SHARE_L2)
906 mask = &per_cpu(thread_group_l2_cache_map, cpu);
907
908 zalloc_cpumask_var_node(mask, GFP_KERNEL, cpu_to_node(cpu));
909
910 for (i = first_thread; i < first_thread + threads_per_core; i++) {
911 int i_group_start = get_cpu_thread_group_start(i, tg);
912
913 if (unlikely(i_group_start == -1)) {
914 WARN_ON_ONCE(1);
915 return -ENODATA;
916 }
917
918 if (i_group_start == cpu_group_start)
919 cpumask_set_cpu(i, *mask);
920 }
921
922 return 0;
923 }
924
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28213 bytes --]
^ permalink raw reply
* Re: [PATCH v2] powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed()
From: Michael Ellerman @ 2020-12-10 0:23 UTC (permalink / raw)
To: akpm, hch, Michael Ellerman, Christophe Leroy, viro,
Benjamin Herrenschmidt, Paul Mackerras
Cc: linux-mm, linuxppc-dev, linux-kernel
In-Reply-To: <18bcb456d32a3e74f5ae241fd6f1580c092d07f5.1607360230.git.christophe.leroy@csgroup.eu>
On Mon, 7 Dec 2020 16:58:01 +0000 (UTC), Christophe Leroy wrote:
> Since commit c33165253492 ("powerpc: use non-set_fs based maccess
> routines"), userspace access is not granted anymore when using
> copy_from_kernel_nofault()
>
> However, kthread_probe_data() uses copy_from_kernel_nofault()
> to check validity of pointers. When the pointer is NULL,
> it points to userspace, leading to a KUAP fault and triggering
> the following big hammer warning many times when you request
> a sysrq "show task":
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed()
https://git.kernel.org/powerpc/c/5eedf9fe8db23313df104576845cec5f481b9b60
cheers
^ permalink raw reply
* Re: [PATCH v1 2/6] powerpc/8xx: Always pin kernel text TLB
From: Michael Ellerman @ 2020-12-10 0:21 UTC (permalink / raw)
To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras
Cc: linuxppc-dev, linux-kernel
In-Reply-To: <a726961f-f440-b553-6c46-341a860dc90a@csgroup.eu>
Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 09/12/2020 à 11:43, Michael Ellerman a écrit :
>> Christophe Leroy <christophe.leroy@csgroup.eu> writes:
>>> There is no big poing in not pinning kernel text anymore, as now
>>> we can keep pinned TLB even with things like DEBUG_PAGEALLOC.
>>>
>>> Remove CONFIG_PIN_TLB_TEXT, making it always right.
>>>
>>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>>> ---
>>> arch/powerpc/Kconfig | 3 +--
>>> arch/powerpc/kernel/head_8xx.S | 20 +++-----------------
>>> arch/powerpc/mm/nohash/8xx.c | 3 +--
>>> arch/powerpc/platforms/8xx/Kconfig | 7 -------
>>> 4 files changed, 5 insertions(+), 28 deletions(-)
>>>
>> ...
>>> diff --git a/arch/powerpc/mm/nohash/8xx.c b/arch/powerpc/mm/nohash/8xx.c
>>> index 231ca95f9ffb..19a3eec1d8c5 100644
>>> --- a/arch/powerpc/mm/nohash/8xx.c
>>> +++ b/arch/powerpc/mm/nohash/8xx.c
>>> @@ -186,8 +186,7 @@ void mmu_mark_initmem_nx(void)
>>> mmu_mapin_ram_chunk(0, boundary, PAGE_KERNEL_TEXT, false);
>>> mmu_mapin_ram_chunk(boundary, einittext8, PAGE_KERNEL, false);
>>>
>>> - if (IS_ENABLED(CONFIG_PIN_TLB_TEXT))
>>> - mmu_pin_tlb(block_mapped_ram, false);
>>> + mmu_pin_tlb(block_mapped_ram, false);
>>> }
>>
>> This broke mpc885_ads_defconfig with:
>
> :surprise:
>
> How did I get it working ? Anyway, thanks for fixing it.
No worries. I figured you must have tested with some other series(s)
applied and/or with different configs, it happens :)
cheers
^ permalink raw reply
* Re: linux-next: build warning after merge of the akpm tree
From: Michael Ellerman @ 2020-12-10 0:19 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Kees Cook, Mathieu Malaterre, Linux Kernel Mailing List,
Nicholas Piggin, Linux Next Mailing List, Andrew Morton, PowerPC
In-Reply-To: <20201209180703.404eb4cb@canb.auug.org.au>
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Hi Michael,
>
> On Wed, 09 Dec 2020 15:44:35 +1100 Michael Ellerman <mpe@ellerman.id.au> wrote:
>>
>> They should really be in DATA_DATA or similar shouldn't they?
>
> No other architecture appears t need them ...
Any arch with orphan-handling=warn should see them I thought?
cheers
^ permalink raw reply
* Re: [PATCH v2 5/5] powerpc/cacheinfo: Print correct cache-sibling map/list for L2 cache
From: kernel test robot @ 2020-12-09 23:58 UTC (permalink / raw)
To: Gautham R. Shenoy, Srikar Dronamraju, Anton Blanchard,
Vaidyanathan Srinivasan, Michael Ellerman, Michael Neuling,
Nicholas Piggin, Nathan Lynch, Peter Zijlstra, Valentin Schneider
Cc: clang-built-linux, kbuild-all, linuxppc-dev
In-Reply-To: <1607533700-5546-6-git-send-email-ego@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 10557 bytes --]
Hi "Gautham,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on powerpc/next]
[also build test WARNING on v5.10-rc7 next-20201209]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Gautham-R-Shenoy/Extend-Parsing-ibm-thread-groups-for-Shared-L2-information/20201210-011226
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc64-randconfig-r031-20201209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1968804ac726e7674d5de22bc2204b45857da344)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/0day-ci/linux/commit/61bd9b188793d5009b5cdf310149e498264e6d57
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Gautham-R-Shenoy/Extend-Parsing-ibm-thread-groups-for-Shared-L2-information/20201210-011226
git checkout 61bd9b188793d5009b5cdf310149e498264e6d57
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:125:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/cacheinfo.c:21:
In file included from arch/powerpc/include/asm/prom.h:21:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:127:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/cacheinfo.c:21:
In file included from arch/powerpc/include/asm/prom.h:21:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:129:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/cacheinfo.c:21:
In file included from arch/powerpc/include/asm/prom.h:21:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:131:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/cacheinfo.c:21:
In file included from arch/powerpc/include/asm/prom.h:21:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:133:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/cacheinfo.c:21:
In file included from arch/powerpc/include/asm/prom.h:21:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:135:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
arch/powerpc/kernel/cacheinfo.c:679:28: error: use of undeclared identifier 'thread_group_shares_l2'; did you mean 'thread_group_leader'?
if (cache->level == 2 && thread_group_shares_l2)
^~~~~~~~~~~~~~~~~~~~~~
thread_group_leader
include/linux/sched/signal.h:652:20: note: 'thread_group_leader' declared here
static inline bool thread_group_leader(struct task_struct *p)
^
>> arch/powerpc/kernel/cacheinfo.c:679:28: warning: address of function 'thread_group_leader' will always evaluate to 'true' [-Wpointer-bool-conversion]
if (cache->level == 2 && thread_group_shares_l2)
~~ ^~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/kernel/cacheinfo.c:679:28: note: prefix with the address-of operator to silence this warning
if (cache->level == 2 && thread_group_shares_l2)
^
&
arch/powerpc/kernel/cacheinfo.c:680:11: error: implicit declaration of function 'cpu_l2_cache_mask' [-Werror,-Wimplicit-function-declaration]
return cpu_l2_cache_mask(cpu);
^
>> arch/powerpc/kernel/cacheinfo.c:680:11: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'const struct cpumask *' [-Wint-conversion]
return cpu_l2_cache_mask(cpu);
^~~~~~~~~~~~~~~~~~~~~~
14 warnings and 2 errors generated.
vim +679 arch/powerpc/kernel/cacheinfo.c
655
656 /*
657 * On big-core systems, each core has two groups of CPUs each of which
658 * has its own L1-cache. The thread-siblings which share l1-cache with
659 * @cpu can be obtained via cpu_smallcore_mask().
660 *
661 * On some big-core systems, the L2 cache is shared only between some
662 * groups of siblings. This is already parsed and encoded in
663 * cpu_l2_cache_mask().
664 *
665 * TODO: cache_lookup_or_instantiate() needs to be made aware of the
666 * "ibm,thread-groups" property so that cache->shared_cpu_map
667 * reflects the correct siblings on platforms that have this
668 * device-tree property. This helper function is only a stop-gap
669 * solution so that we report the correct siblings to the
670 * userspace via sysfs.
671 */
672 static const struct cpumask *get_shared_cpu_map(struct cache_index_dir *index, struct cache *cache)
673 {
674 #ifdef CONFIG_PPC64
675 if (has_big_cores) {
676 int cpu = index_dir_to_cpu(index);
677 if (cache->level == 1)
678 return cpu_smallcore_mask(cpu);
> 679 if (cache->level == 2 && thread_group_shares_l2)
> 680 return cpu_l2_cache_mask(cpu);
681 }
682 #endif
683
684 return &cache->shared_cpu_map;
685 }
686
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37110 bytes --]
^ permalink raw reply
* Re: [PATCH v6 0/5] PCI: Unify ECAM constants in native PCI Express drivers
From: Bjorn Helgaas @ 2020-12-09 22:05 UTC (permalink / raw)
To: Vladimir Oltean
Cc: kw, heiko, shawn.lin, Alexandru Marginean, paulus,
thomas.petazzoni, jonnyc, toan, will, robh, lorenzo.pieralisi,
michal.simek, linux-rockchip, bcm-kernel-feedback-list,
linux-arm-kernel, linux-pci, rjui, f.fainelli, linux-rpi-kernel,
Jonathan.Cameron, bhelgaas, jonathan.derrick, sbranden, wangzhou1,
Michael Walle, rrichter, linuxppc-dev, nsaenzjulienne
In-Reply-To: <20201209214359.gt4wisqh65oscd4i@skbuf>
On Wed, Dec 09, 2020 at 11:43:59PM +0200, Vladimir Oltean wrote:
> On Wed, Dec 09, 2020 at 03:34:49PM -0600, Bjorn Helgaas wrote:
> > On Wed, Dec 09, 2020 at 11:20:17PM +0200, Vladimir Oltean wrote:
> > > On Wed, Dec 09, 2020 at 02:59:13PM -0600, Bjorn Helgaas wrote:
> > > > Yep, that's the theory. Thanks for testing it!
> > >
> > > Testing what? I'm not following.
> >
> > You posted a patch that you said fixed the bug for you. The fix is
> > exactly the theory we've been discussing, so you have already verified
> > that the theory is correct.
> >
> > I'm sure Krzysztof will update his patch, and we'll get this tidied up
> > in -next again.
>
> If you were discussing this already, I missed it. I was copied to this
> thread out of the blue two emails ago. I also looked at the full thread
> on patchwork, I don't see anything being said about the culprit being
> the size of the config space mapping.
Oh, sorry, this was an IRC discussion on #linux-pci (OFTC):
10:51 AM <bjorn_> so the fault is on the first read for 00:00.1. forget my noise about extracting the device/func from the *virtual* address. the *physical* address is supposed to be aligned so you can do that, but not the virtual address
10:55 AM <bjorn_> kwilczynski: oh, i think i see it: pci_ecam_create() does "bsz = 1 << ops->bus_shift", but we removed .bus_shift for this case
10:55 AM <bjorn_> needs to default to 20 if it's not specified
10:56 AM <bjorn_> result is that we only map one page of the ECAM space, so we fault when we access the second page (which is where 00:00.1 starts)
Anyway, thanks very much again for fixing this and confirming the fix!
Bjorn
^ permalink raw reply
* Re: [PATCH v6 0/5] PCI: Unify ECAM constants in native PCI Express drivers
From: Vladimir Oltean @ 2020-12-09 21:43 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: kw, heiko, shawn.lin, Alexandru Marginean, paulus,
thomas.petazzoni, jonnyc, toan, will, robh, lorenzo.pieralisi,
michal.simek, linux-rockchip, bcm-kernel-feedback-list,
linux-arm-kernel, linux-pci, rjui, f.fainelli, linux-rpi-kernel,
Jonathan.Cameron, bhelgaas, jonathan.derrick, sbranden, wangzhou1,
Michael Walle, rrichter, linuxppc-dev, nsaenzjulienne
In-Reply-To: <20201209213449.GA2546712@bjorn-Precision-5520>
On Wed, Dec 09, 2020 at 03:34:49PM -0600, Bjorn Helgaas wrote:
> On Wed, Dec 09, 2020 at 11:20:17PM +0200, Vladimir Oltean wrote:
> > On Wed, Dec 09, 2020 at 02:59:13PM -0600, Bjorn Helgaas wrote:
> > > Yep, that's the theory. Thanks for testing it!
> >
> > Testing what? I'm not following.
>
> You posted a patch that you said fixed the bug for you. The fix is
> exactly the theory we've been discussing, so you have already verified
> that the theory is correct.
>
> I'm sure Krzysztof will update his patch, and we'll get this tidied up
> in -next again.
If you were discussing this already, I missed it. I was copied to this
thread out of the blue two emails ago. I also looked at the full thread
on patchwork, I don't see anything being said about the culprit being
the size of the config space mapping.
^ permalink raw reply
* Re: [PATCH v6 0/5] PCI: Unify ECAM constants in native PCI Express drivers
From: Bjorn Helgaas @ 2020-12-09 21:34 UTC (permalink / raw)
To: Vladimir Oltean
Cc: kw, heiko, shawn.lin, Alexandru Marginean, paulus,
thomas.petazzoni, jonnyc, toan, will, robh, lorenzo.pieralisi,
michal.simek, linux-rockchip, bcm-kernel-feedback-list,
linux-arm-kernel, linux-pci, rjui, f.fainelli, linux-rpi-kernel,
Jonathan.Cameron, bhelgaas, jonathan.derrick, sbranden, wangzhou1,
Michael Walle, rrichter, linuxppc-dev, nsaenzjulienne
In-Reply-To: <20201209212017.vx7dps3jasjcwg6j@skbuf>
On Wed, Dec 09, 2020 at 11:20:17PM +0200, Vladimir Oltean wrote:
> On Wed, Dec 09, 2020 at 02:59:13PM -0600, Bjorn Helgaas wrote:
> > Yep, that's the theory. Thanks for testing it!
>
> Testing what? I'm not following.
You posted a patch that you said fixed the bug for you. The fix is
exactly the theory we've been discussing, so you have already verified
that the theory is correct.
I'm sure Krzysztof will update his patch, and we'll get this tidied up
in -next again.
Bjorn
^ permalink raw reply
* Re: [RESEND v1 5/5] powerpc/platforms: Move files from 4xx to 44x
From: kernel test robot @ 2020-12-09 21:22 UTC (permalink / raw)
To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman
Cc: linuxppc-dev, kbuild-all, linux-kernel
In-Reply-To: <5e968da2216f4d2d8da521498dad6870fcaa4e11.1607519517.git.christophe.leroy@csgroup.eu>
[-- Attachment #1: Type: text/plain, Size: 7699 bytes --]
Hi Christophe,
I love your patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on next-20201209]
[cannot apply to robh/for-next linus/master mpe/next v5.10-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-40x-Remove-40x-platforms/20201209-211628
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc64-randconfig-m031-20201210 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/27cc6cb808696f690aaad90722175809739de5bc
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Christophe-Leroy/powerpc-40x-Remove-40x-platforms/20201209-211628
git checkout 27cc6cb808696f690aaad90722175809739de5bc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/platforms/44x/uic.c:275:13: error: no previous prototype for 'uic_init_tree' [-Werror=missing-prototypes]
275 | void __init uic_init_tree(void)
| ^~~~~~~~~~~~~
>> arch/powerpc/platforms/44x/uic.c:320:14: error: no previous prototype for 'uic_get_irq' [-Werror=missing-prototypes]
320 | unsigned int uic_get_irq(void)
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> arch/powerpc/platforms/44x/soc.c:193:6: error: no previous prototype for 'ppc4xx_reset_system' [-Werror=missing-prototypes]
193 | void ppc4xx_reset_system(char *cmd)
| ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> arch/powerpc/platforms/44x/msi.c:109:6: error: no previous prototype for 'ppc4xx_teardown_msi_irqs' [-Werror=missing-prototypes]
109 | void ppc4xx_teardown_msi_irqs(struct pci_dev *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/uic_init_tree +275 arch/powerpc/platforms/44x/uic.c
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 274
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 @275 void __init uic_init_tree(void)
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 276 {
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 277 struct device_node *np;
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 278 struct uic *uic;
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 279 const u32 *interrupts;
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 280
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 281 /* First locate and initialize the top-level UIC */
26cb7d8bbddc83 arch/powerpc/sysdev/uic.c Cyrill Gorcunov 2007-11-30 282 for_each_compatible_node(np, NULL, "ibm,uic") {
12d371a69e6df9 arch/powerpc/sysdev/uic.c Stephen Rothwell 2007-04-29 283 interrupts = of_get_property(np, "interrupts", NULL);
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 284 if (!interrupts)
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 285 break;
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 286 }
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 287
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 288 BUG_ON(!np); /* uic_init_tree() assumes there's a UIC as the
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 289 * top-level interrupt controller */
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 290 primary_uic = uic_init_one(np);
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 291 if (!primary_uic)
b7c670d673d118 arch/powerpc/platforms/4xx/uic.c Rob Herring 2017-08-21 292 panic("Unable to initialize primary UIC %pOF\n", np);
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 293
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 294 irq_set_default_host(primary_uic->irqhost);
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 295 of_node_put(np);
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 296
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 297 /* The scan again for cascaded UICs */
26cb7d8bbddc83 arch/powerpc/sysdev/uic.c Cyrill Gorcunov 2007-11-30 298 for_each_compatible_node(np, NULL, "ibm,uic") {
12d371a69e6df9 arch/powerpc/sysdev/uic.c Stephen Rothwell 2007-04-29 299 interrupts = of_get_property(np, "interrupts", NULL);
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 300 if (interrupts) {
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 301 /* Secondary UIC */
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 302 int cascade_virq;
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 303
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 304 uic = uic_init_one(np);
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 305 if (! uic)
b7c670d673d118 arch/powerpc/platforms/4xx/uic.c Rob Herring 2017-08-21 306 panic("Unable to initialize a secondary UIC %pOF\n",
b7c670d673d118 arch/powerpc/platforms/4xx/uic.c Rob Herring 2017-08-21 307 np);
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 308
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 309 cascade_virq = irq_of_parse_and_map(np, 0);
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 310
ec775d0e70eb6b arch/powerpc/sysdev/uic.c Thomas Gleixner 2011-03-25 311 irq_set_handler_data(cascade_virq, uic);
ec775d0e70eb6b arch/powerpc/sysdev/uic.c Thomas Gleixner 2011-03-25 312 irq_set_chained_handler(cascade_virq, uic_irq_cascade);
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 313
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 314 /* FIXME: setup critical cascade?? */
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 315 }
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 316 }
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 317 }
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 318
ef24ba7091517d arch/powerpc/sysdev/uic.c Michael Ellerman 2016-09-06 319 /* Return an interrupt vector or 0 if no interrupt is pending. */
e58923ed14370e arch/powerpc/sysdev/uic.c David Gibson 2007-04-18 @320 unsigned int uic_get_irq(void)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36177 bytes --]
^ permalink raw reply
* Re: [PATCH v6 0/5] PCI: Unify ECAM constants in native PCI Express drivers
From: Vladimir Oltean @ 2020-12-09 21:20 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: kw, heiko, shawn.lin, Alexandru Marginean, paulus,
thomas.petazzoni, jonnyc, toan, will, robh, lorenzo.pieralisi,
michal.simek, linux-rockchip, bcm-kernel-feedback-list,
linux-arm-kernel, linux-pci, rjui, f.fainelli, linux-rpi-kernel,
Jonathan.Cameron, bhelgaas, jonathan.derrick, sbranden, wangzhou1,
Michael Walle, rrichter, linuxppc-dev, nsaenzjulienne
In-Reply-To: <20201209205913.GA2543692@bjorn-Precision-5520>
On Wed, Dec 09, 2020 at 02:59:13PM -0600, Bjorn Helgaas wrote:
> Yep, that's the theory. Thanks for testing it!
Testing what? I'm not following.
^ permalink raw reply
* Re: [PATCH v6 0/5] PCI: Unify ECAM constants in native PCI Express drivers
From: Bjorn Helgaas @ 2020-12-09 20:59 UTC (permalink / raw)
To: Vladimir Oltean
Cc: kw, heiko, shawn.lin, Alexandru Marginean, paulus,
thomas.petazzoni, jonnyc, toan, will, robh, lorenzo.pieralisi,
michal.simek, linux-rockchip, bcm-kernel-feedback-list,
linux-arm-kernel, linux-pci, rjui, f.fainelli, linux-rpi-kernel,
Jonathan.Cameron, bhelgaas, jonathan.derrick, sbranden, wangzhou1,
Michael Walle, rrichter, linuxppc-dev, nsaenzjulienne
In-Reply-To: <20201209202904.2juzokqhleusgsts@skbuf>
On Wed, Dec 09, 2020 at 10:29:04PM +0200, Vladimir Oltean wrote:
> On Wed, Dec 09, 2020 at 04:40:52PM +0100, Michael Walle wrote:
> > Hopefully my mail client won't mess up the output that much.
>
> I can reproduce on my LS1028A as well. The following fixes the bug for
> me. I did not follow the discussion and see if it is helpful for others.
> I don't understand how the bug came to be. There might be more to it
> than what I'm seeing. If it's just what I'm seeing, then the patch was
> pretty broken to begin with.
>
> -----------------------------[cut here]-----------------------------
> From b184da4088c9d39d25fee2486941cdf77688a409 Mon Sep 17 00:00:00 2001
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> Date: Wed, 9 Dec 2020 22:17:32 +0200
> Subject: [PATCH] PCI: fix invalid window size for the ECAM config space
>
> The blamed commit forgot that pci_ecam_create() calculates the size of
> the window for the ECAM's config space based on the spacing between two
> buses. The drivers whose .bus_shift from struct pci_ecam_ops was changed
> to zero in this commit are now using this invalid value for bus_shift
> in calculating the window size.
>
> Before (broken):
> pci_ecam_create: remapping config space from addr 0x1f0000000, bus_range 0x1, bsz 0x1
> After (fixed/restored):
> pci_ecam_create: remapping config space from addr 0x1f0000000, bus_range 0x1, bsz 0x100000
>
> Fixes: f3c07cf6924e ("PCI: Unify ECAM constants in native PCI Express drivers")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
> drivers/pci/ecam.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/ecam.c b/drivers/pci/ecam.c
> index 59f91d434859..9fda0d49bc93 100644
> --- a/drivers/pci/ecam.c
> +++ b/drivers/pci/ecam.c
> @@ -28,11 +28,19 @@ struct pci_config_window *pci_ecam_create(struct device *dev,
> struct resource *cfgres, struct resource *busr,
> const struct pci_ecam_ops *ops)
> {
> + unsigned int bus_shift = ops->bus_shift;
> struct pci_config_window *cfg;
> unsigned int bus_range, bus_range_max, bsz;
> struct resource *conflict;
> int i, err;
>
> + /*
> + * struct pci_ecam_ops may omit specifying bus_shift
> + * if it is as per spec
> + */
> + if (!bus_shift)
> + bus_shift = PCIE_ECAM_BUS_SHIFT;
Yep, that's the theory. Thanks for testing it!
> if (busr->start > busr->end)
> return ERR_PTR(-EINVAL);
>
> @@ -46,14 +54,14 @@ struct pci_config_window *pci_ecam_create(struct device *dev,
> cfg->busr.end = busr->end;
> cfg->busr.flags = IORESOURCE_BUS;
> bus_range = resource_size(&cfg->busr);
> - bus_range_max = resource_size(cfgres) >> ops->bus_shift;
> + bus_range_max = resource_size(cfgres) >> bus_shift;
> if (bus_range > bus_range_max) {
> bus_range = bus_range_max;
> cfg->busr.end = busr->start + bus_range - 1;
> dev_warn(dev, "ECAM area %pR can only accommodate %pR (reduced from %pR desired)\n",
> cfgres, &cfg->busr, busr);
> }
> - bsz = 1 << ops->bus_shift;
> + bsz = 1 << bus_shift;
>
> cfg->res.start = cfgres->start;
> cfg->res.end = cfgres->end;
> -----------------------------[cut here]-----------------------------
^ permalink raw reply
* Re: [PATCH v6 0/5] PCI: Unify ECAM constants in native PCI Express drivers
From: Vladimir Oltean @ 2020-12-09 20:29 UTC (permalink / raw)
To: Michael Walle
Cc: kw, heiko, shawn.lin, Alexandru Marginean, paulus,
thomas.petazzoni, jonnyc, toan, will, robh, lorenzo.pieralisi,
michal.simek, linux-rockchip, bcm-kernel-feedback-list,
linux-arm-kernel, linux-pci, Bjorn Helgaas, rjui, f.fainelli,
linux-rpi-kernel, Jonathan.Cameron, bhelgaas, jonathan.derrick,
sbranden, wangzhou1, rrichter, linuxppc-dev, nsaenzjulienne
In-Reply-To: <c6d067abcdd5278f259bd7300730dc76@walle.cc>
On Wed, Dec 09, 2020 at 04:40:52PM +0100, Michael Walle wrote:
> Hopefully my mail client won't mess up the output that much.
I can reproduce on my LS1028A as well. The following fixes the bug for
me. I did not follow the discussion and see if it is helpful for others.
I don't understand how the bug came to be. There might be more to it
than what I'm seeing. If it's just what I'm seeing, then the patch was
pretty broken to begin with.
-----------------------------[cut here]-----------------------------
From b184da4088c9d39d25fee2486941cdf77688a409 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: Wed, 9 Dec 2020 22:17:32 +0200
Subject: [PATCH] PCI: fix invalid window size for the ECAM config space
The blamed commit forgot that pci_ecam_create() calculates the size of
the window for the ECAM's config space based on the spacing between two
buses. The drivers whose .bus_shift from struct pci_ecam_ops was changed
to zero in this commit are now using this invalid value for bus_shift
in calculating the window size.
Before (broken):
pci_ecam_create: remapping config space from addr 0x1f0000000, bus_range 0x1, bsz 0x1
After (fixed/restored):
pci_ecam_create: remapping config space from addr 0x1f0000000, bus_range 0x1, bsz 0x100000
Fixes: f3c07cf6924e ("PCI: Unify ECAM constants in native PCI Express drivers")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
drivers/pci/ecam.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/ecam.c b/drivers/pci/ecam.c
index 59f91d434859..9fda0d49bc93 100644
--- a/drivers/pci/ecam.c
+++ b/drivers/pci/ecam.c
@@ -28,11 +28,19 @@ struct pci_config_window *pci_ecam_create(struct device *dev,
struct resource *cfgres, struct resource *busr,
const struct pci_ecam_ops *ops)
{
+ unsigned int bus_shift = ops->bus_shift;
struct pci_config_window *cfg;
unsigned int bus_range, bus_range_max, bsz;
struct resource *conflict;
int i, err;
+ /*
+ * struct pci_ecam_ops may omit specifying bus_shift
+ * if it is as per spec
+ */
+ if (!bus_shift)
+ bus_shift = PCIE_ECAM_BUS_SHIFT;
+
if (busr->start > busr->end)
return ERR_PTR(-EINVAL);
@@ -46,14 +54,14 @@ struct pci_config_window *pci_ecam_create(struct device *dev,
cfg->busr.end = busr->end;
cfg->busr.flags = IORESOURCE_BUS;
bus_range = resource_size(&cfg->busr);
- bus_range_max = resource_size(cfgres) >> ops->bus_shift;
+ bus_range_max = resource_size(cfgres) >> bus_shift;
if (bus_range > bus_range_max) {
bus_range = bus_range_max;
cfg->busr.end = busr->start + bus_range - 1;
dev_warn(dev, "ECAM area %pR can only accommodate %pR (reduced from %pR desired)\n",
cfgres, &cfg->busr, busr);
}
- bsz = 1 << ops->bus_shift;
+ bsz = 1 << bus_shift;
cfg->res.start = cfgres->start;
cfg->res.end = cfgres->end;
-----------------------------[cut here]-----------------------------
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox