* [PATCH 2/9] ARM: dra72-evm: Fix modelling of regulators
From: Lokesh Vutla @ 2016-10-14 13:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161014130033.14172-1-lokeshvutla@ti.com>
Add proper description of input voltage regulators and update the voltage
rail map for all the regulators.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
arch/arm/boot/dts/dra72-evm-common.dtsi | 48 +++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/arch/arm/boot/dts/dra72-evm-common.dtsi b/arch/arm/boot/dts/dra72-evm-common.dtsi
index 3c02612..8537b6a 100644
--- a/arch/arm/boot/dts/dra72-evm-common.dtsi
+++ b/arch/arm/boot/dts/dra72-evm-common.dtsi
@@ -18,11 +18,47 @@
display0 = &hdmi0;
};
+ evm_12v0: fixedregulator-evm12v0 {
+ /* main supply */
+ compatible = "regulator-fixed";
+ regulator-name = "evm_12v0";
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ evm_5v0: fixedregulator-evm5v0 {
+ /* Output 1 of TPS43351QDAPRQ1 */
+ compatible = "regulator-fixed";
+ regulator-name = "evm_5v0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&evm_12v0>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vsys_3v3: fixedregulator-vsys3v3 {
+ /* Output 2 of TPS43351QDAPRQ1 */
+ compatible = "regulator-fixed";
+ regulator-name = "vsys_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&evm_12v0>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
evm_3v3_sw: fixedregulator-evm_3v3 {
+ /* TPS22965DSG */
compatible = "regulator-fixed";
regulator-name = "evm_3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
+ vin-supply = <&vsys_3v3>;
+ regulator-always-on;
+ regulator-boot-on;
};
aic_dvdd: fixedregulator-aic_dvdd {
@@ -39,6 +75,7 @@
regulator-name = "evm_3v3_sd";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
+ vin-supply = <&evm_3v3_sw>;
enable-active-high;
gpio = <&pcf_gpio_21 5 GPIO_ACTIVE_HIGH>;
};
@@ -190,6 +227,17 @@
tps65917_pmic {
compatible = "ti,tps65917-pmic";
+ smps1-in-supply = <&vsys_3v3>;
+ smps2-in-supply = <&vsys_3v3>;
+ smps3-in-supply = <&vsys_3v3>;
+ smps4-in-supply = <&vsys_3v3>;
+ smps5-in-supply = <&vsys_3v3>;
+ ldo1-in-supply = <&vsys_3v3>;
+ ldo2-in-supply = <&vsys_3v3>;
+ ldo3-in-supply = <&vsys_3v3>;
+ ldo4-in-supply = <&evm_5v0>;
+ ldo5-in-supply = <&vsys_3v3>;
+
tps65917_regulators: regulators {
smps1_reg: smps1 {
/* VDD_MPU */
--
2.9.3
^ permalink raw reply related
* [PATCH 3/9] ARM: dts: dra72: Add separate dtsi for tps65917
From: Lokesh Vutla @ 2016-10-14 13:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161014130033.14172-1-lokeshvutla@ti.com>
dra72-evm-common.dtsi consolidates dra72-evm.dts and dra72-evm-revc.dts
which also include tps65917 pmic support as both the evms uses the same
pmic. But, dra71-evm has mostly similar features with a different pmic.
In order to exploit dra72-evm-common.dtsi, creating a separate dtsi
for tps65915 support and including it in respective board files.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
arch/arm/boot/dts/dra72-evm-common.dtsi | 128 ----------------------------
arch/arm/boot/dts/dra72-evm-revc.dts | 21 +++--
arch/arm/boot/dts/dra72-evm-tps65917.dtsi | 134 ++++++++++++++++++++++++++++++
arch/arm/boot/dts/dra72-evm.dts | 14 ++--
4 files changed, 154 insertions(+), 143 deletions(-)
create mode 100644 arch/arm/boot/dts/dra72-evm-tps65917.dtsi
diff --git a/arch/arm/boot/dts/dra72-evm-common.dtsi b/arch/arm/boot/dts/dra72-evm-common.dtsi
index 8537b6a..9903ac7 100644
--- a/arch/arm/boot/dts/dra72-evm-common.dtsi
+++ b/arch/arm/boot/dts/dra72-evm-common.dtsi
@@ -214,123 +214,6 @@
status = "okay";
clock-frequency = <400000>;
- tps65917: tps65917 at 58 {
- compatible = "ti,tps65917";
- reg = <0x58>;
-
- interrupts = <GIC_SPI 2 IRQ_TYPE_NONE>; /* IRQ_SYS_1N */
- interrupt-controller;
- #interrupt-cells = <2>;
-
- ti,system-power-controller;
-
- tps65917_pmic {
- compatible = "ti,tps65917-pmic";
-
- smps1-in-supply = <&vsys_3v3>;
- smps2-in-supply = <&vsys_3v3>;
- smps3-in-supply = <&vsys_3v3>;
- smps4-in-supply = <&vsys_3v3>;
- smps5-in-supply = <&vsys_3v3>;
- ldo1-in-supply = <&vsys_3v3>;
- ldo2-in-supply = <&vsys_3v3>;
- ldo3-in-supply = <&vsys_3v3>;
- ldo4-in-supply = <&evm_5v0>;
- ldo5-in-supply = <&vsys_3v3>;
-
- tps65917_regulators: regulators {
- smps1_reg: smps1 {
- /* VDD_MPU */
- regulator-name = "smps1";
- regulator-min-microvolt = <850000>;
- regulator-max-microvolt = <1250000>;
- regulator-always-on;
- regulator-boot-on;
- };
-
- smps2_reg: smps2 {
- /* VDD_CORE */
- regulator-name = "smps2";
- regulator-min-microvolt = <850000>;
- regulator-max-microvolt = <1150000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- smps3_reg: smps3 {
- /* VDD_GPU IVA DSPEVE */
- regulator-name = "smps3";
- regulator-min-microvolt = <850000>;
- regulator-max-microvolt = <1250000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- smps4_reg: smps4 {
- /* VDDS1V8 */
- regulator-name = "smps4";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-always-on;
- regulator-boot-on;
- };
-
- smps5_reg: smps5 {
- /* VDD_DDR */
- regulator-name = "smps5";
- regulator-min-microvolt = <1350000>;
- regulator-max-microvolt = <1350000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- ldo1_reg: ldo1 {
- /* LDO1_OUT --> SDIO */
- regulator-name = "ldo1";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- regulator-boot-on;
- regulator-allow-bypass;
- };
-
- ldo3_reg: ldo3 {
- /* VDDA_1V8_PHY */
- regulator-name = "ldo3";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- ldo5_reg: ldo5 {
- /* VDDA_1V8_PLL */
- regulator-name = "ldo5";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-always-on;
- regulator-boot-on;
- };
-
- ldo4_reg: ldo4 {
- /* VDDA_3V_USB: VDDA_USBHS33 */
- regulator-name = "ldo4";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-boot-on;
- };
- };
- };
-
- tps65917_power_button {
- compatible = "ti,palmas-pwrbutton";
- interrupt-parent = <&tps65917>;
- interrupts = <1 IRQ_TYPE_NONE>;
- wakeup-source;
- ti,palmas-long-press-seconds = <6>;
- };
- };
-
pcf_gpio_21: gpio at 21 {
compatible = "ti,pcf8575", "nxp,pcf8575";
reg = <0x21>;
@@ -480,14 +363,6 @@
};
};
-&usb2_phy1 {
- phy-supply = <&ldo4_reg>;
-};
-
-&usb2_phy2 {
- phy-supply = <&ldo4_reg>;
-};
-
&omap_dwc3_1 {
extcon = <&extcon_usb1>;
};
@@ -509,7 +384,6 @@
pinctrl-names = "default";
pinctrl-0 = <&mmc1_pins_default>;
vmmc-supply = <&evm_3v3_sd>;
- vmmc_aux-supply = <&ldo1_reg>;
bus-width = <4>;
/*
* SDCD signal is not being used here - using the fact that GPIO mode
@@ -606,8 +480,6 @@
&dss {
status = "ok";
-
- vdda_video-supply = <&ldo5_reg>;
};
&hdmi {
diff --git a/arch/arm/boot/dts/dra72-evm-revc.dts b/arch/arm/boot/dts/dra72-evm-revc.dts
index 064b322..4ea2a0c 100644
--- a/arch/arm/boot/dts/dra72-evm-revc.dts
+++ b/arch/arm/boot/dts/dra72-evm-revc.dts
@@ -17,17 +17,22 @@
};
};
-&tps65917_regulators {
- ldo2_reg: ldo2 {
- /* LDO2_OUT --> VDDA_1V8_PHY2 */
- regulator-name = "ldo2";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-always-on;
- regulator-boot-on;
+&i2c1 {
+ tps65917: tps65917 at 58 {
+ reg = <0x58>;
+
+ interrupts = <GIC_SPI 2 IRQ_TYPE_NONE>; /* IRQ_SYS_1N */
};
};
+#include "dra72-evm-tps65917.dtsi"
+
+&ldo2_reg {
+ /* LDO2_OUT --> VDDA_1V8_PHY2 */
+ regulator-always-on;
+ regulator-boot-on;
+};
+
&hdmi {
vdda-supply = <&ldo2_reg>;
};
diff --git a/arch/arm/boot/dts/dra72-evm-tps65917.dtsi b/arch/arm/boot/dts/dra72-evm-tps65917.dtsi
new file mode 100644
index 0000000..ee6dac4
--- /dev/null
+++ b/arch/arm/boot/dts/dra72-evm-tps65917.dtsi
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/*
+ * Integrated Power Management Chip
+ * http://www.ti.com/lit/ds/symlink/tps65917-q1.pdf
+ */
+
+&tps65917 {
+ compatible = "ti,tps65917";
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ ti,system-power-controller;
+
+ tps65917_pmic {
+ compatible = "ti,tps65917-pmic";
+
+ smps1-in-supply = <&vsys_3v3>;
+ smps2-in-supply = <&vsys_3v3>;
+ smps3-in-supply = <&vsys_3v3>;
+ smps4-in-supply = <&vsys_3v3>;
+ smps5-in-supply = <&vsys_3v3>;
+ ldo1-in-supply = <&vsys_3v3>;
+ ldo2-in-supply = <&vsys_3v3>;
+ ldo3-in-supply = <&vsys_3v3>;
+ ldo4-in-supply = <&evm_5v0>;
+ ldo5-in-supply = <&vsys_3v3>;
+
+ tps65917_regulators: regulators {
+ smps1_reg: smps1 {
+ /* VDD_MPU */
+ regulator-name = "smps1";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1250000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ smps2_reg: smps2 {
+ /* VDD_CORE */
+ regulator-name = "smps2";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1150000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ smps3_reg: smps3 {
+ /* VDD_GPU IVA DSPEVE */
+ regulator-name = "smps3";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1250000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ smps4_reg: smps4 {
+ /* VDDS1V8 */
+ regulator-name = "smps4";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ smps5_reg: smps5 {
+ /* VDD_DDR */
+ regulator-name = "smps5";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo1_reg: ldo1 {
+ /* LDO1_OUT --> SDIO */
+ regulator-name = "ldo1";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-allow-bypass;
+ };
+
+ ldo2_reg: ldo2 {
+ regulator-name = "ldo2";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-allow-bypass;
+ };
+
+ ldo3_reg: ldo3 {
+ /* VDDA_1V8_PHY */
+ regulator-name = "ldo3";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo5_reg: ldo5 {
+ /* VDDA_1V8_PLL */
+ regulator-name = "ldo5";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ ldo4_reg: ldo4 {
+ /* VDDA_3V_USB: VDDA_USBHS33 */
+ regulator-name = "ldo4";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ };
+ };
+ };
+
+ tps65917_power_button {
+ compatible = "ti,palmas-pwrbutton";
+ interrupt-parent = <&tps65917>;
+ interrupts = <1 IRQ_TYPE_NONE>;
+ wakeup-source;
+ ti,palmas-long-press-seconds = <6>;
+ };
+};
diff --git a/arch/arm/boot/dts/dra72-evm.dts b/arch/arm/boot/dts/dra72-evm.dts
index e3a9b69..cd9c4ff 100644
--- a/arch/arm/boot/dts/dra72-evm.dts
+++ b/arch/arm/boot/dts/dra72-evm.dts
@@ -15,16 +15,16 @@
};
};
-&tps65917_regulators {
- ldo2_reg: ldo2 {
- /* LDO2_OUT --> TP1017 (UNUSED) */
- regulator-name = "ldo2";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3300000>;
- regulator-allow-bypass;
+&i2c1 {
+ tps65917: tps65917 at 58 {
+ reg = <0x58>;
+
+ interrupts = <GIC_SPI 2 IRQ_TYPE_NONE>; /* IRQ_SYS_1N */
};
};
+#include "dra72-evm-tps65917.dtsi"
+
&hdmi {
vdda-supply = <&ldo3_reg>;
};
--
2.9.3
^ permalink raw reply related
* [PATCH 4/9] regulator: lp873x: Add support for populating input supply
From: Lokesh Vutla @ 2016-10-14 13:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161014130033.14172-1-lokeshvutla@ti.com>
In order to have a proper topology of regulators for a platform, each
registering regulator needs to populate supply_name field for identifying
its supply's name. Add supply_name field for lp873x regulators.
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
Documentation/devicetree/bindings/mfd/lp873x.txt | 8 ++++++++
drivers/regulator/lp873x-regulator.c | 1 +
2 files changed, 9 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/lp873x.txt b/Documentation/devicetree/bindings/mfd/lp873x.txt
index 52766c2..936cba3 100644
--- a/Documentation/devicetree/bindings/mfd/lp873x.txt
+++ b/Documentation/devicetree/bindings/mfd/lp873x.txt
@@ -7,6 +7,9 @@ Required properties:
- #gpio-cells: Should be two. The first cell is the pin number and
the second cell is used to specify flags.
See ../gpio/gpio.txt for more information.
+ - xxx-supply: Phandle to parent supply node of each regulator
+ populated under regulators node. xxx should match
+ the supply_name populated in driver.
- regulators: List of child nodes that specify the regulator
initialization data.
Example:
@@ -17,6 +20,11 @@ pmic: lp8733 at 60 {
gpio-controller;
#gpio-cells = <2>;
+ buck0-in-supply = <&vsys_3v3>;
+ buck1-in-supply = <&vsys_3v3>;
+ ldo0-in-supply = <&vsys_3v3>;
+ ldo1-in-supply = <&vsys_3v3>;
+
regulators {
lp8733_buck0: buck0 {
regulator-name = "lp8733-buck0";
diff --git a/drivers/regulator/lp873x-regulator.c b/drivers/regulator/lp873x-regulator.c
index e504b91..70e3df6 100644
--- a/drivers/regulator/lp873x-regulator.c
+++ b/drivers/regulator/lp873x-regulator.c
@@ -24,6 +24,7 @@
[_id] = { \
.desc = { \
.name = _name, \
+ .supply_name = _of "-in", \
.id = _id, \
.of_match = of_match_ptr(_of), \
.regulators_node = of_match_ptr("regulators"),\
--
2.9.3
^ permalink raw reply related
* [PATCH 5/9] ARM: OMAP2+: board-generic: add support for DRA71x family
From: Lokesh Vutla @ 2016-10-14 13:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161014130033.14172-1-lokeshvutla@ti.com>
DRA71x processor family is a derivative of DRA722 ES2.0 targeted for
infotainment systems.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
Documentation/devicetree/bindings/arm/omap/omap.txt | 6 ++++++
arch/arm/mach-omap2/board-generic.c | 1 +
2 files changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index f53e2ee..454b1be 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -86,6 +86,9 @@ SoCs:
- DRA722
compatible = "ti,dra722", "ti,dra72", "ti,dra7"
+- DRA718
+ compatible = "ti,dra718", "ti,dra722", "ti,dra72", "ti,dra7"
+
- AM5728
compatible = "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7"
@@ -181,6 +184,9 @@ Boards:
- DRA722 EVM: Software Development Board for DRA722
compatible = "ti,dra72-evm", "ti,dra722", "ti,dra72", "ti,dra7"
+- DRA718 EVM: Software Development Board for DRA718
+ compatible = "ti,dra718-evm", "ti,dra718", "ti,dra722", "ti,dra72", "ti,dra7"
+
- DM3730 Logic PD Torpedo + Wireless: Commercial System on Module with WiFi and Bluetooth
compatible = "logicpd,dm3730-torpedo-devkit", "ti,omap3630", "ti,omap3"
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index bab814d..981b23a 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -341,6 +341,7 @@ static const char *const dra72x_boards_compat[] __initconst = {
"ti,am5718",
"ti,am5716",
"ti,dra722",
+ "ti,dra718",
NULL,
};
--
2.9.3
^ permalink raw reply related
* [PATCH 6/9] ARM: DRA7: hwmod: Do not register RTC on DRA71
From: Lokesh Vutla @ 2016-10-14 13:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161014130033.14172-1-lokeshvutla@ti.com>
From: Nishanth Menon <nm@ti.com>
RTC is not available on DRA71x, so accessing any of the RTC
register or clkctrl register will lead to a crash. So, do not
register RTC hwmod for DRA71x.
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 1ab7096..7f48577 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -3845,7 +3845,6 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
&dra7xx_l3_main_1__pciess2,
&dra7xx_l4_cfg__pciess2,
&dra7xx_l3_main_1__qspi,
- &dra7xx_l4_per3__rtcss,
&dra7xx_l4_cfg__sata,
&dra7xx_l4_cfg__smartreflex_core,
&dra7xx_l4_cfg__smartreflex_mpu,
@@ -3905,6 +3904,11 @@ static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
NULL,
};
+static struct omap_hwmod_ocp_if *dra74x_dra72x_hwmod_ocp_ifs[] __initdata = {
+ &dra7xx_l4_per3__rtcss,
+ NULL,
+};
+
int __init dra7xx_hwmod_init(void)
{
int ret;
@@ -3920,5 +3924,9 @@ int __init dra7xx_hwmod_init(void)
if (!ret && omap_type() == OMAP2_DEVICE_TYPE_GP)
ret = omap_hwmod_register_links(dra7xx_gp_hwmod_ocp_ifs);
+ /* now for the IPs *NOT* in dra71 */
+ if (!ret && !of_machine_is_compatible("ti,dra718"))
+ ret = omap_hwmod_register_links(dra74x_dra72x_hwmod_ocp_ifs);
+
return ret;
}
--
2.9.3
^ permalink raw reply related
* [PATCH 7/9] ARM: dts: Add support for dra718-evm
From: Lokesh Vutla @ 2016-10-14 13:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161014130033.14172-1-lokeshvutla@ti.com>
From: Nishanth Menon <nm@ti.com>
The DRA718-evm is a board based on TI's DRA718 processor targeting
BOM-optimized entry infotainment systems and is a reduced pin and
software compatible derivative of the DRA72 ES2.0 processor.
This platform features:
- 2GB of DDR3L
- Dual 1Gbps Ethernet
- HDMI,
- uSD
- 8GB eMMC
- CAN
- PCIe
- USB3.0
- Video Input Port
- LP873x PMIC
More information can be found here[1].
Adding support for this board while reusing the data available in
dra72-evm-common.dtsi.
[1] http://www.ti.com/product/dra718
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
arch/arm/boot/dts/Makefile | 3 +-
arch/arm/boot/dts/dra71-evm.dts | 230 ++++++++++++++++++++++++++++++++
arch/arm/boot/dts/dra72-evm-common.dtsi | 6 +-
3 files changed, 236 insertions(+), 3 deletions(-)
create mode 100644 arch/arm/boot/dts/dra71-evm.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index befcd26..b92d501 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -590,7 +590,8 @@ dtb-$(CONFIG_SOC_DRA7XX) += \
am572x-idk.dtb \
dra7-evm.dtb \
dra72-evm.dtb \
- dra72-evm-revc.dtb
+ dra72-evm-revc.dtb \
+ dra71-evm.dtb
dtb-$(CONFIG_ARCH_ORION5X) += \
orion5x-kuroboxpro.dtb \
orion5x-lacie-d2-network.dtb \
diff --git a/arch/arm/boot/dts/dra71-evm.dts b/arch/arm/boot/dts/dra71-evm.dts
new file mode 100644
index 0000000..2b9a5a8
--- /dev/null
+++ b/arch/arm/boot/dts/dra71-evm.dts
@@ -0,0 +1,230 @@
+/*
+ * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include "dra72-evm-common.dtsi"
+#include <dt-bindings/net/ti-dp83867.h>
+
+/ {
+ compatible = "ti,dra718-evm", "ti,dra718", "ti,dra722", "ti,dra72", "ti,dra7";
+ model = "TI DRA718 EVM";
+
+ memory {
+ device_type = "memory";
+ reg = <0x0 0x80000000 0x0 0x80000000>; /* 2GB */
+ };
+
+ vpo_sd_1v8_3v3: gpio-regulator-TPS74801 {
+ compatible = "regulator-gpio";
+
+ regulator-name = "vddshv8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-boot-on;
+ vin-supply = <&evm_5v0>;
+
+ gpios = <&gpio7 11 GPIO_ACTIVE_HIGH>;
+ states = <1800000 0x0
+ 3000000 0x1>;
+ };
+
+ poweroff: gpio-poweroff {
+ compatible = "gpio-poweroff";
+ gpios = <&gpio7 30 GPIO_ACTIVE_HIGH>;
+ input;
+ };
+};
+
+&i2c1 {
+ status = "okay";
+ clock-frequency = <400000>;
+
+ lp8733: lp8733 at 60 {
+ compatible = "ti,lp8733";
+ reg = <0x60>;
+
+ buck0-in-supply =<&vsys_3v3>;
+ buck1-in-supply =<&vsys_3v3>;
+ ldo0-in-supply =<&evm_5v0>;
+ ldo1-in-supply =<&evm_5v0>;
+
+ lp8733_regulators: regulators {
+ lp8733_buck0_reg: buck0 {
+ /* FB_B0 -> LP8733-BUCK1 - VPO_S1_AVS - VDD_CORE_AVS (core, mpu, gpu) */
+ regulator-name = "lp8733-buck0";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1250000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ lp8733_buck1_reg: buck1 {
+ /* FB_B1 -> LP8733-BUCK2 - VPO_S2_AVS - VDD_DSP_AVS (DSP/eve/iva) */
+ regulator-name = "lp8733-buck1";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1250000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ lp8733_ldo0_reg: ldo0 {
+ /* LDO0 -> LP8733-LDO1 - VPO_L1_3V3 - VDDSHV8 (optional) */
+ regulator-name = "lp8733-ldo0";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ lp8733_ldo1_reg: ldo1 {
+ /* LDO1 -> LP8733-LDO2 - VPO_L2_3V3 - VDDA_USB3V3 */
+ regulator-name = "lp8733-ldo1";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+ };
+ };
+
+ lp8732: lp8732 at 61 {
+ compatible = "ti,lp8732";
+ reg = <0x61>;
+
+ buck0-in-supply =<&vsys_3v3>;
+ buck1-in-supply =<&vsys_3v3>;
+ ldo0-in-supply =<&vsys_3v3>;
+ ldo1-in-supply =<&vsys_3v3>;
+
+ lp8732_regulators: regulators {
+ lp8732_buck0_reg: buck0 {
+ /* FB_B0 -> LP8732-BUCK1 - VPO_S3_1V8 - VDDS_1V8 */
+ regulator-name = "lp8732-buck0";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ lp8732_buck1_reg: buck1 {
+ /* FB_B1 -> LP8732-BUCK2 - VPO_S4_DDR - VDD_DDR_1V35 */
+ regulator-name = "lp8732-buck1";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ lp8732_ldo0_reg: ldo0 {
+ /* LDO0 -> LP8732-LDO1 - VPO_L3_1V8 - VDA_1V8_PLL */
+ regulator-name = "lp8732-ldo0";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ lp8732_ldo1_reg: ldo1 {
+ /* LDO1 -> LP8732-LDO2 - VPO_L4_1V8 - VDA_1V8_PHY */
+ regulator-name = "lp8732-ldo1";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+ };
+ };
+};
+
+&pcf_gpio_21 {
+ interrupt-parent = <&gpio7>;
+ interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
+};
+
+&pcf_hdmi {
+ p0 {
+ /*
+ * PM_OEn to High: Disable routing I2C3 to PM_I2C
+ * With this PM_SEL(p3) should not matter
+ */
+ gpio-hog;
+ gpios = <0 GPIO_ACTIVE_LOW>;
+ output-high;
+ line-name = "pm_oe_n";
+ };
+};
+
+&mmc1 {
+ vmmc_aux-supply = <&vpo_sd_1v8_3v3>;
+};
+
+&mac {
+ mode-gpios = <&pcf_gpio_21 4 GPIO_ACTIVE_LOW>,
+ <&pcf_hdmi 9 GPIO_ACTIVE_LOW>, /* P11 */
+ <&pcf_hdmi 10 GPIO_ACTIVE_LOW>; /* P12 */
+ dual_emac;
+};
+
+&cpsw_emac0 {
+ phy_id = <&davinci_mdio>, <2>;
+ phy-mode = "rgmii-id";
+ dual_emac_res_vlan = <1>;
+};
+
+&cpsw_emac1 {
+ phy_id = <&davinci_mdio>, <3>;
+ phy-mode = "rgmii-id";
+ dual_emac_res_vlan = <2>;
+};
+
+&davinci_mdio {
+ dp83867_0: ethernet-phy at 2 {
+ reg = <2>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
+ ti,impedance-control = <0x1f>;
+ };
+
+ dp83867_1: ethernet-phy at 3 {
+ reg = <3>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
+ ti,impedance-control = <0x1f>;
+ };
+};
+
+/* No Sata on this device */
+&sata_phy {
+ status = "disabled";
+};
+
+&sata {
+ status = "disabled";
+};
+
+/* No RTC on this device */
+&rtc {
+ status = "disabled";
+};
+
+&usb2_phy1 {
+ phy-supply = <&lp8733_ldo1_reg>;
+};
+
+&usb2_phy2 {
+ phy-supply = <&lp8733_ldo1_reg>;
+};
+
+&dss {
+ /* Supplied by VDA_1V8_PLL */
+ vdda_video-supply = <&lp8732_ldo0_reg>;
+};
+
+&hdmi {
+ /* Supplied by VDA_1V8_PHY */
+ vdda_video-supply = <&lp8732_ldo1_reg>;
+};
diff --git a/arch/arm/boot/dts/dra72-evm-common.dtsi b/arch/arm/boot/dts/dra72-evm-common.dtsi
index 9903ac7..e50fbee 100644
--- a/arch/arm/boot/dts/dra72-evm-common.dtsi
+++ b/arch/arm/boot/dts/dra72-evm-common.dtsi
@@ -29,7 +29,8 @@
};
evm_5v0: fixedregulator-evm5v0 {
- /* Output 1 of TPS43351QDAPRQ1 */
+ /* Output 1 of TPS43351QDAPRQ1 on dra72-evm */
+ /* Output 1 of LM5140QRWGTQ1 on dra71-evm */
compatible = "regulator-fixed";
regulator-name = "evm_5v0";
regulator-min-microvolt = <5000000>;
@@ -40,7 +41,8 @@
};
vsys_3v3: fixedregulator-vsys3v3 {
- /* Output 2 of TPS43351QDAPRQ1 */
+ /* Output 2 of TPS43351QDAPRQ1 on dra72-evm */
+ /* Output 2 of LM5140QRWGTQ1 on dra71-evm */
compatible = "regulator-fixed";
regulator-name = "vsys_3v3";
regulator-min-microvolt = <3300000>;
--
2.9.3
^ permalink raw reply related
* [PATCH 8/9] ARM: omap2plus_defconfig: Enable REGULATOR_GPIO
From: Lokesh Vutla @ 2016-10-14 13:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161014130033.14172-1-lokeshvutla@ti.com>
GPIO regulator is used on dra71-evm platform to control MMCSD IO
voltage
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
arch/arm/configs/omap2plus_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 53e1a88..5695cff 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -270,6 +270,7 @@ CONFIG_MFD_TPS65217=y
CONFIG_MFD_TPS65218=y
CONFIG_MFD_TPS65910=y
CONFIG_TWL6040_CORE=y
+CONFIG_REGULATOR_GPIO=y
CONFIG_REGULATOR_LP872X=y
CONFIG_REGULATOR_PALMAS=y
CONFIG_REGULATOR_PBIAS=y
--
2.9.3
^ permalink raw reply related
* [PATCH 9/9] ARM: omap2plus_defconfig: Enable LP873X support
From: Lokesh Vutla @ 2016-10-14 13:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161014130033.14172-1-lokeshvutla@ti.com>
LP873X family of PMICs are used in dra71x-evm, So enable the same.
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
arch/arm/configs/omap2plus_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 5695cff..e3fdf4d 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -267,11 +267,13 @@ CONFIG_TWL4030_WATCHDOG=m
CONFIG_MFD_TI_AM335X_TSCADC=m
CONFIG_MFD_PALMAS=y
CONFIG_MFD_TPS65217=y
+CONFIG_MFD_TI_LP873X=y
CONFIG_MFD_TPS65218=y
CONFIG_MFD_TPS65910=y
CONFIG_TWL6040_CORE=y
CONFIG_REGULATOR_GPIO=y
CONFIG_REGULATOR_LP872X=y
+CONFIG_REGULATOR_LP873X=y
CONFIG_REGULATOR_PALMAS=y
CONFIG_REGULATOR_PBIAS=y
CONFIG_REGULATOR_TI_ABB=y
--
2.9.3
^ permalink raw reply related
* [RESEND PATCH 1/3] ARM: ARTPEC-6: add select MFD_SYSCON to MACH_ARTPEC6
From: Niklas Cassel @ 2016-10-14 13:08 UTC (permalink / raw)
To: linux-arm-kernel
From: Niklas Cassel <niklas.cassel@axis.com>
Since the ARTPEC-6 machine port already uses syscon,
MACH_ARTPEC6 should select MFD_SYSCON.
Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
---
arch/arm/mach-artpec/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-artpec/Kconfig b/arch/arm/mach-artpec/Kconfig
index 6cbe5a2..85a962a 100644
--- a/arch/arm/mach-artpec/Kconfig
+++ b/arch/arm/mach-artpec/Kconfig
@@ -14,6 +14,7 @@ config MACH_ARTPEC6
select HAVE_ARM_ARCH_TIMER
select HAVE_ARM_SCU
select HAVE_ARM_TWD if SMP
+ select MFD_SYSCON
help
Support for Axis ARTPEC-6 ARM Cortex A9 Platform
--
2.1.4
^ permalink raw reply related
* [RESEND PATCH 2/3] ARM: ARTPEC-6: add pcie related options
From: Niklas Cassel @ 2016-10-14 13:08 UTC (permalink / raw)
To: linux-arm-kernel
From: Niklas Cassel <niklas.cassel@axis.com>
Now that the ARTPEC-6 PCIe controller is merged, add pcie related options
by default for MACH_ARTPEC6 so that the driver can be enabled in the build.
Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
---
arch/arm/mach-artpec/Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-artpec/Kconfig b/arch/arm/mach-artpec/Kconfig
index 85a962a..f158890 100644
--- a/arch/arm/mach-artpec/Kconfig
+++ b/arch/arm/mach-artpec/Kconfig
@@ -15,6 +15,8 @@ config MACH_ARTPEC6
select HAVE_ARM_SCU
select HAVE_ARM_TWD if SMP
select MFD_SYSCON
+ select MIGHT_HAVE_PCI
+ select PCI_DOMAINS if PCI
help
Support for Axis ARTPEC-6 ARM Cortex A9 Platform
--
2.1.4
^ permalink raw reply related
* [RESEND PATCH 3/3] ARM: dts: artpec: add pcie support
From: Niklas Cassel @ 2016-10-14 13:09 UTC (permalink / raw)
To: linux-arm-kernel
From: Niklas Cassel <niklas.cassel@axis.com>
Add PCIe support to the ARTPEC-6 SoC. This uses the existing
pcie-artpec6 driver.
So, all that is needed is device tree entries in the DTS.
Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
---
arch/arm/boot/dts/artpec6-devboard.dts | 4 ++++
arch/arm/boot/dts/artpec6.dtsi | 29 ++++++++++++++++++++++++++++-
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/artpec6-devboard.dts b/arch/arm/boot/dts/artpec6-devboard.dts
index f823ed3..9dfe845 100644
--- a/arch/arm/boot/dts/artpec6-devboard.dts
+++ b/arch/arm/boot/dts/artpec6-devboard.dts
@@ -46,6 +46,10 @@
status = "okay";
};
+&pcie {
+ status = "okay";
+};
+
ðernet {
status = "okay";
diff --git a/arch/arm/boot/dts/artpec6.dtsi b/arch/arm/boot/dts/artpec6.dtsi
index 3fac4c4..effaa4a 100644
--- a/arch/arm/boot/dts/artpec6.dtsi
+++ b/arch/arm/boot/dts/artpec6.dtsi
@@ -66,7 +66,7 @@
};
};
- syscon {
+ syscon: syscon at f8000000 {
compatible = "axis,artpec6-syscon", "syscon";
reg = <0xf8000000 0x48>;
};
@@ -145,6 +145,33 @@
interrupt-parent = <&intc>;
};
+ pcie: pcie at f8050000 {
+ compatible = "axis,artpec6-pcie", "snps,dw-pcie";
+ reg = <0xf8050000 0x2000
+ 0xf8040000 0x1000
+ 0xc0000000 0x2000>;
+ reg-names = "dbi", "phy", "config";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ /* downstream I/O */
+ ranges = <0x81000000 0 0 0xc0002000 0 0x00010000
+ /* non-prefetchable memory */
+ 0x82000000 0 0xc0012000 0xc0012000 0 0x1ffee000>;
+ num-lanes = <2>;
+ bus-range = <0x00 0xff>;
+ interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "msi";
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ interrupt-map = <0 0 0 1 &intc GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 2 &intc GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 3 &intc GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 4 &intc GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
+ axis,syscon-pcie = <&syscon>;
+ status = "disabled";
+ };
+
amba at 0 {
compatible = "simple-bus";
#address-cells = <0x1>;
--
2.1.4
^ permalink raw reply related
* aarch64 ACPI boot regressed by commit 7ba5f605f3a0 ("arm64/numa: remove the limitation that cpu0 must bind to node0")
From: Laszlo Ersek @ 2016-10-14 13:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161014080524.4hm2b4p373r7rhel@hawk.localdomain>
On 10/14/16 10:05, Andrew Jones wrote:
> On Fri, Oct 14, 2016 at 12:50:29AM +0200, Laszlo Ersek wrote:
>> (4) Analysis (well, a lame attempt at that, because I have zero
>> familiarity with this code). Let me quote the patch:
>>
>>> commit 7ba5f605f3a0d9495aad539eeb8346d726dfc183
>>> Author: Zhen Lei <thunder.leizhen@huawei.com>
>>> Date: Thu Sep 1 14:55:04 2016 +0800
>>>
>>> arm64/numa: remove the limitation that cpu0 must bind to node0
>>>
>>> 1. Remove the old binding code.
>>> 2. Read the nid of cpu0 from dts.
>>> 3. Fallback the nid of cpu0 to 0 when numa=off is set in bootargs.
>>>
>>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>>> Signed-off-by: Will Deacon <will.deacon@arm.com>
>>>
>>> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
>>> index c3c08368a685..8b048e6ec34a 100644
>>> --- a/arch/arm64/kernel/smp.c
>>> +++ b/arch/arm64/kernel/smp.c
>>> @@ -624,6 +624,7 @@ static void __init of_parse_and_init_cpus(void)
>>> }
>>>
>>> bootcpu_valid = true;
>>> + early_map_cpu_to_node(0, of_node_to_nid(dn));
>>>
>>> /*
>>> * cpu_logical_map has already been
>>> diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c
>>> index 0a15f010b64a..778a985c8a70 100644
>>> --- a/arch/arm64/mm/numa.c
>>> +++ b/arch/arm64/mm/numa.c
>>> @@ -116,16 +116,24 @@ static void __init setup_node_to_cpumask_map(void)
>>> */
>>> void numa_store_cpu_info(unsigned int cpu)
>>> {
>>> - map_cpu_to_node(cpu, numa_off ? 0 : cpu_to_node_map[cpu]);
>>> + map_cpu_to_node(cpu, cpu_to_node_map[cpu]);
>>> }
>>>
>>> void __init early_map_cpu_to_node(unsigned int cpu, int nid)
>>> {
>>> /* fallback to node 0 */
>>> - if (nid < 0 || nid >= MAX_NUMNODES)
>>> + if (nid < 0 || nid >= MAX_NUMNODES || numa_off)
>>> nid = 0;
>
> The ACPI equivalent code must be missing (at least) the above, because,
> even with DT, mach-virt won't have cpu to node mappings unless numa
> is configured on the command line. Can you try adding something like
>
> -m 512 -smp 4 \
> -numa node,mem=256M,cpus=0-1,nodeid=0 \
> -numa node,mem=256M,cpus=2-3,nodeid=1
>
> to your QEMU command line?
I added the following to my domain XML, under <cpu>:
<numa>
<cell id='0' cpus='0-1' memory='2097152' unit='KiB'/>
<cell id='1' cpus='2-3' memory='2097152' unit='KiB'/>
</numa>
(See <http://libvirt.org/formatdomain.html#elementsCPU>.)
With that, each NUMA node gets half of the VCPUs and half of the guest RAM.
(This is in a different guest now, one that has a bleeding edge Fedora kernel -- I didn't want to rebuild the upstream kernel yet again, just for this test. So, "4.9.0-0.rc0.git7.1.fc26.aarch64" is based on upstream v4.8-14109-g1573d2c, and it reproduces the problem too.)
> Then when you boot with ACPI you'll get a
> SRAT.
Yes, that's confirmed by the guest kernel log (see below).
> If that works, then we're just missing the "no SRAT, nid = 0"
> code (that should have been added with this patch)
It still crashes with the SRAT, with the following log:
> EFI stub: Booting Linux Kernel...
> ConvertPages: Incompatible memory types
> EFI stub: Using DTB from configuration table
> EFI stub: Exiting boot services and installing virtual address map...
> [ 0.000000] Booting Linux on physical CPU 0x0
> [ 0.000000] Linux version 4.9.0-0.rc0.git7.1.fc26.aarch64 (mockbuild at buildvm-aarch64-01.arm.fedoraproject.org) (gcc version 6.2.1 20160916 (Red Hat 6.2.1-2) (GCC) ) #1 SMP Wed Oct 12 17:44:54 UTC 2016
> [ 0.000000] Boot CPU: AArch64 Processor [500f0000]
> [ 0.000000] efi: Getting EFI parameters from FDT:
> [ 0.000000] efi: EFI v2.60 by EDK II
> [ 0.000000] efi: SMBIOS 3.0=0xbbdb0000 ACPI 2.0=0xb86d0000 MEMATTR=0xb936b018
> [ 0.000000] cma: Reserved 512 MiB at 0x00000000e0000000
> [ 0.000000] ACPI: Early table checksum verification disabled
> [ 0.000000] ACPI: RSDP 0x00000000B86D0000 000024 (v02 BOCHS )
> [ 0.000000] ACPI: XSDT 0x00000000B86C0000 000054 (v01 BOCHS BXPCFACP 00000001 01000013)
> [ 0.000000] ACPI: FACP 0x00000000B83E0000 00010C (v05 BOCHS BXPCFACP 00000001 BXPC 00000001)
> [ 0.000000] ACPI: DSDT 0x00000000B83F0000 0010E5 (v02 BOCHS BXPCDSDT 00000001 BXPC 00000001)
> [ 0.000000] ACPI: APIC 0x00000000B83D0000 00018C (v03 BOCHS BXPCAPIC 00000001 BXPC 00000001)
> [ 0.000000] ACPI: GTDT 0x00000000B83C0000 000060 (v02 BOCHS BXPCGTDT 00000001 BXPC 00000001)
> [ 0.000000] ACPI: MCFG 0x00000000B83B0000 00003C (v01 BOCHS BXPCMCFG 00000001 BXPC 00000001)
> [ 0.000000] ACPI: SPCR 0x00000000B83A0000 000050 (v02 BOCHS BXPCSPCR 00000001 BXPC 00000001)
> [ 0.000000] ACPI: SRAT 0x00000000B8390000 0000C8 (v03 BOCHS BXPCSRAT 00000001 BXPC 00000001)
> [ 0.000000] ACPI: SPCR: console: pl011,mmio,0x9000000,9600
> [ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '9600')
> [ 0.000000] bootconsole [pl11] enabled
> [ 0.000000] ACPI: NUMA: SRAT: PXM 0 -> MPIDR 0x0 -> Node 0
> [ 0.000000] ACPI: NUMA: SRAT: PXM 0 -> MPIDR 0x1 -> Node 0
> [ 0.000000] ACPI: NUMA: SRAT: PXM 1 -> MPIDR 0x2 -> Node 1
> [ 0.000000] ACPI: NUMA: SRAT: PXM 1 -> MPIDR 0x3 -> Node 1
> [ 0.000000] NUMA: Adding memblock [0x40000000 - 0xbfffffff] on node 0
> [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x40000000-0xbfffffff]
> [ 0.000000] NUMA: Adding memblock [0xc0000000 - 0x13fffffff] on node 1
> [ 0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0xc0000000-0x13fffffff]
> [ 0.000000] NUMA: Initmem setup node 0 [mem 0x40000000-0xbfffffff]
> [ 0.000000] NUMA: NODE_DATA [mem 0xbfff2580-0xbfffffff]
> [ 0.000000] NUMA: Initmem setup node 1 [mem 0xc0000000-0x13fffffff]
> [ 0.000000] NUMA: NODE_DATA [mem 0x13fff2580-0x13fffffff]
> [ 0.000000] Zone ranges:
> [ 0.000000] DMA [mem 0x0000000040000000-0x00000000ffffffff]
> [ 0.000000] Normal [mem 0x0000000100000000-0x000000013fffffff]
> [ 0.000000] Movable zone start for each node
> [ 0.000000] Early memory node ranges
> [ 0.000000] node 0: [mem 0x0000000040000000-0x00000000b838ffff]
> [ 0.000000] node 0: [mem 0x00000000b8390000-0x00000000b83fffff]
> [ 0.000000] node 0: [mem 0x00000000b8400000-0x00000000b841ffff]
> [ 0.000000] node 0: [mem 0x00000000b8420000-0x00000000b874ffff]
> [ 0.000000] node 0: [mem 0x00000000b8750000-0x00000000bbc1ffff]
> [ 0.000000] node 0: [mem 0x00000000bbc20000-0x00000000bbffffff]
> [ 0.000000] node 0: [mem 0x00000000bc000000-0x00000000bfffffff]
> [ 0.000000] node 1: [mem 0x00000000c0000000-0x000000013fffffff]
> [ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
> [ 0.000000] Initmem setup node 1 [mem 0x00000000c0000000-0x000000013fffffff]
> [ 0.000000] psci: probing for conduit method from ACPI.
> [ 0.000000] psci: PSCIv0.2 detected in firmware.
> [ 0.000000] psci: Using standard PSCI v0.2 function IDs
> [ 0.000000] psci: Trusted OS migration not required
> [ 0.000000] percpu: Embedded 3 pages/cpu @fffffe007fda0000 s117832 r8192 d70584 u196608
> [ 0.000000] Detected PIPT I-cache on CPU0
> [ 0.000000] Built 2 zonelists in Node order, mobility grouping on. Total pages: 65472
> [ 0.000000] Policy zone: Normal
> [ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-4.9.0-0.rc0.git7.1.fc26.aarch64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap LANG=en_US.UTF-8 earlycon acpi=force
> [ 0.000000] PID hash table entries: 4096 (order: -1, 32768 bytes)
> [ 0.000000] software IO TLB [mem 0xdbff0000-0xdfff0000] (64MB) mapped at [fffffe009bff0000-fffffe009ffeffff]
> [ 0.000000] Memory: 3542976K/4194304K available (9148K kernel code, 1612K rwdata, 3776K rodata, 1600K init, 15899K bss, 127040K reserved, 524288K cma-reserved)
> [ 0.000000] Virtual kernel memory layout:
> [ 0.000000] modules : 0xfffffc0000000000 - 0xfffffc0008000000 ( 128 MB)
> vmalloc : 0xfffffc0008000000 - 0xfffffdff5fff0000 ( 2045 GB)
> .text : 0xfffffc0008080000 - 0xfffffc0008970000 ( 9152 KB)
> .rodata : 0xfffffc0008970000 - 0xfffffc0008d30000 ( 3840 KB)
> .init : 0xfffffc0008d30000 - 0xfffffc0008ec0000 ( 1600 KB)
> .data : 0xfffffc0008ec0000 - 0xfffffc0009053200 ( 1613 KB)
> .bss : 0xfffffc0009053200 - 0xfffffc0009fda058 ( 15900 KB)
> fixed : 0xfffffdff7e7d0000 - 0xfffffdff7ec00000 ( 4288 KB)
> PCI I/O : 0xfffffdff7ee00000 - 0xfffffdff7fe00000 ( 16 MB)
> vmemmap : 0xfffffdff80000000 - 0xfffffe0000000000 ( 2 GB maximum)
> 0xfffffdff80000000 - 0xfffffdff80400000 ( 4 MB actual)
> memory : 0xfffffe0000000000 - 0xfffffe0100000000 ( 4096 MB)
> [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=2
> [ 0.000000] Running RCU self tests
> [ 0.000000] Hierarchical RCU implementation.
> [ 0.000000] RCU lockdep checking is enabled.
> [ 0.000000] Build-time adjustment of leaf fanout to 64.
> [ 0.000000] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
> [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=4
> [ 0.000000] kmemleak: Kernel memory leak detector disabled
> [ 0.000000] NR_IRQS:64 nr_irqs:64 0
> [ 0.000000] GICv2m: ACPI overriding V2M MSI_TYPER (base:80, num:64)
> [ 0.000000] GICv2m: range[mem 0x08020000-0x08020fff], SPI[80:143]
> [ 0.000000] GIC: PPI11 is secure or misconfigured
> [ 0.000000] arm_arch_timer: WARNING: Invalid trigger for IRQ3, assuming level low
> [ 0.000000] arm_arch_timer: WARNING: Please fix your firmware
> [ 0.000000] arm_arch_timer: Architected cp15 timer(s) running at 50.00MHz (virt).
> [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, max_idle_ns: 440795202655 ns
> [ 0.000003] sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 4398046511100ns
> [ 0.002198] Console: colour dummy device 80x25
> [ 0.003319] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
> [ 0.005236] ... MAX_LOCKDEP_SUBCLASSES: 8
> [ 0.006183] ... MAX_LOCK_DEPTH: 48
> [ 0.007273] ... MAX_LOCKDEP_KEYS: 8191
> [ 0.008287] ... CLASSHASH_SIZE: 4096
> [ 0.009296] ... MAX_LOCKDEP_ENTRIES: 32768
> [ 0.010327] ... MAX_LOCKDEP_CHAINS: 65536
> [ 0.011318] ... CHAINHASH_SIZE: 32768
> [ 0.012453] memory used by lock dependency info: 8159 kB
> [ 0.013736] per task-struct memory footprint: 1920 bytes
> [ 0.015742] mempolicy: Enabling automatic NUMA balancing. Configure with numa_balancing= or the kernel.numa_balancing sysctl
> [ 0.018710] Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=50000)
> [ 0.021221] pid_max: default: 32768 minimum: 301
> [ 0.022806] ACPI: Core revision 20160831
> [ 0.027885] ACPI: 1 ACPI AML tables successfully acquired and loaded
>
> [ 0.030252] Security Framework initialized
> [ 0.031355] Yama: becoming mindful.
> [ 0.032176] SELinux: Initializing.
> [ 0.033925] Dentry cache hash table entries: 524288 (order: 6, 4194304 bytes)
> [ 0.037039] Inode-cache hash table entries: 262144 (order: 5, 2097152 bytes)
> [ 0.039383] Mount-cache hash table entries: 8192 (order: 0, 65536 bytes)
> [ 0.041135] Mountpoint-cache hash table entries: 8192 (order: 0, 65536 bytes)
> [ 0.044725] ftrace: allocating 29596 entries in 8 pages
> [ 0.080467] ASID allocator initialised with 65536 entries
> [ 0.082070] ------------[ cut here ]------------
> [ 0.083227] WARNING: CPU: 0 PID: 1 at kernel/workqueue.c:5458 wq_numa_init+0x178/0x21c
> [ 0.085304] Modules linked in:
> [ 0.086102]
> [ 0.086499] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-0.rc0.git7.1.fc26.aarch64 #1
> [ 0.088611] Hardware name: linux,dummy-virt (DT)
> [ 0.089816] task: fffffe00700aac00 task.stack: fffffe00f8044000
> [ 0.091375] PC is at wq_numa_init+0x178/0x21c
> [ 0.092514] LR is at wq_numa_init+0x14c/0x21c
> [ 0.093654] pc : [<fffffc0008d3f434>] lr : [<fffffc0008d3f408>] pstate: 60000045
> [ 0.095589] sp : fffffe00f8047cb0
> [ 0.096457] x29: fffffe00f8047cb0 [ 0.097311] x28: 0000000000000000
> [ 0.098201]
> [ 0.098601] x27: 0000000000000000 [ 0.099450] x26: fffffc0008ef4a28
> [ 0.100342]
> [ 0.100730] x25: fffffc0008ef3000 [ 0.101576] x24: fffffc0008ef3574
> [ 0.102466]
> [ 0.102853] x23: 0000000000000000 [ 0.103700] x22: fffffe007937de00
> [ 0.104593]
> [ 0.104982] x21: fffffc0008e887f8 [ 0.105829] x20: fffffc0009091000
> [ 0.106723]
> [ 0.107111] x19: 0000000000000000 [ 0.107956] x18: 0000000050642c6a
> [ 0.108847]
> [ 0.109234] x17: 0000000000000000 [ 0.110078] x16: 0000000000000000
> [ 0.110968]
> [ 0.111363] x15: 00000000fcacdc89 [ 0.112199] x14: 0000000000000000
> [ 0.113087]
> [ 0.113481] x13: 0000000000000000 [ 0.114324] x12: 00000000fe2ce6e0
> [ 0.115204]
> [ 0.115597] x11: 0000000000000001 [ 0.116439] x10: 0000000000000048
> [ 0.117328]
> [ 0.117716] x9 : 0000000000000000 [ 0.118563] x8 : fffffe00f4010080
> [ 0.119453]
> [ 0.119833] x7 : 0000000000000000 [ 0.120678] x6 : 0000000000000000
> [ 0.121571]
> [ 0.121959] x5 : 000000000000000f [ 0.122804] x4 : 0000000000000000
> [ 0.123695]
> [ 0.124084] x3 : 0000000000000000 [ 0.124922] x2 : 0000000000000000
> [ 0.125815]
> [ 0.126204] x1 : 0000000000000004 [ 0.127055] x0 : 00000000ffffffff
> [ 0.127966]
> [ 0.128361]
> [ 0.128767] ---[ end trace 0000000000000000 ]---
> [ 0.129983] Call trace:
> [ 0.130629] Exception stack(0xfffffe00f8047ad0 to 0xfffffe00f8047c00)
> [ 0.132316] 7ac0: 0000000000000000 0000040000000000
> [ 0.134360] 7ae0: fffffe00f8047cb0 fffffc0008d3f434 0000000060000045 000000000000003d
> [ 0.136405] 7b00: fffffc0008ef4000 fffffe007937df00 0000000000000000 0000000000000000
> [ 0.138446] 7b20: fffffc0008bf4110 0000000000000189 0000000000000018 0000000000000028
> [ 0.140498] 7b40: fffffe00f8047b80 0000000000000000 fffffe0000000000 fffffc000848af30
> [ 0.142541] 7b60: fffffe00f8047ba0 fffffc0008134d24 fffffe00f8044000 0000000000000040
> [ 0.144558] 7b80: 00000000ffffffff 0000000000000004 0000000000000000 0000000000000000
> [ 0.146607] 7ba0: 0000000000000000 000000000000000f 0000000000000000 0000000000000000
> [ 0.148664] 7bc0: fffffe00f4010080 0000000000000000 0000000000000048 0000000000000001
> [ 0.150704] 7be0: 00000000fe2ce6e0 0000000000000000 0000000000000000 00000000fcacdc89
> [ 0.152752] [<fffffc0008d3f434>] wq_numa_init+0x178/0x21c
> [ 0.154160] [<fffffc0008d3f578>] init_workqueues+0xa0/0x4b8
> [ 0.155596] [<fffffc0008083594>] do_one_initcall+0x44/0x138
> [ 0.157059] [<fffffc0008d30d28>] kernel_init_freeable+0x178/0x2dc
> [ 0.158670] [<fffffc0008956f48>] kernel_init+0x18/0x110
> [ 0.160036] [<fffffc0008083330>] ret_from_fork+0x10/0x20
> [ 0.161440] workqueue: NUMA node mapping not available for cpu0, disabling NUMA support
> [ 0.165296] Remapping and enabling EFI services.
> [ 0.166586] Unable to handle kernel paging request at virtual address b91000006be8
> [ 0.168448] pgd = fffffc000a010000
> [ 0.169341] [b91000006be8] *pgd=0000000000000000[ 0.170505] , *pud=0000000000000000
> , *pmd=0000000000000000[ 0.171942]
> [ 0.172332] Internal error: Oops: 96000004 [#1] SMP
> [ 0.173600] Modules linked in:
> [ 0.174407] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.9.0-0.rc0.git7.1.fc26.aarch64 #1
> [ 0.176836] Hardware name: linux,dummy-virt (DT)
> [ 0.178038] task: fffffe00700aac00 task.stack: fffffe00f8044000
> [ 0.179579] PC is at __ll_sc_atomic_add+0x20/0x40
> [ 0.180800] LR is at __lock_acquire+0xe8/0x698
> [ 0.181961] pc : [<fffffc0008487390>] lr : [<fffffc0008138c08>] pstate: 800000c5
> [ 0.183895] sp : fffffe00f8047820
> [ 0.184755] x29: fffffe00f8047820 [ 0.185588] x28: fffffc0008ef3000
> [ 0.186479]
> [ 0.186868] x27: fffffc0008ef2358 [ 0.187713] x26: fffffc0009ce6000
> [ 0.188606]
> [ 0.188997] x25: 0000000000000001 [ 0.189857] x24: 0000000000000000
> [ 0.190731]
> [ 0.191115] x23: fffffe00700aac00 [ 0.191951] x22: 0000000000000000
> [ 0.192843]
> [ 0.193231] x21: fffffe007fd9a018 [ 0.194074] x20: 0000000000000000
> [ 0.194966]
> [ 0.195361] x19: fffffe007fd9a018 [ 0.196192] x18: 0000000000000010
> [ 0.197077]
> [ 0.197476] x17: 0000000057181979 [ 0.198325] x16: 0000000000000000
> [ 0.199209]
> [ 0.199604] x15: 0000000000000000 [ 0.200450] x14: 0000000000000000
> [ 0.201337]
> [ 0.201723] x13: 0000000000000001 [ 0.202555] x12: fffffe007fff2580
> [ 0.203432]
> [ 0.203819] x11: 0000000000000000 [ 0.204664] x10: 0000000000000011
> [ 0.205550]
> [ 0.205937] x9 : 0000000000000001 [ 0.206784] x8 : 0000b91000006be8
> [ 0.207678]
> [ 0.208062] x7 : fffffc0008299fcc [ 0.208899] x6 : 0000000000000000
> [ 0.209787]
> [ 0.210176] x5 : 0000000000000080 [ 0.211022] x4 : 0000b91000006a50
> [ 0.211913]
> [ 0.212307] x3 : 0000000000000000 [ 0.213147] x2 : 000022c80000f420
> [ 0.214034]
> [ 0.214421] x1 : 0000b91000006be8 [ 0.215251] x0 : fffffc0008138c08
> [ 0.216134]
> [ 0.216527]
> [ 0.216916] Process swapper/0 (pid: 1, stack limit = 0xfffffe00f8044020)
> [ 0.218671] Stack: (0xfffffe00f8047820 to 0xfffffe00f8048000)
> [ 0.220167] 7820: fffffe00f8047840 fffffc0008138c08 fffffe00f8044000 0000000000000001
> [ 0.222190] 7840: fffffe00f80478c0 fffffc0008139590 fffffe007fd9a018 0000000000000000
> [ 0.224238] 7860: 0000000000000000 0000000000000000 0000000000000001 0000000000000000
> [ 0.226284] 7880: fffffc0008299fcc 00000000000000c0 fffffc0008ef2358 fffffc0008ef3000
> [ 0.228318] 78a0: 0000000000000001 fffffc0009ce6000 0000000000000000 fffffe0000000000
> [ 0.230362] 78c0: fffffe00f8047930 fffffc000895f2c4 fffffe007fd9a000 fffffc0008299fcc
> [ 0.232394] 78e0: fffffe007fd9a000 fffffc000829ad94 fffffe007001db00 000000000000e8e8
> [ 0.234435] 7900: fffffe007001db00 fffffe007001dbf8 fffffe00fff3ef50 0000000000000000
> [ 0.236481] 7920: fffffe00f8047a20 fffffc0008ef2000 fffffe00f8047950 fffffc0008299fcc
> [ 0.238516] 7940: 00000000ffffffff fffffe007fd9a000 fffffe00f8047a70 fffffc000829aa68
> [ 0.240560] 7960: 00000000ffffffff 0000000000000001 00000000024000c0 fffffc000829ad94
> [ 0.242604] 7980: 0000000000210d00 000000000000e8e8 fffffe007001db00 fffffe007001dbf8
> [ 0.244634] 79a0: fffffe00fff3ef50 0000000000000000 fffffe00f8044000 0000000000000040
> [ 0.246678] 79c0: fffffc000828d620 fffffc0008ef3000 00000000026080c0 fffffe00fff3ef60
> [ 0.248733] 79e0: fffffe00f8047a00 fffffc00024000c0 fffffc0008f89000 0000000000000000
> [ 0.250783] 7a00: fffffe00f8047a20 fffffc000822f62c fffffc0009016b30 fffffe00f8047b40
> [ 0.252896] 7a20: fffffe00f8047ba0 fffffc000828d620 0000000000000000 fffffc0008ef0b28
> [ 0.255009] 7a40: fffffe007fff3c00 0000000000000000 0000000000000000 0000000000000000
> [ 0.257121] 7a60: fffffe00f8044000 0000000000000000 fffffe00f8047b90 fffffc000829ad94
> [ 0.259240] 7a80: 0000000000000040 fffffe007001db00 00000000024000c0 00000000ffffffff
> [ 0.261358] 7aa0: fffffc0008266284 fffffe00fff3ef50 0000000020000000 00e8000000000f07
> [ 0.263472] 7ac0: 0000000000000000 0000000000000400 fffffc0008f89000 0000000000000000
> [ 0.265662] 7ae0: fffffe00f8047b00 fffffc000822f62c fffffe00fff3ef60 0000000000000000
> [ 0.267787] 7b00: 0000001000000000 fffffc0008266284 fffffe00f8047b50 fffffc0008134d24
> [ 0.269905] 7b20: fffffe00f8044000 0000000000000040 fffffc0008bf4110 0000000000000189
> [ 0.272020] 7b40: fffffc0008ef4000 0000000000000000 fffffe00f8047b70 fffffc000810267c
> [ 0.274136] 7b60: fffffc0009016893 0000000000000000 fffffe00f8047ba0 fffffc0008102784
> [ 0.276250] 7b80: fffffe00f8047b90 fffffc000829ad7c fffffe00f8047bd0 fffffc000829b13c
> [ 0.278371] 7ba0: fffffe007001db00 00000000024000c0 fffffc0008266284 fffffe007001db00
> [ 0.280484] 7bc0: fffffc0008ef4000 0000000000000000 fffffe00f8047c30 fffffc0008266284
> [ 0.282600] 7be0: fffffdff801b0200 fffffe006c080000 000000006c080000 0000000020000000
> [ 0.284715] 7c00: fffffe00f0010008 0000000004000000 0000000020000000 00e8000000000f07
> [ 0.286831] 7c20: 0000000000000000 0000000000000000 fffffe00f8047c50 fffffc0008098e24
> [ 0.288948] 7c40: fffffdff801b0200 0000000000000001 fffffe00f8047c80 fffffc00080991d0
> [ 0.291062] 7c60: 0000000024000000 0000000000000001 0000000024000000 fffffc0008ef0b28
> [ 0.293178] 7c80: fffffe00f8047d00 fffffc0008d361cc fffffe0078416018 00e8000000000707
> [ 0.295296] 7ca0: fffffc0008ff6410 fffffc0008ef7000 0000000000000000 fffffc0008ff6410
> [ 0.297408] 7cc0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> [ 0.299523] 7ce0: 0000000000000000 00e8000000000f05 fffffc0008098dd0 0000000023ffffff
> [ 0.301636] 7d00: fffffe00f8047d10 fffffc0008d35020 fffffe00f8047d40 fffffc0008d88284
> [ 0.303748] 7d20: fffffe0078416018 fffffc0008ff6000 fffffc0008c87348 fffffc0008d8821c
> [ 0.305863] 7d40: fffffe00f8047d90 fffffc0008083594 fffffc0008d88154 fffffe00f8044000
> [ 0.307987] 7d60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> [ 0.310099] 7d80: 0000000000000000 0000000004000000 fffffe00f8047e00 fffffc0008d30d28
> [ 0.312217] 7da0: fffffc0008e622d8 fffffc0008e622e0 0000000000000040 0000000000000000
> [ 0.314333] 7dc0: fffffe00f8047e00 fffffc0008d30d18 fffffc0008e62220 fffffc0008e622e0
> [ 0.316445] 7de0: 0000000000000040 0000000000000000 0000000000000000 fffffc0008e622e0
> [ 0.318572] 7e00: fffffe00f8047ea0 fffffc0008956f48 fffffc0008956f30 0000000000000000
> [ 0.320692] 7e20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> [ 0.322805] 7e40: 0000000000000000 0000000000000000 0000000000000000 0000000000000001
> [ 0.324914] 7e60: 0000000000000003 0000000000000000 0000000000000000 0000000000000000
> [ 0.327027] 7e80: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> [ 0.329139] 7ea0: 0000000000000000 fffffc0008083330 fffffc0008956f30 0000000000000000
> [ 0.331248] 7ec0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> [ 0.333361] 7ee0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> [ 0.335470] 7f00: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> [ 0.337585] 7f20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> [ 0.339695] 7f40: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> [ 0.341810] 7f60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> [ 0.343923] 7f80: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> [ 0.346037] 7fa0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> [ 0.348154] 7fc0: 0000000000000000 0000000000000005 0000000000000000 0000000000000000
> [ 0.350272] 7fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> [ 0.352392] Call trace:
> [ 0.353049] Exception stack(0xfffffe00f8047650 to 0xfffffe00f8047780)
> [ 0.354792] 7640: fffffe007fd9a018 0000040000000000
> [ 0.356910] 7660: fffffe00f8047820 fffffc0008487390 fffffe00f80476e0 fffffc0008131290
> [ 0.359025] 7680: fffffc000901690b fffffc0008f1e000 0000000000000001 fffffe00700aac00
> [ 0.361140] 76a0: fffffc000901690b fffffc0008f27a28 fffffe00fff3b700 fffffc0008e8b700
> [ 0.363255] 76c0: fffffe00fff3b700 fffffc0008ef1000 fffffe00f80476e0 00000000000000c0
> [ 0.365373] 76e0: fffffe00f8047720 fffffc000811a374 fffffc0008138c08 0000b91000006be8
> [ 0.367483] 7700: 000022c80000f420 0000000000000000 0000b91000006a50 0000000000000080
> [ 0.369593] 7720: 0000000000000000 fffffc0008299fcc 0000b91000006be8 0000000000000001
> [ 0.371702] 7740: 0000000000000011 0000000000000000 fffffe007fff2580 0000000000000001
> [ 0.373817] 7760: 0000000000000000 0000000000000000 0000000000000000 0000000057181979
> [ 0.375935] [<fffffc0008487390>] __ll_sc_atomic_add+0x20/0x40
> [ 0.377489] [<fffffc0008138c08>] __lock_acquire+0xe8/0x698
> [ 0.378960] [<fffffc0008139590>] lock_acquire+0xd8/0x2c0
> [ 0.380394] [<fffffc000895f2c4>] _raw_spin_lock+0x4c/0x60
> [ 0.381843] [<fffffc0008299fcc>] get_partial_node.isra.23+0x4c/0x440
> [ 0.383559] [<fffffc000829aa68>] ___slab_alloc+0x438/0x710
> [ 0.385031] [<fffffc000829ad94>] __slab_alloc+0x54/0xa0
> [ 0.386441] [<fffffc000829b13c>] kmem_cache_alloc+0x35c/0x428
> [ 0.387983] [<fffffc0008266284>] ptlock_alloc+0x2c/0x58
> [ 0.389394] [<fffffc0008098e24>] pgd_pgtable_alloc+0x54/0xd8
> [ 0.390912] [<fffffc00080991d0>] __create_pgd_mapping+0x158/0x2a8
> [ 0.392556] [<fffffc0008d361cc>] create_pgd_mapping+0x30/0x38
> [ 0.394100] [<fffffc0008d35020>] efi_create_mapping+0xfc/0x110
> [ 0.395682] [<fffffc0008d88284>] arm_enable_runtime_services+0x130/0x204
> [ 0.397501] [<fffffc0008083594>] do_one_initcall+0x44/0x138
> [ 0.399001] [<fffffc0008d30d28>] kernel_init_freeable+0x178/0x2dc
> [ 0.400646] [<fffffc0008956f48>] kernel_init+0x18/0x110
> [ 0.402053] [<fffffc0008083330>] ret_from_fork+0x10/0x20
> [ 0.403488] Code: aa1e03e0 aa0103e8 d503201f f9800111 (885f7d00)
> [ 0.405145] ---[ end trace f6be31446b0a9526 ]---
> [ 0.406286] note: swapper/0[1] exited with preempt_count 1
> [ 0.407687] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
> [ 0.407687]
> [ 0.410047] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
> [ 0.410047]
>
This log contains two call traces. The first is a WARNING in wq_numa_init(). The second is the unhandled page fault.
Note the warning message (from wq_numa_init()):
workqueue: NUMA node mapping not available for cpu0, disabling NUMA support
Something looks genuinely broken with the cpu <-> numa-node associations in the ACPI case -- it even seems to fail when the SRAT does exist.
So, perhaps, commit 7ba5f605f3a0 may not have introduced the bug, only exposed one in the ACPI code?...
Thanks
Laszlo
^ permalink raw reply
* [PATCH v2 0/2] Assign RK3066 clocks at boot time
From: Heiko Stuebner @ 2016-10-14 13:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <cover.1476447057.git.paweljarosz3691@gmail.com>
Am Freitag, 14. Oktober 2016, 14:16:21 CEST schrieb Pawe? Jarosz:
> This patchset sets rk3066 PLL, CPU and PERI clocks while kernel init.
>
> Pawe? Jarosz (2):
> clk: rockchip: Add bindings for cpu and peri clocks on rk3066
> ARM: dts: rockchip: initialize rk3066 PLL clock rate
changes look good. One thing to keep in mind is that we need clock-id
additions in a separate patch (as they need to be on a shared branch).
I can do this split of patch1 on my own here, so no need to resend the series
and will do that after 4.9-rc1 (probably somewhere after sunday) as I need a
stable base for that shared branch.
Heiko
^ permalink raw reply
* [PATCH v3 1/2] clk: imx: fix integer overflow in AV PLL round rate
From: Fabio Estevam @ 2016-10-14 13:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4d2e3a91dfb74209735c940b51d7efc9ba2ed69b.1476267249.git.emil@limesaudio.com>
On Wed, Oct 12, 2016 at 7:31 AM, Emil Lundmark <emil@limesaudio.com> wrote:
> Since 'parent_rate * mfn' may overflow 32 bits, the result should be
> stored using 64 bits.
>
> The problem was discovered when trying to set the rate of the audio PLL
> (pll4_post_div) on an i.MX6Q. The desired rate was 196.608 MHz, but
> the actual rate returned was 192.000570 MHz. The round rate function should
> have been able to return 196.608 MHz, i.e., the desired rate.
>
> Fixes: ba7f4f557eb6 ("clk: imx: correct AV PLL rate formula")
> Cc: Anson Huang <b20788@freescale.com>
> Signed-off-by: Emil Lundmark <emil@limesaudio.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
^ permalink raw reply
* [PATCH v3 2/2] clk: imx: improve precision of AV PLL to 1 Hz
From: Fabio Estevam @ 2016-10-14 13:34 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <66f5967187f915fe7039f4dbfb77db88a2423094.1476267249.git.emil@limesaudio.com>
On Wed, Oct 12, 2016 at 7:31 AM, Emil Lundmark <emil@limesaudio.com> wrote:
> The audio and video PLLs are designed to have a precision of 1 Hz if some
> conditions are met. The current implementation only allows a precision that
> depends on the rate of the parent clock. E.g., if the parent clock is 24
> MHz, the precision will be 24 Hz; or more generally the precision will be
...
> I reckon this is the intention by the design of the clock rate formula.
>
> Signed-off-by: Emil Lundmark <emil@limesaudio.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
^ permalink raw reply
* aarch64 ACPI boot regressed by commit 7ba5f605f3a0 ("arm64/numa: remove the limitation that cpu0 must bind to node0")
From: Andrew Jones @ 2016-10-14 13:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <04f22a79-301b-f05b-033d-c7a24c9f4084@redhat.com>
On Fri, Oct 14, 2016 at 03:18:00PM +0200, Laszlo Ersek wrote:
> On 10/14/16 10:05, Andrew Jones wrote:
> > On Fri, Oct 14, 2016 at 12:50:29AM +0200, Laszlo Ersek wrote:
> >> (4) Analysis (well, a lame attempt at that, because I have zero
> >> familiarity with this code). Let me quote the patch:
> >>
> >>> commit 7ba5f605f3a0d9495aad539eeb8346d726dfc183
> >>> Author: Zhen Lei <thunder.leizhen@huawei.com>
> >>> Date: Thu Sep 1 14:55:04 2016 +0800
> >>>
> >>> arm64/numa: remove the limitation that cpu0 must bind to node0
> >>>
> >>> 1. Remove the old binding code.
> >>> 2. Read the nid of cpu0 from dts.
> >>> 3. Fallback the nid of cpu0 to 0 when numa=off is set in bootargs.
> >>>
> >>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> >>> Signed-off-by: Will Deacon <will.deacon@arm.com>
> >>>
> >>> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> >>> index c3c08368a685..8b048e6ec34a 100644
> >>> --- a/arch/arm64/kernel/smp.c
> >>> +++ b/arch/arm64/kernel/smp.c
> >>> @@ -624,6 +624,7 @@ static void __init of_parse_and_init_cpus(void)
> >>> }
> >>>
> >>> bootcpu_valid = true;
> >>> + early_map_cpu_to_node(0, of_node_to_nid(dn));
> >>>
> >>> /*
> >>> * cpu_logical_map has already been
> >>> diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c
> >>> index 0a15f010b64a..778a985c8a70 100644
> >>> --- a/arch/arm64/mm/numa.c
> >>> +++ b/arch/arm64/mm/numa.c
> >>> @@ -116,16 +116,24 @@ static void __init setup_node_to_cpumask_map(void)
> >>> */
> >>> void numa_store_cpu_info(unsigned int cpu)
> >>> {
> >>> - map_cpu_to_node(cpu, numa_off ? 0 : cpu_to_node_map[cpu]);
> >>> + map_cpu_to_node(cpu, cpu_to_node_map[cpu]);
> >>> }
> >>>
> >>> void __init early_map_cpu_to_node(unsigned int cpu, int nid)
> >>> {
> >>> /* fallback to node 0 */
> >>> - if (nid < 0 || nid >= MAX_NUMNODES)
> >>> + if (nid < 0 || nid >= MAX_NUMNODES || numa_off)
> >>> nid = 0;
> >
> > The ACPI equivalent code must be missing (at least) the above, because,
> > even with DT, mach-virt won't have cpu to node mappings unless numa
> > is configured on the command line. Can you try adding something like
> >
> > -m 512 -smp 4 \
> > -numa node,mem=256M,cpus=0-1,nodeid=0 \
> > -numa node,mem=256M,cpus=2-3,nodeid=1
> >
> > to your QEMU command line?
>
> I added the following to my domain XML, under <cpu>:
>
> <numa>
> <cell id='0' cpus='0-1' memory='2097152' unit='KiB'/>
> <cell id='1' cpus='2-3' memory='2097152' unit='KiB'/>
> </numa>
>
> (See <http://libvirt.org/formatdomain.html#elementsCPU>.)
>
> With that, each NUMA node gets half of the VCPUs and half of the guest RAM.
>
> (This is in a different guest now, one that has a bleeding edge Fedora kernel -- I didn't want to rebuild the upstream kernel yet again, just for this test. So, "4.9.0-0.rc0.git7.1.fc26.aarch64" is based on upstream v4.8-14109-g1573d2c, and it reproduces the problem too.)
>
> > Then when you boot with ACPI you'll get a
> > SRAT.
>
> Yes, that's confirmed by the guest kernel log (see below).
>
> > If that works, then we're just missing the "no SRAT, nid = 0"
> > code (that should have been added with this patch)
>
> It still crashes with the SRAT, with the following log:
Rats.
> Note the warning message (from wq_numa_init()):
>
> workqueue: NUMA node mapping not available for cpu0, disabling NUMA support
>
> Something looks genuinely broken with the cpu <-> numa-node associations in the ACPI case -- it even seems to fail when the SRAT does exist.
>
> So, perhaps, commit 7ba5f605f3a0 may not have introduced the bug, only exposed one in the ACPI code?...
The kernel's ACPI NUMA support used to work. It was the test case for
QEMU's SRAT generation code.
Two more experiments I wouldn't mind having you try, if you have time;
1) confirm that this NUMA configured guest and this latest kernel works
with DT. This is just for sanity, but I guess it will.
2) If (1) succeeds, then try the last-known-good kernel with ACPI again,
but this time with the NUMA configured guest.
If (2) fails then we may need to expand the bisection :-(
Thanks,
drew
^ permalink raw reply
* [PATCH v2 0/2] Assign RK3066 clocks at boot time
From: Paweł Jarosz @ 2016-10-14 14:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1569308.lsrqUgJ5m1@phil>
W dniu 14.10.2016 o 15:28, Heiko Stuebner pisze:
> changes look good. One thing to keep in mind is that we need clock-id
> additions in a separate patch (as they need to be on a shared branch).
>
> I can do this split of patch1 on my own here, so no need to resend the series
> and will do that after 4.9-rc1 (probably somewhere after sunday) as I need a
> stable base for that shared branch.
>
>
> Heiko
Thanks Heiko.
^ permalink raw reply
* [PATCH v2] arm64: dts: qcom: Fix broken interrupt trigger settings
From: Riku Voipio @ 2016-10-14 14:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1470937850-10492-1-git-send-email-marc.zyngier@arm.com>
On 11 August 2016 at 20:50, Marc Zyngier <marc.zyngier@arm.com> wrote:
> When a device uses the GIC as its interrupt controller and generates
> SPIs, only the values 1 (edge rising) and 4 (level high) are legal.
>
> Anything else is just plain wrong (can't be programmed into the HW),
> and leads to aborted driver probes (USB doesn't work with 4.8-rc1
> on a Dragonboard 410C).
Should this be sent to -stable as well? This fixes USB driver loading
for me on v4.8, but still don't seem to get the host usb ports working
on db410c.
Riku
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> ---
> * From v1:
> - Fixed USB interrupts after review from Stephen
>
> arch/arm64/boot/dts/qcom/msm8916.dtsi | 10 +++++-----
> arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +-
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
> index 11bdc24..b010d33 100644
> --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
> @@ -483,7 +483,7 @@
> compatible = "qcom,ci-hdrc";
> reg = <0x78d9000 0x400>;
> dr_mode = "peripheral";
> - interrupts = <GIC_SPI 134 IRQ_TYPE_NONE>;
> + interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
> usb-phy = <&usb_otg>;
> status = "disabled";
> };
> @@ -491,7 +491,7 @@
> usb_host: ehci at 78d9000 {
> compatible = "qcom,ehci-host";
> reg = <0x78d9000 0x400>;
> - interrupts = <GIC_SPI 134 IRQ_TYPE_NONE>;
> + interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
> usb-phy = <&usb_otg>;
> status = "disabled";
> };
> @@ -499,8 +499,8 @@
> usb_otg: phy at 78d9000 {
> compatible = "qcom,usb-otg-snps";
> reg = <0x78d9000 0x400>;
> - interrupts = <GIC_SPI 134 IRQ_TYPE_EDGE_BOTH>,
> - <GIC_SPI 140 IRQ_TYPE_EDGE_RISING>;
> + interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
>
> qcom,vdd-levels = <500000 1000000 1320000>;
> qcom,phy-init-sequence = <0x44 0x6B 0x24 0x13>;
> @@ -594,7 +594,7 @@
> <0x200a000 0x002100>;
> reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
> interrupt-names = "periph_irq";
> - interrupts = <GIC_SPI 190 IRQ_TYPE_NONE>;
> + interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
> qcom,ee = <0>;
> qcom,channel = <0>;
> #address-cells = <2>;
> diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> index 55ec3e8..69ed6e1 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> @@ -339,7 +339,7 @@
> <0x400a000 0x002100>;
> reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
> interrupt-names = "periph_irq";
> - interrupts = <GIC_SPI 326 IRQ_TYPE_NONE>;
> + interrupts = <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>;
> qcom,ee = <0>;
> qcom,channel = <0>;
> #address-cells = <2>;
> --
> 2.1.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH v2] ARM: dts: rockchip: temporarily remove emmc hs200 speed from rk3288-veyron-speedy.
From: Heiko Stuebner @ 2016-10-14 14:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <87twd1vzc5.fsf@aikidev.net>
Am Dienstag, 27. September 2016, 13:53:46 CEST schrieb Vagrant Cascadian:
> This essentially mimics what was done with rk3288-veyron-minnie in
> commit 984926781122f034d5bc9962815d135b6c4a8e1d.
>
> The eMMC of the speedy Chromebook also appears to need the same tuning
> workaround, as it frequently fails to recognize the eMMC without it.
>
> Signed-off-by: Vagrant Cascadian <vagrantc@aikidev.net>
applied as fix for 4.9.
Your mail client mangled that patch a lot (tabs etc), so it didn't apply
cleanly. As it is a quite small one, I fixed that up myself, but please try to
make your mail client send correct patches in the future or use git send-email
:-)
Thanks
Heiko
^ permalink raw reply
* [PATCH 0/3] thermal: Fix module autoload for drivers
From: Javier Martinez Canillas @ 2016-10-14 14:34 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
This small series contains trivial fixes to allow modules to be autoloaded
when its correspoinding thermal device is registered.
Best regards,
Javier
Javier Martinez Canillas (3):
thermal: max77620: Fix module autoload
thermal: tango: Fix module autoload
thermal: db8500: Fix module autoload
drivers/thermal/db8500_thermal.c | 1 +
drivers/thermal/max77620_thermal.c | 1 +
drivers/thermal/tango_thermal.c | 1 +
3 files changed, 3 insertions(+)
--
2.7.4
^ permalink raw reply
* [PATCH 2/3] thermal: tango: Fix module autoload
From: Javier Martinez Canillas @ 2016-10-14 14:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1476455702-21748-1-git-send-email-javier@osg.samsung.com>
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/thermal/tango_thermal.ko | grep alias
$
After this patch:
$ modinfo drivers/thermal/tango_thermal.ko | grep alias
alias: of:N*T*Csigma,smp8758-thermalC*
alias: of:N*T*Csigma,smp8758-thermal
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/thermal/tango_thermal.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/thermal/tango_thermal.c b/drivers/thermal/tango_thermal.c
index 201304aeafeb..4e67795cb6ce 100644
--- a/drivers/thermal/tango_thermal.c
+++ b/drivers/thermal/tango_thermal.c
@@ -107,6 +107,7 @@ static const struct of_device_id tango_sensor_ids[] = {
},
{ /* sentinel */ }
};
+MODULE_DEVICE_TABLE(of, tango_sensor_ids);
static struct platform_driver tango_thermal_driver = {
.probe = tango_thermal_probe,
--
2.7.4
^ permalink raw reply related
* aarch64 ACPI boot regressed by commit 7ba5f605f3a0 ("arm64/numa: remove the limitation that cpu0 must bind to node0")
From: Laszlo Ersek @ 2016-10-14 15:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <04f22a79-301b-f05b-033d-c7a24c9f4084@redhat.com>
On 10/14/16 15:18, Laszlo Ersek wrote:
> On 10/14/16 10:05, Andrew Jones wrote:
>> On Fri, Oct 14, 2016 at 12:50:29AM +0200, Laszlo Ersek wrote:
>>> (4) Analysis (well, a lame attempt at that, because I have zero
>>> familiarity with this code). Let me quote the patch:
>>>
>>>> commit 7ba5f605f3a0d9495aad539eeb8346d726dfc183
>>>> Author: Zhen Lei <thunder.leizhen@huawei.com>
>>>> Date: Thu Sep 1 14:55:04 2016 +0800
>>>>
>>>> arm64/numa: remove the limitation that cpu0 must bind to node0
>>>>
>>>> 1. Remove the old binding code.
>>>> 2. Read the nid of cpu0 from dts.
>>>> 3. Fallback the nid of cpu0 to 0 when numa=off is set in bootargs.
>>>>
>>>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>>>> Signed-off-by: Will Deacon <will.deacon@arm.com>
>>>>
>>>> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
>>>> index c3c08368a685..8b048e6ec34a 100644
>>>> --- a/arch/arm64/kernel/smp.c
>>>> +++ b/arch/arm64/kernel/smp.c
>>>> @@ -624,6 +624,7 @@ static void __init of_parse_and_init_cpus(void)
>>>> }
>>>>
>>>> bootcpu_valid = true;
>>>> + early_map_cpu_to_node(0, of_node_to_nid(dn));
>>>>
>>>> /*
>>>> * cpu_logical_map has already been
>>>> diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c
>>>> index 0a15f010b64a..778a985c8a70 100644
>>>> --- a/arch/arm64/mm/numa.c
>>>> +++ b/arch/arm64/mm/numa.c
>>>> @@ -116,16 +116,24 @@ static void __init setup_node_to_cpumask_map(void)
>>>> */
>>>> void numa_store_cpu_info(unsigned int cpu)
>>>> {
>>>> - map_cpu_to_node(cpu, numa_off ? 0 : cpu_to_node_map[cpu]);
>>>> + map_cpu_to_node(cpu, cpu_to_node_map[cpu]);
>>>> }
>>>>
>>>> void __init early_map_cpu_to_node(unsigned int cpu, int nid)
>>>> {
>>>> /* fallback to node 0 */
>>>> - if (nid < 0 || nid >= MAX_NUMNODES)
>>>> + if (nid < 0 || nid >= MAX_NUMNODES || numa_off)
>>>> nid = 0;
>>
>> The ACPI equivalent code must be missing (at least) the above,
>> because, even with DT, mach-virt won't have cpu to node mappings
>> unless numa is configured on the command line. Can you try adding
>> something like
>>
>> -m 512 -smp 4 \
>> -numa node,mem=256M,cpus=0-1,nodeid=0 \
>> -numa node,mem=256M,cpus=2-3,nodeid=1
>>
>> to your QEMU command line?
>
> I added the following to my domain XML, under <cpu>:
>
> <numa>
> <cell id='0' cpus='0-1' memory='2097152' unit='KiB'/>
> <cell id='1' cpus='2-3' memory='2097152' unit='KiB'/>
> </numa>
>
> (See <http://libvirt.org/formatdomain.html#elementsCPU>.)
>
> With that, each NUMA node gets half of the VCPUs and half of the guest
> RAM.
>
> (This is in a different guest now, one that has a bleeding edge Fedora
> kernel -- I didn't want to rebuild the upstream kernel yet again, just
> for this test. So, "4.9.0-0.rc0.git7.1.fc26.aarch64" is based on
> upstream v4.8-14109-g1573d2c, and it reproduces the problem too.)
>
>> Then when you boot with ACPI you'll get a
>> SRAT.
>
> Yes, that's confirmed by the guest kernel log (see below).
>
>> If that works, then we're just missing the "no SRAT, nid = 0"
>> code (that should have been added with this patch)
>
> It still crashes with the SRAT, with the following log:
>
>> EFI stub: Booting Linux Kernel...
>> ConvertPages: Incompatible memory types
>> EFI stub: Using DTB from configuration table
>> EFI stub: Exiting boot services and installing virtual address map...
>> [ 0.000000] Booting Linux on physical CPU 0x0
>> [ 0.000000] Linux version 4.9.0-0.rc0.git7.1.fc26.aarch64 (mockbuild at buildvm-aarch64-01.arm.fedoraproject.org) (gcc version 6.2.1 20160916 (Red Hat 6.2.1-2) (GCC) ) #1 SMP Wed Oct 12 17:44:54 UTC 2016
>> [ 0.000000] Boot CPU: AArch64 Processor [500f0000]
>> [ 0.000000] efi: Getting EFI parameters from FDT:
>> [ 0.000000] efi: EFI v2.60 by EDK II
>> [ 0.000000] efi: SMBIOS 3.0=0xbbdb0000 ACPI 2.0=0xb86d0000 MEMATTR=0xb936b018
>> [ 0.000000] cma: Reserved 512 MiB at 0x00000000e0000000
>> [ 0.000000] ACPI: Early table checksum verification disabled
>> [ 0.000000] ACPI: RSDP 0x00000000B86D0000 000024 (v02 BOCHS )
>> [ 0.000000] ACPI: XSDT 0x00000000B86C0000 000054 (v01 BOCHS BXPCFACP 00000001 01000013)
>> [ 0.000000] ACPI: FACP 0x00000000B83E0000 00010C (v05 BOCHS BXPCFACP 00000001 BXPC 00000001)
>> [ 0.000000] ACPI: DSDT 0x00000000B83F0000 0010E5 (v02 BOCHS BXPCDSDT 00000001 BXPC 00000001)
>> [ 0.000000] ACPI: APIC 0x00000000B83D0000 00018C (v03 BOCHS BXPCAPIC 00000001 BXPC 00000001)
>> [ 0.000000] ACPI: GTDT 0x00000000B83C0000 000060 (v02 BOCHS BXPCGTDT 00000001 BXPC 00000001)
>> [ 0.000000] ACPI: MCFG 0x00000000B83B0000 00003C (v01 BOCHS BXPCMCFG 00000001 BXPC 00000001)
>> [ 0.000000] ACPI: SPCR 0x00000000B83A0000 000050 (v02 BOCHS BXPCSPCR 00000001 BXPC 00000001)
>> [ 0.000000] ACPI: SRAT 0x00000000B8390000 0000C8 (v03 BOCHS BXPCSRAT 00000001 BXPC 00000001)
>> [ 0.000000] ACPI: SPCR: console: pl011,mmio,0x9000000,9600
>> [ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '9600')
>> [ 0.000000] bootconsole [pl11] enabled
>> [ 0.000000] ACPI: NUMA: SRAT: PXM 0 -> MPIDR 0x0 -> Node 0
>> [ 0.000000] ACPI: NUMA: SRAT: PXM 0 -> MPIDR 0x1 -> Node 0
>> [ 0.000000] ACPI: NUMA: SRAT: PXM 1 -> MPIDR 0x2 -> Node 1
>> [ 0.000000] ACPI: NUMA: SRAT: PXM 1 -> MPIDR 0x3 -> Node 1
>> [ 0.000000] NUMA: Adding memblock [0x40000000 - 0xbfffffff] on node 0
>> [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x40000000-0xbfffffff]
>> [ 0.000000] NUMA: Adding memblock [0xc0000000 - 0x13fffffff] on node 1
>> [ 0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0xc0000000-0x13fffffff]
>> [ 0.000000] NUMA: Initmem setup node 0 [mem 0x40000000-0xbfffffff]
>> [ 0.000000] NUMA: NODE_DATA [mem 0xbfff2580-0xbfffffff]
>> [ 0.000000] NUMA: Initmem setup node 1 [mem 0xc0000000-0x13fffffff]
>> [ 0.000000] NUMA: NODE_DATA [mem 0x13fff2580-0x13fffffff]
>> [ 0.000000] Zone ranges:
>> [ 0.000000] DMA [mem 0x0000000040000000-0x00000000ffffffff]
>> [ 0.000000] Normal [mem 0x0000000100000000-0x000000013fffffff]
>> [ 0.000000] Movable zone start for each node
>> [ 0.000000] Early memory node ranges
>> [ 0.000000] node 0: [mem 0x0000000040000000-0x00000000b838ffff]
>> [ 0.000000] node 0: [mem 0x00000000b8390000-0x00000000b83fffff]
>> [ 0.000000] node 0: [mem 0x00000000b8400000-0x00000000b841ffff]
>> [ 0.000000] node 0: [mem 0x00000000b8420000-0x00000000b874ffff]
>> [ 0.000000] node 0: [mem 0x00000000b8750000-0x00000000bbc1ffff]
>> [ 0.000000] node 0: [mem 0x00000000bbc20000-0x00000000bbffffff]
>> [ 0.000000] node 0: [mem 0x00000000bc000000-0x00000000bfffffff]
>> [ 0.000000] node 1: [mem 0x00000000c0000000-0x000000013fffffff]
>> [ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
>> [ 0.000000] Initmem setup node 1 [mem 0x00000000c0000000-0x000000013fffffff]
>> [ 0.000000] psci: probing for conduit method from ACPI.
>> [ 0.000000] psci: PSCIv0.2 detected in firmware.
>> [ 0.000000] psci: Using standard PSCI v0.2 function IDs
>> [ 0.000000] psci: Trusted OS migration not required
>> [ 0.000000] percpu: Embedded 3 pages/cpu @fffffe007fda0000 s117832 r8192 d70584 u196608
>> [ 0.000000] Detected PIPT I-cache on CPU0
>> [ 0.000000] Built 2 zonelists in Node order, mobility grouping on. Total pages: 65472
>> [ 0.000000] Policy zone: Normal
>> [ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-4.9.0-0.rc0.git7.1.fc26.aarch64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap LANG=en_US.UTF-8 earlycon acpi=force
>> [ 0.000000] PID hash table entries: 4096 (order: -1, 32768 bytes)
>> [ 0.000000] software IO TLB [mem 0xdbff0000-0xdfff0000] (64MB) mapped at [fffffe009bff0000-fffffe009ffeffff]
>> [ 0.000000] Memory: 3542976K/4194304K available (9148K kernel code, 1612K rwdata, 3776K rodata, 1600K init, 15899K bss, 127040K reserved, 524288K cma-reserved)
>> [ 0.000000] Virtual kernel memory layout:
>> [ 0.000000] modules : 0xfffffc0000000000 - 0xfffffc0008000000 ( 128 MB)
>> vmalloc : 0xfffffc0008000000 - 0xfffffdff5fff0000 ( 2045 GB)
>> .text : 0xfffffc0008080000 - 0xfffffc0008970000 ( 9152 KB)
>> .rodata : 0xfffffc0008970000 - 0xfffffc0008d30000 ( 3840 KB)
>> .init : 0xfffffc0008d30000 - 0xfffffc0008ec0000 ( 1600 KB)
>> .data : 0xfffffc0008ec0000 - 0xfffffc0009053200 ( 1613 KB)
>> .bss : 0xfffffc0009053200 - 0xfffffc0009fda058 ( 15900 KB)
>> fixed : 0xfffffdff7e7d0000 - 0xfffffdff7ec00000 ( 4288 KB)
>> PCI I/O : 0xfffffdff7ee00000 - 0xfffffdff7fe00000 ( 16 MB)
>> vmemmap : 0xfffffdff80000000 - 0xfffffe0000000000 ( 2 GB maximum)
>> 0xfffffdff80000000 - 0xfffffdff80400000 ( 4 MB actual)
>> memory : 0xfffffe0000000000 - 0xfffffe0100000000 ( 4096 MB)
>> [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=2
>> [ 0.000000] Running RCU self tests
>> [ 0.000000] Hierarchical RCU implementation.
>> [ 0.000000] RCU lockdep checking is enabled.
>> [ 0.000000] Build-time adjustment of leaf fanout to 64.
>> [ 0.000000] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
>> [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=4
>> [ 0.000000] kmemleak: Kernel memory leak detector disabled
>> [ 0.000000] NR_IRQS:64 nr_irqs:64 0
>> [ 0.000000] GICv2m: ACPI overriding V2M MSI_TYPER (base:80, num:64)
>> [ 0.000000] GICv2m: range[mem 0x08020000-0x08020fff], SPI[80:143]
>> [ 0.000000] GIC: PPI11 is secure or misconfigured
>> [ 0.000000] arm_arch_timer: WARNING: Invalid trigger for IRQ3, assuming level low
>> [ 0.000000] arm_arch_timer: WARNING: Please fix your firmware
>> [ 0.000000] arm_arch_timer: Architected cp15 timer(s) running at 50.00MHz (virt).
>> [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, max_idle_ns: 440795202655 ns
>> [ 0.000003] sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 4398046511100ns
>> [ 0.002198] Console: colour dummy device 80x25
>> [ 0.003319] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
>> [ 0.005236] ... MAX_LOCKDEP_SUBCLASSES: 8
>> [ 0.006183] ... MAX_LOCK_DEPTH: 48
>> [ 0.007273] ... MAX_LOCKDEP_KEYS: 8191
>> [ 0.008287] ... CLASSHASH_SIZE: 4096
>> [ 0.009296] ... MAX_LOCKDEP_ENTRIES: 32768
>> [ 0.010327] ... MAX_LOCKDEP_CHAINS: 65536
>> [ 0.011318] ... CHAINHASH_SIZE: 32768
>> [ 0.012453] memory used by lock dependency info: 8159 kB
>> [ 0.013736] per task-struct memory footprint: 1920 bytes
>> [ 0.015742] mempolicy: Enabling automatic NUMA balancing. Configure with numa_balancing= or the kernel.numa_balancing sysctl
>> [ 0.018710] Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=50000)
>> [ 0.021221] pid_max: default: 32768 minimum: 301
>> [ 0.022806] ACPI: Core revision 20160831
>> [ 0.027885] ACPI: 1 ACPI AML tables successfully acquired and loaded
>>
>> [ 0.030252] Security Framework initialized
>> [ 0.031355] Yama: becoming mindful.
>> [ 0.032176] SELinux: Initializing.
>> [ 0.033925] Dentry cache hash table entries: 524288 (order: 6, 4194304 bytes)
>> [ 0.037039] Inode-cache hash table entries: 262144 (order: 5, 2097152 bytes)
>> [ 0.039383] Mount-cache hash table entries: 8192 (order: 0, 65536 bytes)
>> [ 0.041135] Mountpoint-cache hash table entries: 8192 (order: 0, 65536 bytes)
>> [ 0.044725] ftrace: allocating 29596 entries in 8 pages
>> [ 0.080467] ASID allocator initialised with 65536 entries
>> [ 0.082070] ------------[ cut here ]------------
>> [ 0.083227] WARNING: CPU: 0 PID: 1 at kernel/workqueue.c:5458 wq_numa_init+0x178/0x21c
>> [ 0.085304] Modules linked in:
>> [ 0.086102]
>> [ 0.086499] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-0.rc0.git7.1.fc26.aarch64 #1
>> [ 0.088611] Hardware name: linux,dummy-virt (DT)
>> [ 0.089816] task: fffffe00700aac00 task.stack: fffffe00f8044000
>> [ 0.091375] PC is at wq_numa_init+0x178/0x21c
>> [ 0.092514] LR is at wq_numa_init+0x14c/0x21c
>> [ 0.093654] pc : [<fffffc0008d3f434>] lr : [<fffffc0008d3f408>] pstate: 60000045
>> [ 0.095589] sp : fffffe00f8047cb0
>> [ 0.096457] x29: fffffe00f8047cb0 [ 0.097311] x28: 0000000000000000
>> [ 0.098201]
>> [ 0.098601] x27: 0000000000000000 [ 0.099450] x26: fffffc0008ef4a28
>> [ 0.100342]
>> [ 0.100730] x25: fffffc0008ef3000 [ 0.101576] x24: fffffc0008ef3574
>> [ 0.102466]
>> [ 0.102853] x23: 0000000000000000 [ 0.103700] x22: fffffe007937de00
>> [ 0.104593]
>> [ 0.104982] x21: fffffc0008e887f8 [ 0.105829] x20: fffffc0009091000
>> [ 0.106723]
>> [ 0.107111] x19: 0000000000000000 [ 0.107956] x18: 0000000050642c6a
>> [ 0.108847]
>> [ 0.109234] x17: 0000000000000000 [ 0.110078] x16: 0000000000000000
>> [ 0.110968]
>> [ 0.111363] x15: 00000000fcacdc89 [ 0.112199] x14: 0000000000000000
>> [ 0.113087]
>> [ 0.113481] x13: 0000000000000000 [ 0.114324] x12: 00000000fe2ce6e0
>> [ 0.115204]
>> [ 0.115597] x11: 0000000000000001 [ 0.116439] x10: 0000000000000048
>> [ 0.117328]
>> [ 0.117716] x9 : 0000000000000000 [ 0.118563] x8 : fffffe00f4010080
>> [ 0.119453]
>> [ 0.119833] x7 : 0000000000000000 [ 0.120678] x6 : 0000000000000000
>> [ 0.121571]
>> [ 0.121959] x5 : 000000000000000f [ 0.122804] x4 : 0000000000000000
>> [ 0.123695]
>> [ 0.124084] x3 : 0000000000000000 [ 0.124922] x2 : 0000000000000000
>> [ 0.125815]
>> [ 0.126204] x1 : 0000000000000004 [ 0.127055] x0 : 00000000ffffffff
>> [ 0.127966]
>> [ 0.128361]
>> [ 0.128767] ---[ end trace 0000000000000000 ]---
>> [ 0.129983] Call trace:
>> [ 0.130629] Exception stack(0xfffffe00f8047ad0 to 0xfffffe00f8047c00)
>> [ 0.132316] 7ac0: 0000000000000000 0000040000000000
>> [ 0.134360] 7ae0: fffffe00f8047cb0 fffffc0008d3f434 0000000060000045 000000000000003d
>> [ 0.136405] 7b00: fffffc0008ef4000 fffffe007937df00 0000000000000000 0000000000000000
>> [ 0.138446] 7b20: fffffc0008bf4110 0000000000000189 0000000000000018 0000000000000028
>> [ 0.140498] 7b40: fffffe00f8047b80 0000000000000000 fffffe0000000000 fffffc000848af30
>> [ 0.142541] 7b60: fffffe00f8047ba0 fffffc0008134d24 fffffe00f8044000 0000000000000040
>> [ 0.144558] 7b80: 00000000ffffffff 0000000000000004 0000000000000000 0000000000000000
>> [ 0.146607] 7ba0: 0000000000000000 000000000000000f 0000000000000000 0000000000000000
>> [ 0.148664] 7bc0: fffffe00f4010080 0000000000000000 0000000000000048 0000000000000001
>> [ 0.150704] 7be0: 00000000fe2ce6e0 0000000000000000 0000000000000000 00000000fcacdc89
>> [ 0.152752] [<fffffc0008d3f434>] wq_numa_init+0x178/0x21c
>> [ 0.154160] [<fffffc0008d3f578>] init_workqueues+0xa0/0x4b8
>> [ 0.155596] [<fffffc0008083594>] do_one_initcall+0x44/0x138
>> [ 0.157059] [<fffffc0008d30d28>] kernel_init_freeable+0x178/0x2dc
>> [ 0.158670] [<fffffc0008956f48>] kernel_init+0x18/0x110
>> [ 0.160036] [<fffffc0008083330>] ret_from_fork+0x10/0x20
>> [ 0.161440] workqueue: NUMA node mapping not available for cpu0, disabling NUMA support
>> [ 0.165296] Remapping and enabling EFI services.
>> [ 0.166586] Unable to handle kernel paging request at virtual address b91000006be8
>> [ 0.168448] pgd = fffffc000a010000
>> [ 0.169341] [b91000006be8] *pgd=0000000000000000[ 0.170505] , *pud=0000000000000000
>> , *pmd=0000000000000000[ 0.171942]
>> [ 0.172332] Internal error: Oops: 96000004 [#1] SMP
>> [ 0.173600] Modules linked in:
>> [ 0.174407] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.9.0-0.rc0.git7.1.fc26.aarch64 #1
>> [ 0.176836] Hardware name: linux,dummy-virt (DT)
>> [ 0.178038] task: fffffe00700aac00 task.stack: fffffe00f8044000
>> [ 0.179579] PC is at __ll_sc_atomic_add+0x20/0x40
>> [ 0.180800] LR is at __lock_acquire+0xe8/0x698
>> [ 0.181961] pc : [<fffffc0008487390>] lr : [<fffffc0008138c08>] pstate: 800000c5
>> [ 0.183895] sp : fffffe00f8047820
>> [ 0.184755] x29: fffffe00f8047820 [ 0.185588] x28: fffffc0008ef3000
>> [ 0.186479]
>> [ 0.186868] x27: fffffc0008ef2358 [ 0.187713] x26: fffffc0009ce6000
>> [ 0.188606]
>> [ 0.188997] x25: 0000000000000001 [ 0.189857] x24: 0000000000000000
>> [ 0.190731]
>> [ 0.191115] x23: fffffe00700aac00 [ 0.191951] x22: 0000000000000000
>> [ 0.192843]
>> [ 0.193231] x21: fffffe007fd9a018 [ 0.194074] x20: 0000000000000000
>> [ 0.194966]
>> [ 0.195361] x19: fffffe007fd9a018 [ 0.196192] x18: 0000000000000010
>> [ 0.197077]
>> [ 0.197476] x17: 0000000057181979 [ 0.198325] x16: 0000000000000000
>> [ 0.199209]
>> [ 0.199604] x15: 0000000000000000 [ 0.200450] x14: 0000000000000000
>> [ 0.201337]
>> [ 0.201723] x13: 0000000000000001 [ 0.202555] x12: fffffe007fff2580
>> [ 0.203432]
>> [ 0.203819] x11: 0000000000000000 [ 0.204664] x10: 0000000000000011
>> [ 0.205550]
>> [ 0.205937] x9 : 0000000000000001 [ 0.206784] x8 : 0000b91000006be8
>> [ 0.207678]
>> [ 0.208062] x7 : fffffc0008299fcc [ 0.208899] x6 : 0000000000000000
>> [ 0.209787]
>> [ 0.210176] x5 : 0000000000000080 [ 0.211022] x4 : 0000b91000006a50
>> [ 0.211913]
>> [ 0.212307] x3 : 0000000000000000 [ 0.213147] x2 : 000022c80000f420
>> [ 0.214034]
>> [ 0.214421] x1 : 0000b91000006be8 [ 0.215251] x0 : fffffc0008138c08
>> [ 0.216134]
>> [ 0.216527]
>> [ 0.216916] Process swapper/0 (pid: 1, stack limit = 0xfffffe00f8044020)
>> [ 0.218671] Stack: (0xfffffe00f8047820 to 0xfffffe00f8048000)
>> [ 0.220167] 7820: fffffe00f8047840 fffffc0008138c08 fffffe00f8044000 0000000000000001
>> [ 0.222190] 7840: fffffe00f80478c0 fffffc0008139590 fffffe007fd9a018 0000000000000000
>> [ 0.224238] 7860: 0000000000000000 0000000000000000 0000000000000001 0000000000000000
>> [ 0.226284] 7880: fffffc0008299fcc 00000000000000c0 fffffc0008ef2358 fffffc0008ef3000
>> [ 0.228318] 78a0: 0000000000000001 fffffc0009ce6000 0000000000000000 fffffe0000000000
>> [ 0.230362] 78c0: fffffe00f8047930 fffffc000895f2c4 fffffe007fd9a000 fffffc0008299fcc
>> [ 0.232394] 78e0: fffffe007fd9a000 fffffc000829ad94 fffffe007001db00 000000000000e8e8
>> [ 0.234435] 7900: fffffe007001db00 fffffe007001dbf8 fffffe00fff3ef50 0000000000000000
>> [ 0.236481] 7920: fffffe00f8047a20 fffffc0008ef2000 fffffe00f8047950 fffffc0008299fcc
>> [ 0.238516] 7940: 00000000ffffffff fffffe007fd9a000 fffffe00f8047a70 fffffc000829aa68
>> [ 0.240560] 7960: 00000000ffffffff 0000000000000001 00000000024000c0 fffffc000829ad94
>> [ 0.242604] 7980: 0000000000210d00 000000000000e8e8 fffffe007001db00 fffffe007001dbf8
>> [ 0.244634] 79a0: fffffe00fff3ef50 0000000000000000 fffffe00f8044000 0000000000000040
>> [ 0.246678] 79c0: fffffc000828d620 fffffc0008ef3000 00000000026080c0 fffffe00fff3ef60
>> [ 0.248733] 79e0: fffffe00f8047a00 fffffc00024000c0 fffffc0008f89000 0000000000000000
>> [ 0.250783] 7a00: fffffe00f8047a20 fffffc000822f62c fffffc0009016b30 fffffe00f8047b40
>> [ 0.252896] 7a20: fffffe00f8047ba0 fffffc000828d620 0000000000000000 fffffc0008ef0b28
>> [ 0.255009] 7a40: fffffe007fff3c00 0000000000000000 0000000000000000 0000000000000000
>> [ 0.257121] 7a60: fffffe00f8044000 0000000000000000 fffffe00f8047b90 fffffc000829ad94
>> [ 0.259240] 7a80: 0000000000000040 fffffe007001db00 00000000024000c0 00000000ffffffff
>> [ 0.261358] 7aa0: fffffc0008266284 fffffe00fff3ef50 0000000020000000 00e8000000000f07
>> [ 0.263472] 7ac0: 0000000000000000 0000000000000400 fffffc0008f89000 0000000000000000
>> [ 0.265662] 7ae0: fffffe00f8047b00 fffffc000822f62c fffffe00fff3ef60 0000000000000000
>> [ 0.267787] 7b00: 0000001000000000 fffffc0008266284 fffffe00f8047b50 fffffc0008134d24
>> [ 0.269905] 7b20: fffffe00f8044000 0000000000000040 fffffc0008bf4110 0000000000000189
>> [ 0.272020] 7b40: fffffc0008ef4000 0000000000000000 fffffe00f8047b70 fffffc000810267c
>> [ 0.274136] 7b60: fffffc0009016893 0000000000000000 fffffe00f8047ba0 fffffc0008102784
>> [ 0.276250] 7b80: fffffe00f8047b90 fffffc000829ad7c fffffe00f8047bd0 fffffc000829b13c
>> [ 0.278371] 7ba0: fffffe007001db00 00000000024000c0 fffffc0008266284 fffffe007001db00
>> [ 0.280484] 7bc0: fffffc0008ef4000 0000000000000000 fffffe00f8047c30 fffffc0008266284
>> [ 0.282600] 7be0: fffffdff801b0200 fffffe006c080000 000000006c080000 0000000020000000
>> [ 0.284715] 7c00: fffffe00f0010008 0000000004000000 0000000020000000 00e8000000000f07
>> [ 0.286831] 7c20: 0000000000000000 0000000000000000 fffffe00f8047c50 fffffc0008098e24
>> [ 0.288948] 7c40: fffffdff801b0200 0000000000000001 fffffe00f8047c80 fffffc00080991d0
>> [ 0.291062] 7c60: 0000000024000000 0000000000000001 0000000024000000 fffffc0008ef0b28
>> [ 0.293178] 7c80: fffffe00f8047d00 fffffc0008d361cc fffffe0078416018 00e8000000000707
>> [ 0.295296] 7ca0: fffffc0008ff6410 fffffc0008ef7000 0000000000000000 fffffc0008ff6410
>> [ 0.297408] 7cc0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> [ 0.299523] 7ce0: 0000000000000000 00e8000000000f05 fffffc0008098dd0 0000000023ffffff
>> [ 0.301636] 7d00: fffffe00f8047d10 fffffc0008d35020 fffffe00f8047d40 fffffc0008d88284
>> [ 0.303748] 7d20: fffffe0078416018 fffffc0008ff6000 fffffc0008c87348 fffffc0008d8821c
>> [ 0.305863] 7d40: fffffe00f8047d90 fffffc0008083594 fffffc0008d88154 fffffe00f8044000
>> [ 0.307987] 7d60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> [ 0.310099] 7d80: 0000000000000000 0000000004000000 fffffe00f8047e00 fffffc0008d30d28
>> [ 0.312217] 7da0: fffffc0008e622d8 fffffc0008e622e0 0000000000000040 0000000000000000
>> [ 0.314333] 7dc0: fffffe00f8047e00 fffffc0008d30d18 fffffc0008e62220 fffffc0008e622e0
>> [ 0.316445] 7de0: 0000000000000040 0000000000000000 0000000000000000 fffffc0008e622e0
>> [ 0.318572] 7e00: fffffe00f8047ea0 fffffc0008956f48 fffffc0008956f30 0000000000000000
>> [ 0.320692] 7e20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> [ 0.322805] 7e40: 0000000000000000 0000000000000000 0000000000000000 0000000000000001
>> [ 0.324914] 7e60: 0000000000000003 0000000000000000 0000000000000000 0000000000000000
>> [ 0.327027] 7e80: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> [ 0.329139] 7ea0: 0000000000000000 fffffc0008083330 fffffc0008956f30 0000000000000000
>> [ 0.331248] 7ec0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> [ 0.333361] 7ee0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> [ 0.335470] 7f00: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> [ 0.337585] 7f20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> [ 0.339695] 7f40: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> [ 0.341810] 7f60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> [ 0.343923] 7f80: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> [ 0.346037] 7fa0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> [ 0.348154] 7fc0: 0000000000000000 0000000000000005 0000000000000000 0000000000000000
>> [ 0.350272] 7fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> [ 0.352392] Call trace:
>> [ 0.353049] Exception stack(0xfffffe00f8047650 to 0xfffffe00f8047780)
>> [ 0.354792] 7640: fffffe007fd9a018 0000040000000000
>> [ 0.356910] 7660: fffffe00f8047820 fffffc0008487390 fffffe00f80476e0 fffffc0008131290
>> [ 0.359025] 7680: fffffc000901690b fffffc0008f1e000 0000000000000001 fffffe00700aac00
>> [ 0.361140] 76a0: fffffc000901690b fffffc0008f27a28 fffffe00fff3b700 fffffc0008e8b700
>> [ 0.363255] 76c0: fffffe00fff3b700 fffffc0008ef1000 fffffe00f80476e0 00000000000000c0
>> [ 0.365373] 76e0: fffffe00f8047720 fffffc000811a374 fffffc0008138c08 0000b91000006be8
>> [ 0.367483] 7700: 000022c80000f420 0000000000000000 0000b91000006a50 0000000000000080
>> [ 0.369593] 7720: 0000000000000000 fffffc0008299fcc 0000b91000006be8 0000000000000001
>> [ 0.371702] 7740: 0000000000000011 0000000000000000 fffffe007fff2580 0000000000000001
>> [ 0.373817] 7760: 0000000000000000 0000000000000000 0000000000000000 0000000057181979
>> [ 0.375935] [<fffffc0008487390>] __ll_sc_atomic_add+0x20/0x40
>> [ 0.377489] [<fffffc0008138c08>] __lock_acquire+0xe8/0x698
>> [ 0.378960] [<fffffc0008139590>] lock_acquire+0xd8/0x2c0
>> [ 0.380394] [<fffffc000895f2c4>] _raw_spin_lock+0x4c/0x60
>> [ 0.381843] [<fffffc0008299fcc>] get_partial_node.isra.23+0x4c/0x440
>> [ 0.383559] [<fffffc000829aa68>] ___slab_alloc+0x438/0x710
>> [ 0.385031] [<fffffc000829ad94>] __slab_alloc+0x54/0xa0
>> [ 0.386441] [<fffffc000829b13c>] kmem_cache_alloc+0x35c/0x428
>> [ 0.387983] [<fffffc0008266284>] ptlock_alloc+0x2c/0x58
>> [ 0.389394] [<fffffc0008098e24>] pgd_pgtable_alloc+0x54/0xd8
>> [ 0.390912] [<fffffc00080991d0>] __create_pgd_mapping+0x158/0x2a8
>> [ 0.392556] [<fffffc0008d361cc>] create_pgd_mapping+0x30/0x38
>> [ 0.394100] [<fffffc0008d35020>] efi_create_mapping+0xfc/0x110
>> [ 0.395682] [<fffffc0008d88284>] arm_enable_runtime_services+0x130/0x204
>> [ 0.397501] [<fffffc0008083594>] do_one_initcall+0x44/0x138
>> [ 0.399001] [<fffffc0008d30d28>] kernel_init_freeable+0x178/0x2dc
>> [ 0.400646] [<fffffc0008956f48>] kernel_init+0x18/0x110
>> [ 0.402053] [<fffffc0008083330>] ret_from_fork+0x10/0x20
>> [ 0.403488] Code: aa1e03e0 aa0103e8 d503201f f9800111 (885f7d00)
>> [ 0.405145] ---[ end trace f6be31446b0a9526 ]---
>> [ 0.406286] note: swapper/0[1] exited with preempt_count 1
>> [ 0.407687] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
>> [ 0.407687]
>> [ 0.410047] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
>> [ 0.410047]
>>
>
> This log contains two call traces. The first is a WARNING in
> wq_numa_init(). The second is the unhandled page fault.
>
> Note the warning message (from wq_numa_init()):
>
> workqueue: NUMA node mapping not available for cpu0, disabling NUMA support
>
> Something looks genuinely broken with the cpu <-> numa-node
> associations in the ACPI case -- it even seems to fail when the SRAT
> does exist.
>
> So, perhaps, commit 7ba5f605f3a0 may not have introduced the bug, only
> exposed one in the ACPI code?...
Okay, so let me repeat,
smp_init_cpus() [arch/arm64/kernel/smp.c]
acpi_table_parse_madt() [drivers/acpi/tables.c]
acpi_parse_gic_cpu_interface() [arch/arm64/kernel/smp.c]
acpi_map_gic_cpu_interface() [arch/arm64/kernel/smp.c]
early_map_cpu_to_node() [arch/arm64/mm/numa.c]
We have acpi_map_gic_cpu_interface() being called for each GICC
structure in the MADT (signature "APIC"). This function is supposed to
set up a number of things for the CPU found, including its association
with a NUMA node. This should happen even if we have only one node (no
SRAT), and it should happen for CPU#0 as well.
acpi_map_gic_cpu_interface() uses the global variable "cpu_count" like
this:
(a) on input, it is the number of CPUs found previously, that is, the
logical identifier of the CPU being added presently,
(b) on output, it is bumped by one, if the CPU got added / parsed
correctly,
(c) in-between, we have expressions like:
> if (is_mpidr_duplicate(cpu_count, hwid)) {
> pr_err("duplicate CPU MPIDR 0x%llx in MADT\n", hwid);
> return;
> }
and
> if (cpu_count >= NR_CPUS)
> return;
(note: this implies that NR_CPUS is an exclusive limit)
and -- importantly --
> /* map the logical cpu id to cpu MPIDR */
> cpu_logical_map(cpu_count) = hwid;
and -- even more importantly --
> early_map_cpu_to_node(cpu_count, acpi_numa_get_nid(cpu_count, hwid));
A whole bunch of stuff seems to be wrong with this, when we try to
interpret it for CPU#0. Such as:
(1) the global variable "cpu_count" is initialized to one, not zero.
This dates back to the following commit:
> commit 0f0783365cbb7ec13a8f02198f6e1a146d94a5a9
> Author: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Date: Wed May 13 14:12:47 2015 +0100
>
> ARM64: kernel: unify ACPI and DT cpus initialization
It means that none of the above checks and assignments will be performed
for CPU#0.
It also means that should we actually find NR_CPUs CPUs, the last one
will be rejected, because at that point, cpu_count will equal NR_CPUs
*on input*.
(2) On arm64, cpu_logical_map() is implemented like this
[arch/arm64/include/asm/smp_plat.h]:
> /*
> * Logical CPU mapping.
> */
> extern u64 __cpu_logical_map[NR_CPUS];
> #define cpu_logical_map(cpu) __cpu_logical_map[cpu]
So this is the declaration. The definition is back in
"arch/arm64/kernel/setup.c":
> u64 __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = INVALID_HWID };
where INVALID_HWID is ULONG_MAX.
This implies that
> /* map the logical cpu id to cpu MPIDR */
> cpu_logical_map(cpu_count) = hwid;
will never store a hwid different from INVALID_HWID to
__cpu_logical_map[0], because "cpu_count" -- the offset into that array,
for the assignment -- is never zero.
(3) early_map_cpu_to_node() will never set cpu_to_node_map[0] to any
NUMA node ID.
(If early_map_cpu_to_node() was called with cpu_count==0 (correctly), it
would call set_cpu_numa_node(), due to the change implemented by
7ba5f605f3a0:
> /*
> * We should set the numa node of cpu0 as soon as possible, because it
> * has already been set up online before. cpu_to_node(0) will soon be
> * called.
> */
> if (!cpu)
> set_cpu_numa_node(cpu, nid);
but I don't know what that would suffice for.)
(4) The acpi_numa_get_nid() function deserves separate treatment:
> int acpi_numa_get_nid(unsigned int cpu, u64 hwid)
> {
> int i;
>
> for (i = 0; i < cpus_in_srat; i++) {
> if (hwid == early_node_cpu_hwid[i].cpu_hwid)
> return early_node_cpu_hwid[i].node_id;
> }
>
> return NUMA_NO_NODE;
> }
So,
(4a) if we have no SRAT (because there's only one NUMA node), then this
function will invariably return NUMA_NO_NODE (value -1), which means
that *even if* early_map_cpu_to_node() was called with cpu_count==0
(which it is not, see (3) above), the assigned NUMA node ID would still
be NUMA_NO_NODE. That's wrong, it should be zero.
(4b) The acpi_numa_get_nid() function completely ignores its first
parameter, called "cpu" (set from "cpu_count" at the call site). This
has been the case since the birth of that function, namely
> commit d8b47fca8c233642d1a20fa4025579ebc8be6f1e
> Author: Hanjun Guo <hanjun.guo@linaro.org>
> Date: Tue May 24 15:35:44 2016 -0700
>
> arm64, ACPI, NUMA: NUMA support based on SRAT and SLIT
I guess if that parameter is unnecessary, it should be removed.
I'm sorry but I can't even begin to untangle this mess. Maybe the code I
tried to analyze in this email was never *meant* to associate CPU#0 with
any NUMA node at all (not even node 0); instead, other code -- for
example code removed by 7ba5f605f3a0 -- was meant to perform that
association.
If that's the case, then the code I listed here might even be correct,
for CPUs with logical IDs >= 1. The initialization of "cpu_count" to 1
does suggest that CPU#0 was never meant to be handled by
acpi_map_gic_cpu_interface(). I can't tell.
What I can tell is that 7ba5f605f3a0 breaks the ACPI boot. So
- either (parts of) it should be reverted please,
- or the ACPI boot path should be extended please, so that it handles
CPU#0 as well (associating it with NUMA node #0 if there is no SRAT,
and NUMA node #whatever, if there's an SRAT saying so).
Thanks,
Laszlo
^ permalink raw reply
* [PATCH 2/3] thermal: tango: Fix module autoload
From: Marc Gonzalez @ 2016-10-14 15:27 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1476455702-21748-3-git-send-email-javier@osg.samsung.com>
On 14/10/2016 16:35, Javier Martinez Canillas wrote:
> If the driver is built as a module, autoload won't work because the module
> alias information is not filled. So user-space can't match the registered
> device with the corresponding module.
>
> Export the module alias information using the MODULE_DEVICE_TABLE() macro.
>
> Before this patch:
>
> $ modinfo drivers/thermal/tango_thermal.ko | grep alias
> $
>
> After this patch:
>
> $ modinfo drivers/thermal/tango_thermal.ko | grep alias
> alias: of:N*T*Csigma,smp8758-thermalC*
> alias: of:N*T*Csigma,smp8758-thermal
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> ---
>
> drivers/thermal/tango_thermal.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/thermal/tango_thermal.c b/drivers/thermal/tango_thermal.c
> index 201304aeafeb..4e67795cb6ce 100644
> --- a/drivers/thermal/tango_thermal.c
> +++ b/drivers/thermal/tango_thermal.c
> @@ -107,6 +107,7 @@ static const struct of_device_id tango_sensor_ids[] = {
> },
> { /* sentinel */ }
> };
> +MODULE_DEVICE_TABLE(of, tango_sensor_ids);
Thanks for fixing it :-)
Acked-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Regards.
^ permalink raw reply
* aarch64 ACPI boot regressed by commit 7ba5f605f3a0 ("arm64/numa: remove the limitation that cpu0 must bind to node0")
From: Laszlo Ersek @ 2016-10-14 15:27 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <d26ea7ca-6b65-b3a6-591e-ab892f1815e7@redhat.com>
On 10/14/16 17:01, Laszlo Ersek wrote:
> Maybe the code I
> tried to analyze in this email was never *meant* to associate CPU#0 with
> any NUMA node at all (not even node 0); instead, other code -- for
> example code removed by 7ba5f605f3a0 -- was meant to perform that
> association.
Staring a bit more at the code, this looks very likely; in acpi_map_gic_cpu_interface() we have
> /* Check if GICC structure of boot CPU is available in the MADT */
> if (cpu_logical_map(0) == hwid) {
> if (bootcpu_valid) {
> pr_err("duplicate boot CPU MPIDR: 0x%llx in MADT\n",
> hwid);
> return;
> }
> bootcpu_valid = true;
> return;
> }
which means that this callback function (for parsing the GICC structures in the MADT) expects to find the boot processor as well.
Upon finding the boot processor, we set bootcpu_valid to true, and that's it -- no association with any NUMA node, and no incrementing of "cpu_count".
Thanks
Laszlo
^ permalink raw reply
* aarch64 ACPI boot regressed by commit 7ba5f605f3a0 ("arm64/numa: remove the limitation that cpu0 must bind to node0")
From: Lorenzo Pieralisi @ 2016-10-14 15:42 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <b8b58d52-691c-11f0-2d26-a51e03430771@redhat.com>
On Fri, Oct 14, 2016 at 05:27:58PM +0200, Laszlo Ersek wrote:
> On 10/14/16 17:01, Laszlo Ersek wrote:
>
> > Maybe the code I
> > tried to analyze in this email was never *meant* to associate CPU#0 with
> > any NUMA node at all (not even node 0); instead, other code -- for
> > example code removed by 7ba5f605f3a0 -- was meant to perform that
> > association.
>
> Staring a bit more at the code, this looks very likely; in acpi_map_gic_cpu_interface() we have
>
> > /* Check if GICC structure of boot CPU is available in the MADT */
> > if (cpu_logical_map(0) == hwid) {
> > if (bootcpu_valid) {
> > pr_err("duplicate boot CPU MPIDR: 0x%llx in MADT\n",
> > hwid);
> > return;
> > }
> > bootcpu_valid = true;
> > return;
> > }
>
> which means that this callback function (for parsing the GICC
> structures in the MADT) expects to find the boot processor as well.
>
> Upon finding the boot processor, we set bootcpu_valid to true, and
> that's it -- no association with any NUMA node, and no incrementing of
> "cpu_count".
Yes, because that's to check the MADT contains the boot cpu hwid.
Does this help (compile tested only) ?
-- >8 --
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index d3f151c..8507703 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -544,6 +544,7 @@ static int __init smp_cpu_setup(int cpu)
return;
}
bootcpu_valid = true;
+ early_map_cpu_to_node(0, acpi_numa_get_nid(0, hwid));
return;
}
^ 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