All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 8/8] iio: gyro: mpu3050: Use new PM macros
From: Paul Cercueil @ 2022-01-05 10:17 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Rafael J . Wysocki, Ulf Hansson, Jonathan Cameron,
	Lars-Peter Clausen, Linus Walleij, Arnd Bergmann, Len Brown,
	Pavel Machek, list, linux-iio, linux-kernel, linux-mips,
	linux-mmc, linux-pm
In-Reply-To: <20220105101106.00005ae0@Huawei.com>



Le mer., janv. 5 2022 at 10:11:06 +0000, Jonathan Cameron 
<Jonathan.Cameron@Huawei.com> a écrit :
> On Tue, 4 Jan 2022 21:42:14 +0000
> Paul Cercueil <paul@crapouillou.net> wrote:
> 
>>  Use the new EXPORT_RUNTIME_DEV_PM_OPS() macro. It allows the 
>> underlying
>>  dev_pm_ops struct as well as the suspend/resume callbacks to be 
>> detected
>>  as dead code in the case where CONFIG_PM is disabled, without 
>> having to
>>  wrap everything inside #ifdef CONFIG_PM guards.
>> 
>>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> 
> Hohum - bad choice of example. These shouldn't be exported as only 
> used within
> the same module ;)  No one ever wrote the other bus interface (and 
> the part is
> ancient so I can't see it happening now) hence whilst there are two 
> files, they
> are built into a single module.  There is a comment about this in the 
> Makefile.

Ok - then I'll drop this patch and try to find a better driver to 
showcase this.

Cheers,
-Paul

>>  ---
>>   drivers/iio/gyro/mpu3050-core.c | 13 ++++---------
>>   drivers/iio/gyro/mpu3050-i2c.c  |  2 +-
>>   2 files changed, 5 insertions(+), 10 deletions(-)
>> 
>>  diff --git a/drivers/iio/gyro/mpu3050-core.c 
>> b/drivers/iio/gyro/mpu3050-core.c
>>  index ea387efab62d..7d6721e268fe 100644
>>  --- a/drivers/iio/gyro/mpu3050-core.c
>>  +++ b/drivers/iio/gyro/mpu3050-core.c
>>  @@ -1281,7 +1281,6 @@ int mpu3050_common_remove(struct device *dev)
>>   }
>>   EXPORT_SYMBOL(mpu3050_common_remove);
>> 
>>  -#ifdef CONFIG_PM
>>   static int mpu3050_runtime_suspend(struct device *dev)
>>   {
>>   	return mpu3050_power_down(iio_priv(dev_get_drvdata(dev)));
>>  @@ -1291,15 +1290,11 @@ static int mpu3050_runtime_resume(struct 
>> device *dev)
>>   {
>>   	return mpu3050_power_up(iio_priv(dev_get_drvdata(dev)));
>>   }
>>  -#endif /* CONFIG_PM */
>> 
>>  -const struct dev_pm_ops mpu3050_dev_pm_ops = {
>>  -	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
>>  -				pm_runtime_force_resume)
>>  -	SET_RUNTIME_PM_OPS(mpu3050_runtime_suspend,
>>  -			   mpu3050_runtime_resume, NULL)
>>  -};
>>  -EXPORT_SYMBOL(mpu3050_dev_pm_ops);
>>  +EXPORT_RUNTIME_DEV_PM_OPS(mpu3050_dev_pm_ops,
>>  +			  mpu3050_runtime_suspend,
>>  +			  mpu3050_runtime_resume,
>>  +			  NULL);
>> 
>>   MODULE_AUTHOR("Linus Walleij");
>>   MODULE_DESCRIPTION("MPU3050 gyroscope driver");
>>  diff --git a/drivers/iio/gyro/mpu3050-i2c.c 
>> b/drivers/iio/gyro/mpu3050-i2c.c
>>  index ef5bcbc4b45b..820133cad601 100644
>>  --- a/drivers/iio/gyro/mpu3050-i2c.c
>>  +++ b/drivers/iio/gyro/mpu3050-i2c.c
>>  @@ -114,7 +114,7 @@ static struct i2c_driver mpu3050_i2c_driver = {
>>   	.driver = {
>>   		.of_match_table = mpu3050_i2c_of_match,
>>   		.name = "mpu3050-i2c",
>>  -		.pm = &mpu3050_dev_pm_ops,
>>  +		.pm = pm_ptr(&mpu3050_dev_pm_ops),
>>   	},
>>   };
>>   module_i2c_driver(mpu3050_i2c_driver);
> 



^ permalink raw reply

* Re: [PATCH 0/8] DEV_PM_OPS macros rework
From: Jonathan Cameron @ 2022-01-05 10:17 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Rafael J . Wysocki, Ulf Hansson, Jonathan Cameron,
	Lars-Peter Clausen, Linus Walleij, Arnd Bergmann, Len Brown,
	Pavel Machek, list, linux-iio, linux-kernel, linux-mips,
	linux-mmc, linux-pm
In-Reply-To: <20220104214214.198843-1-paul@crapouillou.net>

On Tue, 4 Jan 2022 21:42:06 +0000
Paul Cercueil <paul@crapouillou.net> wrote:

> Hi,
> 
> This set of commits rework a bit the *_DEV_PM_OPS() macros that were
> introduced recently.
> 
> - Remove the DEFINE_UNIVERSAL_DEV_PM_OPS() macro, since I highly doubt
>   anything is going to use it. The macro it replaces
>   (UNIVERSAL_DEV_PM_OPS) seems to only be used incorrectly in code that
>   hasn't been updated in ages.
> 
> - Remove the static qualifier in DEFINE_SIMPLE_DEV_PM_OPS, so that the
>   macro is more in line with what's done elsewhere in the kernel.
> 
> - Add a DEFINE_RUNTIME_DEV_PM_OPS() macro, for use with drivers that use
>   runtime PM, and use runtime_pm_force_suspend/runtime_pm_force_resume
>   as their system sleep callbacks.
> 
> - Add EXPORT_*_DEV_PM_OPS macros, which can be used for when the
>   underlying dev_pm_ops is to be exported. With CONFIG_PM set, the
>   symbol is exported as you would expect. With CONFIG_PM disabled, the
>   dev_pm_ops is garbage-collected along with the suspend/resume
>   callbacks.
> 
> - Update the two places which used DEFINE_SIMPLE_DEV_PM_OPS, to add back
>   the "static" qualifier that was stripped from the macro.
> 
> - Update one driver to use EXPORT_RUNTIME_DEV_PM_OPS(), just to showcase
>   how to use this macro in the case where a dev_pm_ops is to be
>   exported.
>   Note that the driver itself is GPL, and the symbol is only used within
>   a GPL driver, so I would assume the symbol would be exported as GPL.
>   But it was not the case in the original code, so I did not change the
>   behaviour.
> 
> Feedback welcome.

Comments on individual patches (in particular bad pick for that final example ;)

Given how late we are in the cycle, I'd argue we 'need' patches 2 (+ 5,6 which
should probably be all one patch to avoid introducing then fixing a warning in
different patches).  The others could wait for the following cycle if needed.

It would slow down a few patches I have queued up behind this, but most of them
would be unaffected so it wouldn't annoy me too much. Can't speak for others
however!

Jonathan

> 
> Cheers,
> -Paul
> 
> 
> Paul Cercueil (8):
>   PM: core: Remove DEFINE_UNIVERSAL_DEV_PM_OPS() macro
>   PM: core: Remove static qualifier in DEFINE_SIMPLE_DEV_PM_OPS macro
>   PM: core: Add EXPORT[_GPL]_SIMPLE_DEV_PM_OPS macros
>   PM: runtime: Add DEFINE_RUNTIME_DEV_PM_OPS() macro
>   PM: runtime: Add EXPORT[_GPL]_RUNTIME_DEV_PM_OPS macros
>   mmc: mxc: Make dev_pm_ops struct static
>   mmc: jz4740: Make dev_pm_ops struct static
>   iio: gyro: mpu3050: Use new PM macros
> 
>  drivers/iio/gyro/mpu3050-core.c | 13 +++-----
>  drivers/iio/gyro/mpu3050-i2c.c  |  2 +-
>  drivers/mmc/host/jz4740_mmc.c   |  4 +--
>  drivers/mmc/host/mxcmmc.c       |  2 +-
>  include/linux/pm.h              | 53 +++++++++++++++++++++++----------
>  include/linux/pm_runtime.h      | 21 +++++++++++++
>  6 files changed, 67 insertions(+), 28 deletions(-)
> 


^ permalink raw reply

* [PATCH] iommu/arm-smmu: Add missing pm_runtime_disable() in qcom_iommu_device_probe
From: Miaoqian Lin @ 2022-01-05 10:16 UTC (permalink / raw)
  Cc: linmq006, Rob Clark, Will Deacon, Robin Murphy, Joerg Roedel,
	iommu, linux-arm-msm, linux-arm-kernel, linux-kernel

If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable().
Add missing pm_runtime_disable() for error handling.

Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 drivers/iommu/arm/arm-smmu/qcom_iommu.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/iommu/arm/arm-smmu/qcom_iommu.c b/drivers/iommu/arm/arm-smmu/qcom_iommu.c
index b91874cb6cf3..2f227bc88bd9 100644
--- a/drivers/iommu/arm/arm-smmu/qcom_iommu.c
+++ b/drivers/iommu/arm/arm-smmu/qcom_iommu.c
@@ -827,20 +827,20 @@ static int qcom_iommu_device_probe(struct platform_device *pdev)
 	ret = devm_of_platform_populate(dev);
 	if (ret) {
 		dev_err(dev, "Failed to populate iommu contexts\n");
-		return ret;
+		goto err_pm_disable;
 	}
 
 	ret = iommu_device_sysfs_add(&qcom_iommu->iommu, dev, NULL,
 				     dev_name(dev));
 	if (ret) {
 		dev_err(dev, "Failed to register iommu in sysfs\n");
-		return ret;
+		goto err_pm_disable;
 	}
 
 	ret = iommu_device_register(&qcom_iommu->iommu, &qcom_iommu_ops, dev);
 	if (ret) {
 		dev_err(dev, "Failed to register iommu\n");
-		return ret;
+		goto err_pm_disable;
 	}
 
 	bus_set_iommu(&platform_bus_type, &qcom_iommu_ops);
@@ -852,6 +852,10 @@ static int qcom_iommu_device_probe(struct platform_device *pdev)
 	}
 
 	return 0;
+
+err_pm_disable:
+	pm_runtime_disable(dev);
+	return ret;
 }
 
 static int qcom_iommu_device_remove(struct platform_device *pdev)
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related

* [PATCH] ARM: dts: aspeed: Add ASRock ROMED8HM3 BMC
From: Zev Weiss @ 2022-01-05 10:17 UTC (permalink / raw)
  To: linux-arm-kernel, linux-aspeed
  Cc: openbmc, linux-kernel, devicetree, Arnd Bergmann, Olof Johansson,
	Rob Herring, Joel Stanley, Andrew Jeffery, Neil Horman,
	Anthony Jenkins, Zev Weiss

This is a half-width, single-socket Epyc server board with an AST2500
BMC.  This device tree is sufficient for basic OpenBMC functionality,
but we'll need to add a few more devices (as driver support becomes
available) before it's fully usable.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
---
 arch/arm/boot/dts/Makefile                    |   1 +
 .../boot/dts/aspeed-bmc-asrock-romed8hm3.dts  | 259 ++++++++++++++++++
 2 files changed, 260 insertions(+)
 create mode 100644 arch/arm/boot/dts/aspeed-bmc-asrock-romed8hm3.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 0de64f237cd8..4008d2143b44 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1481,6 +1481,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-arm-centriq2400-rep.dtb \
 	aspeed-bmc-arm-stardragon4800-rep2.dtb \
 	aspeed-bmc-asrock-e3c246d4i.dtb \
+	aspeed-bmc-asrock-romed8hm3.dtb \
 	aspeed-bmc-bytedance-g220a.dtb \
 	aspeed-bmc-facebook-cloudripper.dtb \
 	aspeed-bmc-facebook-cmm.dtb \
diff --git a/arch/arm/boot/dts/aspeed-bmc-asrock-romed8hm3.dts b/arch/arm/boot/dts/aspeed-bmc-asrock-romed8hm3.dts
new file mode 100644
index 000000000000..e71ccfd1df63
--- /dev/null
+++ b/arch/arm/boot/dts/aspeed-bmc-asrock-romed8hm3.dts
@@ -0,0 +1,259 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+#include "aspeed-g5.dtsi"
+#include <dt-bindings/gpio/aspeed-gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/{
+	model = "ASRock ROMED8HM3 BMC v1.00";
+	compatible = "asrock,romed8hm3-bmc", "aspeed,ast2500";
+
+	aliases {
+		serial4 = &uart5;
+	};
+
+	chosen {
+		stdout-path = &uart5;
+		bootargs = "console=tty0 console=ttyS4,115200 earlycon";
+	};
+
+	memory@80000000 {
+		reg = <0x80000000 0x20000000>;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		heartbeat {
+			gpios = <&gpio ASPEED_GPIO(H, 6) GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "timer";
+		};
+
+		system-fault {
+			gpios = <&gpio ASPEED_GPIO(Z, 2) GPIO_ACTIVE_LOW>;
+			panic-indicator;
+		};
+	};
+
+	iio-hwmon {
+		compatible = "iio-hwmon";
+		io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>,
+			<&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>,
+			<&adc 8>, <&adc 9>, <&adc 10>, <&adc 11>,
+			<&adc 12>, <&adc 13>, <&adc 14>, <&adc 15>;
+	};
+};
+
+&fmc {
+	status = "okay";
+	flash@0 {
+		status = "okay";
+		m25p,fast-read;
+		label = "bmc";
+		spi-max-frequency = <100000000>; /* 100 MHz */
+#include "openbmc-flash-layout-64.dtsi"
+	};
+};
+
+&uart5 {
+	status = "okay";
+};
+
+&vuart {
+	status = "okay";
+	aspeed,lpc-io-reg = <0x2f8>;
+	aspeed,lpc-interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+};
+
+&mac0 {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>;
+};
+
+&i2c0 {
+	status = "okay";
+
+	/* inlet temp sensor */
+	w83773g@4c {
+		compatible = "nuvoton,w83773g";
+		reg = <0x4c>;
+	};
+};
+
+&i2c1 {
+	status = "okay";
+};
+
+&i2c2 {
+	status = "okay";
+
+	/* IPB temp sensor */
+	w83773g@4c {
+		compatible = "nuvoton,w83773g";
+		reg = <0x4c>;
+	};
+
+	/* IPB PMIC */
+	lm25066@40 {
+		compatible = "lm25066";
+		reg = <0x40>;
+	};
+
+	/* 12VSB PMIC */
+	lm25066@41 {
+		compatible = "lm25066";
+		reg = <0x41>;
+	};
+};
+
+&i2c4 {
+	status = "okay";
+};
+
+&i2c5 {
+	status = "okay";
+};
+
+&i2c6 {
+	status = "okay";
+};
+
+&i2c7 {
+	status = "okay";
+
+	/* Baseboard FRU eeprom */
+	eeprom@50 {
+		compatible = "st,24c128", "atmel,24c128";
+		reg = <0x50>;
+		pagesize = <16>;
+	};
+};
+
+&i2c8 {
+	status = "okay";
+};
+
+&i2c9 {
+	status = "okay";
+};
+
+&video {
+	status = "okay";
+};
+
+&vhub {
+	status = "okay";
+};
+
+&lpc_ctrl {
+	status = "okay";
+};
+
+&lpc_snoop {
+	status = "okay";
+	snoop-ports = <0x80>;
+};
+
+&kcs3 {
+	status = "okay";
+	aspeed,lpc-io-reg = <0xca2>;
+};
+
+&pwm_tacho {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_pwm3_default
+		&pinctrl_pwm4_default
+		&pinctrl_pwm5_default
+		&pinctrl_pwm6_default>;
+
+	fan@3 {
+		reg = <0x03>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x03 0x0b>;
+	};
+
+	fan@4 {
+		reg = <0x04>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x04 0x0c>;
+	};
+
+	fan@5 {
+		reg = <0x05>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x05 0x0d>;
+	};
+
+	fan@6 {
+		reg = <0x06>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x06 0x0e>;
+	};
+};
+
+&gpio {
+	status = "okay";
+	gpio-line-names =
+		/*  A */ "LOCATORLED_STATUS_N", "BMC_MAC2_INTB", "NMI_BTN_N", "BMC_NMI",
+			"", "", "", "",
+		/*  B */ "DDR_MEM_TEMP", "", "", "", "", "", "", "",
+		/*  C */ "", "", "", "", "PCIE_HP_SEL_N", "PCIE_SATA_SEL_N", "LOCATORBTN", "",
+		/*  D */ "BMC_PSIN", "BMC_PSOUT", "BMC_RESETCON", "RESETCON",
+			"", "", "", "PSU_FAN_FAIL_N",
+		/*  E */ "", "", "", "", "", "", "", "",
+		/*  F */ "NIC_PWR_GOOD", "PRSNTB0", "PRSNTB1", "PRSNTB2",
+			"PRSNTB3", "", "3VSB_PCIE1_PG", "12V_PCIE1_PG",
+		/*  G */ "HWM_BAT_EN", "CHASSIS_ID0", "CHASSIS_ID1", "CHASSIS_ID2",
+			"BMC_ALERT1_N_R", "BMC_ALERT2_N_R", "BMC_ALERT3_N", "BMC_ALERT4_N",
+		/*  H */ "X24_C1_PRSNT", "X24_C2_PRSNT", "X24_C3_PRSNT", "FM_MEM_THERM_EVENT_BMC_R_N",
+			"FACMODE", "BMC_RTCRST", "BMC_HB_LED_N", "BMC_CASEOPEN",
+		/*  I */ "", "", "", "", "", "", "", "",
+		/*  J */ "BMC_READY", "BMC_PCH_BIOS_CS_N", "", "P0_MA_DDR_QS_CS_N",
+			"", "", "", "",
+		/*  K */ "", "", "", "", "", "", "", "",
+		/*  L */ "", "", "", "", "", "", "", "",
+		/*  M */ "", "", "MEZZ_PWRBRK_N", "OCP_HP_RST_EN",
+			"MAIN_PWR_EN_G", "BMC_MAIN_EN", "AUX_PWR_EN_G", "BMC_AUX_EN",
+		/*  N */ "", "", "", "", "", "", "", "",
+		/*  O */ "", "", "", "", "", "", "", "",
+		/*  P */ "", "", "", "", "", "", "", "",
+		/*  Q */ "", "", "", "",
+			"BMC_SMB_PRESENT_1_N", "BMC_SMB_PRESENT_2_N",
+			"BMC_SMB_PRESENT_3_N", "BMC_PCIE_WAKE_N",
+		/*  R */ "", "", "THERMALTRIP_CLEAR_N", "", "", "", "", "",
+		/*  S */ "", "", "", "", "", "", "", "",
+		/*  T */ "", "", "", "", "", "", "", "",
+		/*  U */ "", "", "", "", "", "", "", "",
+		/*  V */ "", "", "", "", "", "", "", "",
+		/*  W */ "", "", "", "", "", "", "", "",
+		/*  X */ "", "", "", "", "", "", "", "",
+		/*  Y */ "SLP_S3", "SLP_S4_S5", "NODE_ID_1", "NODE_ID_2", "", "", "", "",
+		/*  Z */ "", "", "SYSTEM_FAULT_LED_N", "FAST_THROTTLE_N",
+			"", "", "", "",
+		/* AA */ "FM_CPU0_IBMC_THERMTRIP_N", "", "PROCHOT_L_G", "",
+			"", "", "", "",
+		/* AB */ "BMC_FORCE_SELFREFRESH", "PWRGD_OUT", "", "IRQ_BMC_PCH_SMI_LPC_N",
+			"", "", "", "",
+		/* AC */ "", "", "", "", "", "", "", "";
+};
+
+&adc {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_adc0_default
+		&pinctrl_adc1_default
+		&pinctrl_adc2_default
+		&pinctrl_adc3_default
+		&pinctrl_adc4_default
+		&pinctrl_adc5_default
+		&pinctrl_adc6_default
+		&pinctrl_adc7_default
+		&pinctrl_adc8_default
+		&pinctrl_adc9_default
+		&pinctrl_adc10_default
+		&pinctrl_adc11_default
+		&pinctrl_adc12_default
+		&pinctrl_adc13_default
+		&pinctrl_adc14_default
+		&pinctrl_adc15_default>;
+};
-- 
2.34.1


^ permalink raw reply related

* Re: [PATCH] livepatch: Avoid CPU hogging with cond_resched
From: Miroslav Benes @ 2022-01-05 10:17 UTC (permalink / raw)
  To: David Vernet
  Cc: live-patching, linux-kernel, jpoimboe, pmladek, jikos,
	joe.lawrence
In-Reply-To: <20211229215646.830451-1-void@manifault.com>

On Wed, 29 Dec 2021, David Vernet wrote:

> When initializing a 'struct klp_object' in klp_init_object_loaded(), and
> performing relocations in klp_resolve_symbols(), klp_find_object_symbol()
> is invoked to look up the address of a symbol in an already-loaded module
> (or vmlinux). This, in turn, calls kallsyms_on_each_symbol() or
> module_kallsyms_on_each_symbol() to find the address of the symbol that is
> being patched.
> 
> It turns out that symbol lookups often take up the most CPU time when
> enabling and disabling a patch, and may hog the CPU and cause other tasks
> on that CPU's runqueue to starve -- even in paths where interrupts are
> enabled.  For example, under certain workloads, enabling a KLP patch with
> many objects or functions may cause ksoftirqd to be starved, and thus for
> interrupts to be backlogged and delayed. This may end up causing TCP
> retransmits on the host where the KLP patch is being applied, and in
> general, may cause any interrupts serviced by softirqd to be delayed while
> the patch is being applied.
> 
> So as to ensure that kallsyms_on_each_symbol() does not end up hogging the
> CPU, this patch adds a call to cond_resched() in kallsyms_on_each_symbol()
> and module_kallsyms_on_each_symbol(), which are invoked when doing a symbol
> lookup in vmlinux and a module respectively.  Without this patch, if a
> live-patch is applied on a 36-core Intel host with heavy TCP traffic, a
> ~10x spike is observed in TCP retransmits while the patch is being applied.
> Additionally, collecting sched events with perf indicates that ksoftirqd is
> awakened ~1.3 seconds before it's eventually scheduled.  With the patch, no
> increase in TCP retransmit events is observed, and ksoftirqd is scheduled
> shortly after it's awakened.
> 
> Signed-off-by: David Vernet <void@manifault.com>

Acked-by: Miroslav Benes <mbenes@suse.cz>

I had similar ideas Petr mentioned elsewhere, but I, also, have no strong 
opinion about it. Especially when livepatch is the only user of the said 
interface.

M

^ permalink raw reply

* [PATCH] ARM: dts: aspeed: Add ASRock ROMED8HM3 BMC
From: Zev Weiss @ 2022-01-05 10:17 UTC (permalink / raw)
  To: linux-aspeed

This is a half-width, single-socket Epyc server board with an AST2500
BMC.  This device tree is sufficient for basic OpenBMC functionality,
but we'll need to add a few more devices (as driver support becomes
available) before it's fully usable.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
---
 arch/arm/boot/dts/Makefile                    |   1 +
 .../boot/dts/aspeed-bmc-asrock-romed8hm3.dts  | 259 ++++++++++++++++++
 2 files changed, 260 insertions(+)
 create mode 100644 arch/arm/boot/dts/aspeed-bmc-asrock-romed8hm3.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 0de64f237cd8..4008d2143b44 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1481,6 +1481,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-arm-centriq2400-rep.dtb \
 	aspeed-bmc-arm-stardragon4800-rep2.dtb \
 	aspeed-bmc-asrock-e3c246d4i.dtb \
+	aspeed-bmc-asrock-romed8hm3.dtb \
 	aspeed-bmc-bytedance-g220a.dtb \
 	aspeed-bmc-facebook-cloudripper.dtb \
 	aspeed-bmc-facebook-cmm.dtb \
diff --git a/arch/arm/boot/dts/aspeed-bmc-asrock-romed8hm3.dts b/arch/arm/boot/dts/aspeed-bmc-asrock-romed8hm3.dts
new file mode 100644
index 000000000000..e71ccfd1df63
--- /dev/null
+++ b/arch/arm/boot/dts/aspeed-bmc-asrock-romed8hm3.dts
@@ -0,0 +1,259 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+#include "aspeed-g5.dtsi"
+#include <dt-bindings/gpio/aspeed-gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/{
+	model = "ASRock ROMED8HM3 BMC v1.00";
+	compatible = "asrock,romed8hm3-bmc", "aspeed,ast2500";
+
+	aliases {
+		serial4 = &uart5;
+	};
+
+	chosen {
+		stdout-path = &uart5;
+		bootargs = "console=tty0 console=ttyS4,115200 earlycon";
+	};
+
+	memory at 80000000 {
+		reg = <0x80000000 0x20000000>;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		heartbeat {
+			gpios = <&gpio ASPEED_GPIO(H, 6) GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "timer";
+		};
+
+		system-fault {
+			gpios = <&gpio ASPEED_GPIO(Z, 2) GPIO_ACTIVE_LOW>;
+			panic-indicator;
+		};
+	};
+
+	iio-hwmon {
+		compatible = "iio-hwmon";
+		io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>,
+			<&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>,
+			<&adc 8>, <&adc 9>, <&adc 10>, <&adc 11>,
+			<&adc 12>, <&adc 13>, <&adc 14>, <&adc 15>;
+	};
+};
+
+&fmc {
+	status = "okay";
+	flash at 0 {
+		status = "okay";
+		m25p,fast-read;
+		label = "bmc";
+		spi-max-frequency = <100000000>; /* 100 MHz */
+#include "openbmc-flash-layout-64.dtsi"
+	};
+};
+
+&uart5 {
+	status = "okay";
+};
+
+&vuart {
+	status = "okay";
+	aspeed,lpc-io-reg = <0x2f8>;
+	aspeed,lpc-interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+};
+
+&mac0 {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>;
+};
+
+&i2c0 {
+	status = "okay";
+
+	/* inlet temp sensor */
+	w83773g at 4c {
+		compatible = "nuvoton,w83773g";
+		reg = <0x4c>;
+	};
+};
+
+&i2c1 {
+	status = "okay";
+};
+
+&i2c2 {
+	status = "okay";
+
+	/* IPB temp sensor */
+	w83773g at 4c {
+		compatible = "nuvoton,w83773g";
+		reg = <0x4c>;
+	};
+
+	/* IPB PMIC */
+	lm25066 at 40 {
+		compatible = "lm25066";
+		reg = <0x40>;
+	};
+
+	/* 12VSB PMIC */
+	lm25066 at 41 {
+		compatible = "lm25066";
+		reg = <0x41>;
+	};
+};
+
+&i2c4 {
+	status = "okay";
+};
+
+&i2c5 {
+	status = "okay";
+};
+
+&i2c6 {
+	status = "okay";
+};
+
+&i2c7 {
+	status = "okay";
+
+	/* Baseboard FRU eeprom */
+	eeprom at 50 {
+		compatible = "st,24c128", "atmel,24c128";
+		reg = <0x50>;
+		pagesize = <16>;
+	};
+};
+
+&i2c8 {
+	status = "okay";
+};
+
+&i2c9 {
+	status = "okay";
+};
+
+&video {
+	status = "okay";
+};
+
+&vhub {
+	status = "okay";
+};
+
+&lpc_ctrl {
+	status = "okay";
+};
+
+&lpc_snoop {
+	status = "okay";
+	snoop-ports = <0x80>;
+};
+
+&kcs3 {
+	status = "okay";
+	aspeed,lpc-io-reg = <0xca2>;
+};
+
+&pwm_tacho {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_pwm3_default
+		&pinctrl_pwm4_default
+		&pinctrl_pwm5_default
+		&pinctrl_pwm6_default>;
+
+	fan at 3 {
+		reg = <0x03>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x03 0x0b>;
+	};
+
+	fan at 4 {
+		reg = <0x04>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x04 0x0c>;
+	};
+
+	fan at 5 {
+		reg = <0x05>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x05 0x0d>;
+	};
+
+	fan at 6 {
+		reg = <0x06>;
+		aspeed,fan-tach-ch = /bits/ 8 <0x06 0x0e>;
+	};
+};
+
+&gpio {
+	status = "okay";
+	gpio-line-names =
+		/*  A */ "LOCATORLED_STATUS_N", "BMC_MAC2_INTB", "NMI_BTN_N", "BMC_NMI",
+			"", "", "", "",
+		/*  B */ "DDR_MEM_TEMP", "", "", "", "", "", "", "",
+		/*  C */ "", "", "", "", "PCIE_HP_SEL_N", "PCIE_SATA_SEL_N", "LOCATORBTN", "",
+		/*  D */ "BMC_PSIN", "BMC_PSOUT", "BMC_RESETCON", "RESETCON",
+			"", "", "", "PSU_FAN_FAIL_N",
+		/*  E */ "", "", "", "", "", "", "", "",
+		/*  F */ "NIC_PWR_GOOD", "PRSNTB0", "PRSNTB1", "PRSNTB2",
+			"PRSNTB3", "", "3VSB_PCIE1_PG", "12V_PCIE1_PG",
+		/*  G */ "HWM_BAT_EN", "CHASSIS_ID0", "CHASSIS_ID1", "CHASSIS_ID2",
+			"BMC_ALERT1_N_R", "BMC_ALERT2_N_R", "BMC_ALERT3_N", "BMC_ALERT4_N",
+		/*  H */ "X24_C1_PRSNT", "X24_C2_PRSNT", "X24_C3_PRSNT", "FM_MEM_THERM_EVENT_BMC_R_N",
+			"FACMODE", "BMC_RTCRST", "BMC_HB_LED_N", "BMC_CASEOPEN",
+		/*  I */ "", "", "", "", "", "", "", "",
+		/*  J */ "BMC_READY", "BMC_PCH_BIOS_CS_N", "", "P0_MA_DDR_QS_CS_N",
+			"", "", "", "",
+		/*  K */ "", "", "", "", "", "", "", "",
+		/*  L */ "", "", "", "", "", "", "", "",
+		/*  M */ "", "", "MEZZ_PWRBRK_N", "OCP_HP_RST_EN",
+			"MAIN_PWR_EN_G", "BMC_MAIN_EN", "AUX_PWR_EN_G", "BMC_AUX_EN",
+		/*  N */ "", "", "", "", "", "", "", "",
+		/*  O */ "", "", "", "", "", "", "", "",
+		/*  P */ "", "", "", "", "", "", "", "",
+		/*  Q */ "", "", "", "",
+			"BMC_SMB_PRESENT_1_N", "BMC_SMB_PRESENT_2_N",
+			"BMC_SMB_PRESENT_3_N", "BMC_PCIE_WAKE_N",
+		/*  R */ "", "", "THERMALTRIP_CLEAR_N", "", "", "", "", "",
+		/*  S */ "", "", "", "", "", "", "", "",
+		/*  T */ "", "", "", "", "", "", "", "",
+		/*  U */ "", "", "", "", "", "", "", "",
+		/*  V */ "", "", "", "", "", "", "", "",
+		/*  W */ "", "", "", "", "", "", "", "",
+		/*  X */ "", "", "", "", "", "", "", "",
+		/*  Y */ "SLP_S3", "SLP_S4_S5", "NODE_ID_1", "NODE_ID_2", "", "", "", "",
+		/*  Z */ "", "", "SYSTEM_FAULT_LED_N", "FAST_THROTTLE_N",
+			"", "", "", "",
+		/* AA */ "FM_CPU0_IBMC_THERMTRIP_N", "", "PROCHOT_L_G", "",
+			"", "", "", "",
+		/* AB */ "BMC_FORCE_SELFREFRESH", "PWRGD_OUT", "", "IRQ_BMC_PCH_SMI_LPC_N",
+			"", "", "", "",
+		/* AC */ "", "", "", "", "", "", "", "";
+};
+
+&adc {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_adc0_default
+		&pinctrl_adc1_default
+		&pinctrl_adc2_default
+		&pinctrl_adc3_default
+		&pinctrl_adc4_default
+		&pinctrl_adc5_default
+		&pinctrl_adc6_default
+		&pinctrl_adc7_default
+		&pinctrl_adc8_default
+		&pinctrl_adc9_default
+		&pinctrl_adc10_default
+		&pinctrl_adc11_default
+		&pinctrl_adc12_default
+		&pinctrl_adc13_default
+		&pinctrl_adc14_default
+		&pinctrl_adc15_default>;
+};
-- 
2.34.1


^ permalink raw reply related

* Re: [PATCH v4 2/2] linux-user: call set/getscheduler set/getparam directly
From: Laurent Vivier @ 2022-01-05 10:14 UTC (permalink / raw)
  To: Tonis Tiigi, qemu-devel
In-Reply-To: <20220105041819.24160-3-tonistiigi@gmail.com>

Le 05/01/2022 à 05:18, Tonis Tiigi a écrit :
> There seems to be difference in syscall and libc definition of these
> methods and therefore musl does not implement them (1e21e78bf7). Call
> syscall directly to ensure the behavior of the libc of user application,
> not the libc that was used to build QEMU.
> 
> Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
> ---
>   linux-user/syscall.c      | 34 ++++++++++++++++++++++++----------
>   linux-user/syscall_defs.h |  4 ++++
>   2 files changed, 28 insertions(+), 10 deletions(-)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 1b8415c8a3..30962155a6 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -359,6 +359,17 @@ _syscall4(int, sys_sched_getattr, pid_t, pid, struct sched_attr *, attr,
>   #define __NR_sys_sched_setattr __NR_sched_setattr
>   _syscall3(int, sys_sched_setattr, pid_t, pid, struct sched_attr *, attr,
>             unsigned int, flags);
> +#define __NR_sys_sched_getscheduler __NR_sched_getscheduler
> +_syscall1(int, sys_sched_getscheduler, pid_t, pid);
> +#define __NR_sys_sched_setscheduler __NR_sched_setscheduler
> +_syscall3(int, sys_sched_setscheduler, pid_t, pid, int, policy,
> +          const struct sched_param *, param);
> +#define __NR_sys_sched_getparam __NR_sched_getparam
> +_syscall2(int, sys_sched_getparam, pid_t, pid,
> +          struct sched_param *, param);
> +#define __NR_sys_sched_setparam __NR_sched_setparam
> +_syscall2(int, sys_sched_setparam, pid_t, pid,
> +          const struct sched_param *, param);
>   #define __NR_sys_getcpu __NR_getcpu
>   _syscall3(int, sys_getcpu, unsigned *, cpu, unsigned *, node, void *, tcache);
>   _syscall4(int, reboot, int, magic1, int, magic2, unsigned int, cmd,
> @@ -10587,30 +10598,32 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
>           return ret;
>       case TARGET_NR_sched_setparam:
>           {
> -            struct sched_param *target_schp;
> +            struct target_sched_param *target_schp;
>               struct sched_param schp;
>   
>               if (arg2 == 0) {
>                   return -TARGET_EINVAL;
>               }
> -            if (!lock_user_struct(VERIFY_READ, target_schp, arg2, 1))
> +            if (!lock_user_struct(VERIFY_READ, target_schp, arg2, 1)) {
>                   return -TARGET_EFAULT;
> +            }
>               schp.sched_priority = tswap32(target_schp->sched_priority);
>               unlock_user_struct(target_schp, arg2, 0);
> -            return get_errno(sched_setparam(arg1, &schp));
> +            return get_errno(sys_sched_setparam(arg1, &schp));
>           }
>       case TARGET_NR_sched_getparam:
>           {
> -            struct sched_param *target_schp;
> +            struct target_sched_param *target_schp;
>               struct sched_param schp;
>   
>               if (arg2 == 0) {
>                   return -TARGET_EINVAL;
>               }
> -            ret = get_errno(sched_getparam(arg1, &schp));
> +            ret = get_errno(sys_sched_getparam(arg1, &schp));
>               if (!is_error(ret)) {
> -                if (!lock_user_struct(VERIFY_WRITE, target_schp, arg2, 0))
> +                if (!lock_user_struct(VERIFY_WRITE, target_schp, arg2, 0)) {
>                       return -TARGET_EFAULT;
> +                }
>                   target_schp->sched_priority = tswap32(schp.sched_priority);
>                   unlock_user_struct(target_schp, arg2, 1);
>               }
> @@ -10618,19 +10631,20 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
>           return ret;
>       case TARGET_NR_sched_setscheduler:
>           {
> -            struct sched_param *target_schp;
> +            struct target_sched_param *target_schp;
>               struct sched_param schp;
>               if (arg3 == 0) {
>                   return -TARGET_EINVAL;
>               }
> -            if (!lock_user_struct(VERIFY_READ, target_schp, arg3, 1))
> +            if (!lock_user_struct(VERIFY_READ, target_schp, arg3, 1)) {
>                   return -TARGET_EFAULT;
> +            }
>               schp.sched_priority = tswap32(target_schp->sched_priority);
>               unlock_user_struct(target_schp, arg3, 0);
> -            return get_errno(sched_setscheduler(arg1, arg2, &schp));
> +            return get_errno(sys_sched_setscheduler(arg1, arg2, &schp));
>           }
>       case TARGET_NR_sched_getscheduler:
> -        return get_errno(sched_getscheduler(arg1));
> +        return get_errno(sys_sched_getscheduler(arg1));
>       case TARGET_NR_sched_getattr:
>           {
>               struct target_sched_attr *target_scha;
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index 310d6ce8ad..28b9fe9a47 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -2928,4 +2928,8 @@ struct target_sched_attr {
>       abi_uint sched_util_max;
>   };
>   
> +struct target_sched_param {
> +    abi_int sched_priority;
> +};
> +
>   #endif

Reviewed-by: Laurent Vivier <laurent@vivier.eu>



^ permalink raw reply

* Re: [PATCH v5 0/6] PCI: imx6: refine codes and add compliance tests mode support
From: Greg KH @ 2022-01-05 10:15 UTC (permalink / raw)
  To: Richard Zhu
  Cc: l.stach, bhelgaas, broonie, lorenzo.pieralisi, jingoohan1,
	festevam, stable, linux-pci, linux-imx, linux-arm-kernel,
	linux-kernel, kernel
In-Reply-To: <1641368602-20401-1-git-send-email-hongxing.zhu@nxp.com>

On Wed, Jan 05, 2022 at 03:43:16PM +0800, Richard Zhu wrote:
> This series patches refine pci-imx6 driver and do the following changes.
> - Encapsulate the clock enable into one standalone function
> - Add the error propagation from host_init
> - Balance the usage of the regulator and clocks when link never came up
> - Add the compliance tests mode support
> 
> Main changes from v4 to v5:
> - Since i.MX8MM PCIe support had been merged. Based on Lorenzo's git repos,
>   rebase and resend the patch-set.
> 
> Main changes from v3 to v4:
> - Regarding Mark's comments, delete the regulator_is_enabled() check.
> - Squash #3 and #6 of v3 patch into #5 patch of v4 set.
> 
> Main changes from v2 to v3:
> - Add "Reviewed-by: Lucas Stach <l.stach@pengutronix.de>" tag into
>   first two patches.
> - Add a Fixes tag into #3 patch.
> - Split the #4 of v2 to two patches, one is clock disable codes move,
>   the other one is the acutal clock unbalance fix.
> - Add a new host_exit() callback into dw_pcie_host_ops, then it could be
>   invoked to handle the unbalance issue in the error handling after
>   host_init() function when link is down.
> - Add a new host_exit() callback for i.MX PCIe driver to handle this case
>   in the error handling after host_init.
> 
> Main changes from v1 to v2:
> Regarding Lucas' comments.
>   - Move the placement of the new imx6_pcie_clk_enable() to avoid the
>     forward declarition.
>   - Seperate the second patch of v1 patch-set to three patches.
>   - Use the module_param to replace the kernel command line.
> Regarding Bjorn's comments:
>   - Use the cover-letter for a multi-patch series.
>   - Correct the subject line, and refine the commit logs. For example,
>     remove the timestamp of the logs.
> 
> drivers/pci/controller/dwc/pci-imx6.c             | 197 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------
> drivers/pci/controller/dwc/pcie-designware-host.c |   5 ++-
> drivers/pci/controller/dwc/pcie-designware.h      |   1 +
> 3 files changed, 128 insertions(+), 75 deletions(-)
> 
> [PATCH v5 1/6] PCI: imx6: Encapsulate the clock enable into one
> [PATCH v5 2/6] PCI: imx6: Add the error propagation from host_init
> [PATCH v5 3/6] PCI: imx6: PCI: imx6: Move imx6_pcie_clk_disable()
> [PATCH v5 4/6] PCI: dwc: Add dw_pcie_host_ops.host_exit() callback
> [PATCH v5 5/6] PCI: imx6: Fix the regulator dump when link never came
> [PATCH v5 6/6] PCI: imx6: Add the compliance tests mode support

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply

* [PATCH] iommu/arm-smmu: Add missing pm_runtime_disable() in qcom_iommu_device_probe
From: Miaoqian Lin @ 2022-01-05 10:16 UTC (permalink / raw)
  Cc: linmq006, Rob Clark, Will Deacon, Robin Murphy, Joerg Roedel,
	iommu, linux-arm-msm, linux-arm-kernel, linux-kernel

If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable().
Add missing pm_runtime_disable() for error handling.

Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 drivers/iommu/arm/arm-smmu/qcom_iommu.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/iommu/arm/arm-smmu/qcom_iommu.c b/drivers/iommu/arm/arm-smmu/qcom_iommu.c
index b91874cb6cf3..2f227bc88bd9 100644
--- a/drivers/iommu/arm/arm-smmu/qcom_iommu.c
+++ b/drivers/iommu/arm/arm-smmu/qcom_iommu.c
@@ -827,20 +827,20 @@ static int qcom_iommu_device_probe(struct platform_device *pdev)
 	ret = devm_of_platform_populate(dev);
 	if (ret) {
 		dev_err(dev, "Failed to populate iommu contexts\n");
-		return ret;
+		goto err_pm_disable;
 	}
 
 	ret = iommu_device_sysfs_add(&qcom_iommu->iommu, dev, NULL,
 				     dev_name(dev));
 	if (ret) {
 		dev_err(dev, "Failed to register iommu in sysfs\n");
-		return ret;
+		goto err_pm_disable;
 	}
 
 	ret = iommu_device_register(&qcom_iommu->iommu, &qcom_iommu_ops, dev);
 	if (ret) {
 		dev_err(dev, "Failed to register iommu\n");
-		return ret;
+		goto err_pm_disable;
 	}
 
 	bus_set_iommu(&platform_bus_type, &qcom_iommu_ops);
@@ -852,6 +852,10 @@ static int qcom_iommu_device_probe(struct platform_device *pdev)
 	}
 
 	return 0;
+
+err_pm_disable:
+	pm_runtime_disable(dev);
+	return ret;
 }
 
 static int qcom_iommu_device_remove(struct platform_device *pdev)
-- 
2.17.1


^ permalink raw reply related

* Re: [PATCH v5 0/6] PCI: imx6: refine codes and add compliance tests mode support
From: Greg KH @ 2022-01-05 10:15 UTC (permalink / raw)
  To: Richard Zhu
  Cc: l.stach, bhelgaas, broonie, lorenzo.pieralisi, jingoohan1,
	festevam, stable, linux-pci, linux-imx, linux-arm-kernel,
	linux-kernel, kernel
In-Reply-To: <1641368602-20401-1-git-send-email-hongxing.zhu@nxp.com>

On Wed, Jan 05, 2022 at 03:43:16PM +0800, Richard Zhu wrote:
> This series patches refine pci-imx6 driver and do the following changes.
> - Encapsulate the clock enable into one standalone function
> - Add the error propagation from host_init
> - Balance the usage of the regulator and clocks when link never came up
> - Add the compliance tests mode support
> 
> Main changes from v4 to v5:
> - Since i.MX8MM PCIe support had been merged. Based on Lorenzo's git repos,
>   rebase and resend the patch-set.
> 
> Main changes from v3 to v4:
> - Regarding Mark's comments, delete the regulator_is_enabled() check.
> - Squash #3 and #6 of v3 patch into #5 patch of v4 set.
> 
> Main changes from v2 to v3:
> - Add "Reviewed-by: Lucas Stach <l.stach@pengutronix.de>" tag into
>   first two patches.
> - Add a Fixes tag into #3 patch.
> - Split the #4 of v2 to two patches, one is clock disable codes move,
>   the other one is the acutal clock unbalance fix.
> - Add a new host_exit() callback into dw_pcie_host_ops, then it could be
>   invoked to handle the unbalance issue in the error handling after
>   host_init() function when link is down.
> - Add a new host_exit() callback for i.MX PCIe driver to handle this case
>   in the error handling after host_init.
> 
> Main changes from v1 to v2:
> Regarding Lucas' comments.
>   - Move the placement of the new imx6_pcie_clk_enable() to avoid the
>     forward declarition.
>   - Seperate the second patch of v1 patch-set to three patches.
>   - Use the module_param to replace the kernel command line.
> Regarding Bjorn's comments:
>   - Use the cover-letter for a multi-patch series.
>   - Correct the subject line, and refine the commit logs. For example,
>     remove the timestamp of the logs.
> 
> drivers/pci/controller/dwc/pci-imx6.c             | 197 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------
> drivers/pci/controller/dwc/pcie-designware-host.c |   5 ++-
> drivers/pci/controller/dwc/pcie-designware.h      |   1 +
> 3 files changed, 128 insertions(+), 75 deletions(-)
> 
> [PATCH v5 1/6] PCI: imx6: Encapsulate the clock enable into one
> [PATCH v5 2/6] PCI: imx6: Add the error propagation from host_init
> [PATCH v5 3/6] PCI: imx6: PCI: imx6: Move imx6_pcie_clk_disable()
> [PATCH v5 4/6] PCI: dwc: Add dw_pcie_host_ops.host_exit() callback
> [PATCH v5 5/6] PCI: imx6: Fix the regulator dump when link never came
> [PATCH v5 6/6] PCI: imx6: Add the compliance tests mode support

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

^ permalink raw reply

* Re: [PATCH] lib: Kconfig: fix PHANDLE_CHECK_SEQ position outside of menu
From: Aswath Govindraju @ 2022-01-05 10:15 UTC (permalink / raw)
  To: Eugen Hristev, u-boot; +Cc: sjg
In-Reply-To: <20220104162019.306117-1-eugen.hristev@microchip.com>

Hi Eugen,

On 04/01/22 9:50 pm, Eugen Hristev wrote:
> CONFIG_PHANDLE_CHECK_SEQ is outside of the menu 'Library routines'
> thus it's invisible in menuconfig and cannot be selected.
> Fix this by moving the 'endmenu' after the PHANDLE_CHECK_SEQ definition
> 
> Fixes: c589132a1d ("fdt: Use phandle to distinguish DT nodes with same name")
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>

Thank you for fixing this :)

Reviewed-by: Aswath Govindraju <a-govindraju@ti.com>

Thanks,
Aswath
> ---
>  lib/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/Kconfig b/lib/Kconfig
> index 807a4c6ade..652a11a154 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -827,11 +827,11 @@ config LMB_RESERVED_REGIONS
>  	  Define the number of supported reserved regions in the library logical
>  	  memory blocks.
>  
> -endmenu
> -
>  config PHANDLE_CHECK_SEQ
>  	bool "Enable phandle check while getting sequence number"
>  	help
>  	  When there are multiple device tree nodes with same name,
>            enable this config option to distinguish them using
>  	  phandles in fdtdec_get_alias_seq() function.
> +
> +endmenu
> 


^ permalink raw reply

* Re: [PATCH v4 1/2] linux-user: add sched_getattr support
From: Laurent Vivier @ 2022-01-05 10:14 UTC (permalink / raw)
  To: Tonis Tiigi, qemu-devel
In-Reply-To: <20220105041819.24160-2-tonistiigi@gmail.com>

Le 05/01/2022 à 05:18, Tonis Tiigi a écrit :
> These syscalls are not exposed by glibc. The struct type need to be
> redefined as it can't be included directly before
> https://lkml.org/lkml/2020/5/28/810 .
> 
> sched_attr type can grow in future kernel versions. When client sends
> values that QEMU does not understand it will return E2BIG with same
> semantics as old kernel would so client can retry with smaller inputs.
> 
> Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
> ---
>   linux-user/syscall.c      | 123 ++++++++++++++++++++++++++++++++++++++
>   linux-user/syscall_defs.h |  14 +++++
>   2 files changed, 137 insertions(+)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 56a3e17183..1b8415c8a3 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -340,6 +340,25 @@ _syscall3(int, sys_sched_getaffinity, pid_t, pid, unsigned int, len,
>   #define __NR_sys_sched_setaffinity __NR_sched_setaffinity
>   _syscall3(int, sys_sched_setaffinity, pid_t, pid, unsigned int, len,
>             unsigned long *, user_mask_ptr);
> +/* sched_attr is not defined in glibc */
> +struct sched_attr {
> +    uint32_t size;
> +    uint32_t sched_policy;
> +    uint64_t sched_flags;
> +    int32_t sched_nice;
> +    uint32_t sched_priority;
> +    uint64_t sched_runtime;
> +    uint64_t sched_deadline;
> +    uint64_t sched_period;
> +    uint32_t sched_util_min;
> +    uint32_t sched_util_max;
> +};
> +#define __NR_sys_sched_getattr __NR_sched_getattr
> +_syscall4(int, sys_sched_getattr, pid_t, pid, struct sched_attr *, attr,
> +          unsigned int, size, unsigned int, flags);
> +#define __NR_sys_sched_setattr __NR_sched_setattr
> +_syscall3(int, sys_sched_setattr, pid_t, pid, struct sched_attr *, attr,
> +          unsigned int, flags);
>   #define __NR_sys_getcpu __NR_getcpu
>   _syscall3(int, sys_getcpu, unsigned *, cpu, unsigned *, node, void *, tcache);
>   _syscall4(int, reboot, int, magic1, int, magic2, unsigned int, cmd,
> @@ -558,6 +577,24 @@ const char *target_strerror(int err)
>       return strerror(target_to_host_errno(err));
>   }
>   
> +static int check_zeroed_user(abi_long addr, size_t ksize, size_t usize)
> +{
> +    int i;
> +    uint8_t b;
> +    if (usize <= ksize) {
> +        return 1;
> +    }
> +    for (i = ksize; i < usize; i++) {
> +        if (get_user_u8(b, addr + i)) {
> +            return -TARGET_EFAULT;
> +        }
> +        if (b != 0) {
> +            return 0;
> +        }
> +    }
> +    return 1;
> +}
> +
>   #define safe_syscall0(type, name) \
>   static type safe_##name(void) \
>   { \
> @@ -10594,6 +10631,92 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
>           }
>       case TARGET_NR_sched_getscheduler:
>           return get_errno(sched_getscheduler(arg1));
> +    case TARGET_NR_sched_getattr:
> +        {
> +            struct target_sched_attr *target_scha;
> +            struct sched_attr scha;
> +            if (arg2 == 0) {
> +                return -TARGET_EINVAL;
> +            }
> +            if (arg3 > sizeof(scha)) {
> +                arg3 = sizeof(scha);
> +            }
> +            ret = get_errno(sys_sched_getattr(arg1, &scha, arg3, arg4));
> +            if (!is_error(ret)) {
> +                target_scha = lock_user(VERIFY_WRITE, arg2, arg3, 0);
> +                if (!target_scha) {
> +                    return -TARGET_EFAULT;
> +                }
> +                target_scha->size = tswap32(scha.size);
> +                target_scha->sched_policy = tswap32(scha.sched_policy);
> +                target_scha->sched_flags = tswap64(scha.sched_flags);
> +                target_scha->sched_nice = tswap32(scha.sched_nice);
> +                target_scha->sched_priority = tswap32(scha.sched_priority);
> +                target_scha->sched_runtime = tswap64(scha.sched_runtime);
> +                target_scha->sched_deadline = tswap64(scha.sched_deadline);
> +                target_scha->sched_period = tswap64(scha.sched_period);
> +                if (scha.size > offsetof(struct sched_attr, sched_util_min)) {
> +                    target_scha->sched_util_min = tswap32(scha.sched_util_min);
> +                    target_scha->sched_util_max = tswap32(scha.sched_util_max);
> +                }
> +                unlock_user(target_scha, arg2, arg3);
> +            }
> +            return ret;
> +        }
> +    case TARGET_NR_sched_setattr:
> +        {
> +            struct target_sched_attr *target_scha;
> +            struct sched_attr scha;
> +            uint32_t size;
> +            int zeroed;
> +            if (arg2 == 0) {
> +                return -TARGET_EINVAL;
> +            }
> +            if (get_user_u32(size, arg2)) {
> +                return -TARGET_EFAULT;
> +            }
> +            if (!size) {
> +                size = offsetof(struct target_sched_attr, sched_util_min);
> +            }
> +            if (size < offsetof(struct target_sched_attr, sched_util_min)) {
> +                if (put_user_u32(sizeof(struct target_sched_attr), arg2)) {
> +                    return -TARGET_EFAULT;
> +                }
> +                return -TARGET_E2BIG;
> +            }
> +
> +            zeroed = check_zeroed_user(arg2, sizeof(struct target_sched_attr), size);
> +            if (zeroed < 0) {
> +                return zeroed;
> +            } else if (zeroed == 0) {
> +                if (put_user_u32(sizeof(struct target_sched_attr), arg2)) {
> +                    return -TARGET_EFAULT;
> +                }
> +                return -TARGET_E2BIG;
> +            }
> +            if (size > sizeof(struct target_sched_attr)) {
> +                size = sizeof(struct target_sched_attr);
> +            }
> +
> +            target_scha = lock_user(VERIFY_READ, arg2, size, 1);
> +            if (!target_scha) {
> +                return -TARGET_EFAULT;
> +            }
> +            scha.size = size;
> +            scha.sched_policy = tswap32(target_scha->sched_policy);
> +            scha.sched_flags = tswap64(target_scha->sched_flags);
> +            scha.sched_nice = tswap32(target_scha->sched_nice);
> +            scha.sched_priority = tswap32(target_scha->sched_priority);
> +            scha.sched_runtime = tswap64(target_scha->sched_runtime);
> +            scha.sched_deadline = tswap64(target_scha->sched_deadline);
> +            scha.sched_period = tswap64(target_scha->sched_period);
> +            if (size > offsetof(struct target_sched_attr, sched_util_min)) {
> +                scha.sched_util_min = tswap32(target_scha->sched_util_min);
> +                scha.sched_util_max = tswap32(target_scha->sched_util_max);
> +            }
> +            unlock_user(target_scha, arg2, 0);
> +            return get_errno(sys_sched_setattr(arg1, &scha, arg3));
> +        }
>       case TARGET_NR_sched_yield:
>           return get_errno(sched_yield());
>       case TARGET_NR_sched_get_priority_max:
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index 0b13975937..310d6ce8ad 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -2914,4 +2914,18 @@ struct target_statx {
>      /* 0x100 */
>   };
>   
> +/* from kernel's include/linux/sched/types.h */
> +struct target_sched_attr {
> +    abi_uint size;
> +    abi_uint sched_policy;
> +    abi_ullong sched_flags;
> +    abi_int sched_nice;
> +    abi_uint sched_priority;
> +    abi_ullong sched_runtime;
> +    abi_ullong sched_deadline;
> +    abi_ullong sched_period;
> +    abi_uint sched_util_min;
> +    abi_uint sched_util_max;
> +};
> +
>   #endif

Reviewed-by: Laurent Vivier <laurent@vivier.eu>



^ permalink raw reply

* Re: [PATCH 3/8] PM: core: Add EXPORT[_GPL]_SIMPLE_DEV_PM_OPS macros
From: Paul Cercueil @ 2022-01-05 10:15 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Rafael J . Wysocki, Ulf Hansson, Jonathan Cameron,
	Lars-Peter Clausen, Linus Walleij, Arnd Bergmann, Len Brown,
	Pavel Machek, list, linux-iio, linux-kernel, linux-mips,
	linux-mmc, linux-pm
In-Reply-To: <20220105100332.000001c1@Huawei.com>

Hi Jonathan,

Le mer., janv. 5 2022 at 10:03:32 +0000, Jonathan Cameron 
<Jonathan.Cameron@Huawei.com> a écrit :
> On Tue, 4 Jan 2022 21:42:09 +0000
> Paul Cercueil <paul@crapouillou.net> wrote:
> 
>>  These macros are defined conditionally, according to CONFIG_PM:
>>  - if CONFIG_PM is enabled, these macros resolve to
>>    DEFINE_SIMPLE_DEV_PM_OPS(), and the dev_pm_ops symbol will be
>>    exported.
>> 
>>  - if CONFIG_PM is disabled, these macros will result in a dummy 
>> static
>>    dev_pm_ops to be created with the __maybe_unused flag. The 
>> dev_pm_ops
>>    will then be discarded by the compiler, along with the provided
>>    callback functions if they are not used anywhere else.
>> 
>>  In the second case, the symbol is not exported, which should be
>>  perfectly fine - users of the symbol should all use the pm_ptr() or
>>  pm_sleep_ptr() macro, so the dev_pm_ops marked as "extern" in the
>>  client's code will never be accessed.
>> 
>>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>>  ---
>>   include/linux/pm.h | 33 ++++++++++++++++++++++++++++++---
>>   1 file changed, 30 insertions(+), 3 deletions(-)
>> 
>>  diff --git a/include/linux/pm.h b/include/linux/pm.h
>>  index 389e600df233..a1ce29566aea 100644
>>  --- a/include/linux/pm.h
>>  +++ b/include/linux/pm.h
>>  @@ -8,6 +8,7 @@
>>   #ifndef _LINUX_PM_H
>>   #define _LINUX_PM_H
>> 
>>  +#include <linux/export.h>
>>   #include <linux/list.h>
>>   #include <linux/workqueue.h>
>>   #include <linux/spinlock.h>
>>  @@ -357,14 +358,40 @@ struct dev_pm_ops {
>>   #define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn)
>>   #endif
>> 
>>  +#define _DEFINE_DEV_PM_OPS(name, \
>>  +			   suspend_fn, resume_fn, \
>>  +			   runtime_suspend_fn, runtime_resume_fn, idle_fn) \
>>  +const struct dev_pm_ops name = { \
>>  +	SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
>>  +	RUNTIME_PM_OPS(runtime_suspend_fn, runtime_resume_fn, idle_fn) \
>>  +}
>>  +
> 
> one blank line probably enough.
> 
>>  +
>>   /*
>>    * Use this if you want to use the same suspend and resume 
>> callbacks for suspend
>>    * to RAM and hibernation.
>>    */
>>   #define DEFINE_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
>>  -const struct dev_pm_ops name = { \
>>  -	SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
>>  -}
>>  +	_DEFINE_DEV_PM_OPS(name, suspend_fn, resume_fn, NULL, NULL, NULL)
>>  +
>>  +#ifdef CONFIG_PM
>>  +#define _EXPORT_DEV_PM_OPS(name, suspend_fn, resume_fn, 
>> runtime_suspend_fn, \
>>  +			   runtime_resume_fn, idle_fn, sec) \
>>  +	_DEFINE_DEV_PM_OPS(name, suspend_fn, resume_fn, 
>> runtime_suspend_fn, \
>>  +			   runtime_resume_fn, idle_fn); \
>>  +	_EXPORT_SYMBOL(name, sec)
>>  +#else
>>  +#define _EXPORT_DEV_PM_OPS(name, suspend_fn, resume_fn, 
>> runtime_suspend_fn, \
>>  +			   runtime_resume_fn, idle_fn, sec) \
>>  +static __maybe_unused _DEFINE_DEV_PM_OPS(__static_##name, 
>> suspend_fn, \
>>  +					 resume_fn, runtime_suspend_fn, \
>>  +					 runtime_resume_fn, idle_fn)
>>  +#endif
>>  +
>>  +#define EXPORT_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
>>  +	_EXPORT_DEV_PM_OPS(name, suspend_fn, resume_fn, NULL, NULL, NULL, 
>> "")
>>  +#define EXPORT_GPL_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
>>  +	_EXPORT_DEV_PM_OPS(name, suspend_fn, resume_fn, NULL, NULL, NULL, 
>> "_gpl")
> 
> So you can get away with these two cases because the 
> SYSTEM_SLEEP_PM_OPS() all have
> pm_sleep_ptr() wrappers.  However, _EXPORT_DEV_PM_OPS() could be used 
> directly and
> would require __maybe_unused for the RUNTIME_PM_OPS() parameters 
> which isn't ideal.

I don't see why. On both cases (CONFIG_PM enabled/disabled) the 
runtime-PM callbacks are referenced directly, so at no point do they 
appear as unused; therefore __maybe_unused is not needed.

Cheers,
-Paul

> Maybe I'm missing some reason that isn't a problem though as easy to 
> get lost in
> these macros. :)
> 
> You could argue that the _ is meant to indicate that macro shouldn't 
> be used directly
> but I'm not that optimistic.
> 
> Jonathan
> 
> 
> 
>> 
>>   /* Deprecated. Use DEFINE_SIMPLE_DEV_PM_OPS() instead. */
>>   #define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
> 



^ permalink raw reply

* [Buildroot] [PATCH 3/3] package/qt5: bump packages to latest kde submodule versions
From: James Hilliard @ 2022-01-05 10:14 UTC (permalink / raw)
  To: buildroot
  Cc: Naumann Andreas, Joshua Henderson, Bartosz Bilas,
	Angelo Compagnucci, Peter Seiderer, Gaël Portay,
	Thomas Petazzoni, James Hilliard, Julien Corjon
In-Reply-To: <20220105101430.175648-1-james.hilliard1@gmail.com>

This points all qt5 packages to the latest kde submodule versions
available at https://invent.kde.org/qt/qt/qt5/-/tree/kde/5.15

We need to remove some patches applied upstream already.

We need to rework qt5location to pull in the mapboxgl dependency from
a separate package as that dependency is only included in release
archives.

We need to pin qt5 packages not available in the new upstream to the
previous 5.15.2 version.

We need to set SYNC_QT_HEADERS for all qt5 packages in the new
upstream as headers are only copied in release archives which are
not provided in the kde upstream.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/qt5/qt53d/qt53d.hash                  |  4 +-
 package/qt5/qt53d/qt53d.mk                    |  7 ++-
 ...Fix-build-with-GCC-11-include-limits.patch | 53 ----------------
 .../qt5base/0007-Build-fixes-for-GCC-11.patch | 61 -------------------
 .../0008-Add-missing-limits-include.patch     | 32 ----------
 .../qt5base/0009-Fix-build-on-riscv32.patch   | 45 --------------
 package/qt5/qt5base/qt5base.hash              |  4 +-
 package/qt5/qt5base/qt5base.mk                |  7 ++-
 package/qt5/qt5charts/qt5charts.hash          |  4 +-
 package/qt5/qt5charts/qt5charts.mk            |  7 ++-
 package/qt5/qt5coap/qt5coap.mk                |  2 +-
 .../qt5/qt5connectivity/qt5connectivity.hash  |  4 +-
 .../qt5/qt5connectivity/qt5connectivity.mk    |  7 ++-
 ...t_p-needs-c-limits-inlcude-fixes-gcc.patch | 45 --------------
 .../qt5/qt5declarative/qt5declarative.hash    |  4 +-
 package/qt5/qt5declarative/qt5declarative.mk  |  7 ++-
 .../qt5graphicaleffects.hash                  |  4 +-
 .../qt5graphicaleffects.mk                    |  7 ++-
 .../qt5/qt5imageformats/qt5imageformats.hash  |  4 +-
 .../qt5/qt5imageformats/qt5imageformats.mk    |  7 ++-
 package/qt5/qt5knx/qt5knx.mk                  |  2 +-
 ...gl-native-fix-musl-compile-pthread_g.patch |  8 +--
 .../qt5location-mapboxgl.hash                 | 16 +++++
 .../qt5location-mapboxgl.mk                   | 13 ++++
 ...ix-compilation-for-no-opengl-builds.patch} |  0
 package/qt5/qt5location/qt5location.hash      |  4 +-
 package/qt5/qt5location/qt5location.mk        | 14 ++++-
 package/qt5/qt5lottie/qt5lottie.hash          |  4 +-
 package/qt5/qt5lottie/qt5lottie.mk            |  7 ++-
 package/qt5/qt5mqtt/qt5mqtt.mk                |  2 +-
 package/qt5/qt5multimedia/qt5multimedia.hash  |  4 +-
 package/qt5/qt5multimedia/qt5multimedia.mk    |  7 ++-
 package/qt5/qt5opcua/qt5opcua.mk              |  2 +-
 .../qt5quickcontrols/qt5quickcontrols.hash    |  4 +-
 .../qt5/qt5quickcontrols/qt5quickcontrols.mk  |  7 ++-
 .../qt5quickcontrols2/qt5quickcontrols2.hash  |  4 +-
 .../qt5quickcontrols2/qt5quickcontrols2.mk    |  7 ++-
 .../qt5quicktimeline/qt5quicktimeline.hash    |  4 +-
 .../qt5/qt5quicktimeline/qt5quicktimeline.mk  |  7 ++-
 .../qt5remoteobjects/qt5remoteobjects.hash    |  4 +-
 .../qt5/qt5remoteobjects/qt5remoteobjects.mk  |  7 ++-
 package/qt5/qt5script/qt5script.hash          |  4 +-
 package/qt5/qt5script/qt5script.mk            |  7 ++-
 package/qt5/qt5scxml/qt5scxml.hash            |  4 +-
 package/qt5/qt5scxml/qt5scxml.mk              |  7 ++-
 package/qt5/qt5sensors/qt5sensors.hash        |  4 +-
 package/qt5/qt5sensors/qt5sensors.mk          |  7 ++-
 package/qt5/qt5serialbus/qt5serialbus.hash    |  4 +-
 package/qt5/qt5serialbus/qt5serialbus.mk      |  7 ++-
 package/qt5/qt5serialport/qt5serialport.hash  |  4 +-
 package/qt5/qt5serialport/qt5serialport.mk    |  7 ++-
 package/qt5/qt5svg/qt5svg.hash                |  4 +-
 package/qt5/qt5svg/qt5svg.mk                  |  7 ++-
 package/qt5/qt5tools/qt5tools.hash            |  4 +-
 package/qt5/qt5tools/qt5tools.mk              |  7 ++-
 .../qt5virtualkeyboard.hash                   |  4 +-
 .../qt5virtualkeyboard/qt5virtualkeyboard.mk  |  7 ++-
 package/qt5/qt5wayland/qt5wayland.hash        |  4 +-
 package/qt5/qt5wayland/qt5wayland.mk          |  7 ++-
 package/qt5/qt5webchannel/qt5webchannel.hash  |  4 +-
 package/qt5/qt5webchannel/qt5webchannel.mk    |  7 ++-
 .../qt5webkit-examples/qt5webkit-examples.mk  |  2 +-
 package/qt5/qt5websockets/qt5websockets.hash  |  4 +-
 package/qt5/qt5websockets/qt5websockets.mk    |  7 ++-
 package/qt5/qt5webview/qt5webview.hash        |  4 +-
 package/qt5/qt5webview/qt5webview.mk          |  7 ++-
 package/qt5/qt5x11extras/qt5x11extras.hash    |  4 +-
 package/qt5/qt5x11extras/qt5x11extras.mk      |  7 ++-
 .../qt5/qt5xmlpatterns/qt5xmlpatterns.hash    |  4 +-
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk  |  7 ++-
 70 files changed, 213 insertions(+), 385 deletions(-)
 delete mode 100644 package/qt5/qt5base/0006-Fix-build-with-GCC-11-include-limits.patch
 delete mode 100644 package/qt5/qt5base/0007-Build-fixes-for-GCC-11.patch
 delete mode 100644 package/qt5/qt5base/0008-Add-missing-limits-include.patch
 delete mode 100644 package/qt5/qt5base/0009-Fix-build-on-riscv32.patch
 delete mode 100644 package/qt5/qt5declarative/0003-qqmlprofilerevent_p-needs-c-limits-inlcude-fixes-gcc.patch
 rename package/qt5/{qt5location => qt5location-mapboxgl}/0001-3rdparty-mapbox-gl-native-fix-musl-compile-pthread_g.patch (81%)
 create mode 100644 package/qt5/qt5location-mapboxgl/qt5location-mapboxgl.hash
 create mode 100644 package/qt5/qt5location-mapboxgl/qt5location-mapboxgl.mk
 rename package/qt5/qt5location/{0002-fix-compilation-for-no-opengl-builds.patch => 0001-fix-compilation-for-no-opengl-builds.patch} (100%)

diff --git a/package/qt5/qt53d/qt53d.hash b/package/qt5/qt53d/qt53d.hash
index 43b2132cc7..32d3675619 100644
--- a/package/qt5/qt53d/qt53d.hash
+++ b/package/qt5/qt53d/qt53d.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qt3d-everywhere-src-5.15.2.tar.xz.sha256
-sha256  03ed6a48c813c75296c19f5d721184ab168280b69d2656cf16f877d3d4c55c1d  qt3d-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  4c40260d4298b3e71a9879b43530b1e0b3f235a680bb0e7be76a375f4ae24696  qt3d-dba14d48611b9e9d59576172658779ab4a39b416.tar.bz2
 
 # Hashes for license files:
 sha256  edfe70e99be2a7c109d860b19204609e582720b211c50caedac729da372a1253  LICENSE.GPL
diff --git a/package/qt5/qt53d/qt53d.mk b/package/qt5/qt53d/qt53d.mk
index f3eff9edf0..9a07d189bd 100644
--- a/package/qt5/qt53d/qt53d.mk
+++ b/package/qt5/qt53d/qt53d.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT53D_VERSION = $(QT5_VERSION)
-QT53D_SITE = $(QT5_SITE)
-QT53D_SOURCE = qt3d-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT53D_VERSION).tar.xz
+QT53D_VERSION = dba14d48611b9e9d59576172658779ab4a39b416
+QT53D_SITE = $(QT5_SITE)/qt3d/-/archive/$(QT53D_VERSION)
+QT53D_SOURCE = qt3d-$(QT53D_VERSION).tar.bz2
 QT53D_DEPENDENCIES = qt5declarative
 QT53D_INSTALL_STAGING = YES
+QT53D_SYNC_QT_HEADERS = YES
 
 ifeq ($(BR2_PACKAGE_ASSIMP),y)
 QT53D_DEPENDENCIES += assimp
diff --git a/package/qt5/qt5base/0006-Fix-build-with-GCC-11-include-limits.patch b/package/qt5/qt5base/0006-Fix-build-with-GCC-11-include-limits.patch
deleted file mode 100644
index f014a160d5..0000000000
--- a/package/qt5/qt5base/0006-Fix-build-with-GCC-11-include-limits.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 9c56d4da2ff631a8c1c30475bd792f6c86bda53c Mon Sep 17 00:00:00 2001
-From: Thiago Macieira <thiago.macieira@intel.com>
-Date: Mon, 18 Jan 2021 07:40:54 -0800
-Subject: [PATCH] Fix build with GCC 11: include <limits>
-
-Fixes: QTBUG-90395
-Pick-to: 6.0
-Change-Id: Iecc74d2000eb40dfbe7bfffd165b5dd3708b7a40
-Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-
-[Retrieved (and backported) from:
-https://github.com/qt/qtbase/commit/9c56d4da2ff631a8c1c30475bd792f6c86bda53c]
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
----
- src/corelib/global/qendian.h  | 6 ++++--
- src/corelib/global/qfloat16.h | 1 +
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
-index 99b529f17cd..c874c5e47ab 100644
---- a/src/corelib/global/qendian.h
-+++ b/src/corelib/global/qendian.h
-@@ -1,7 +1,7 @@
- /****************************************************************************
- **
--** Copyright (C) 2016 The Qt Company Ltd.
--** Copyright (C) 2016 Intel Corporation.
-+** Copyright (C) 2021 The Qt Company Ltd.
-+** Copyright (C) 2021 Intel Corporation.
- ** Contact: https://www.qt.io/licensing/
- **
- ** This file is part of the QtCore module of the Qt Toolkit.
-@@ -44,6 +44,8 @@
- #include <QtCore/qfloat16.h>
- #include <QtCore/qglobal.h>
- 
-+#include <limits>
-+
- // include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
- #include <stdlib.h>
- #include <string.h>
-diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h
-index e9477d2ecec..a25fac28862 100644
---- a/src/corelib/global/qfloat16.h
-+++ b/src/corelib/global/qfloat16.h
-@@ -44,6 +44,7 @@
-
- #include <QtCore/qglobal.h>
- #include <QtCore/qmetatype.h>
-+#include <limits>
- #include <string.h>
- 
- #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)
diff --git a/package/qt5/qt5base/0007-Build-fixes-for-GCC-11.patch b/package/qt5/qt5base/0007-Build-fixes-for-GCC-11.patch
deleted file mode 100644
index d20600c6ce..0000000000
--- a/package/qt5/qt5base/0007-Build-fixes-for-GCC-11.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 86494659b2ab14edc653cd2d9260561ad4c4e4e8 Mon Sep 17 00:00:00 2001
-From: Ville Voutilainen <ville.voutilainen@qt.io>
-Date: Mon, 18 Jan 2021 09:58:17 +0200
-Subject: [PATCH] Build fixes for GCC 11
-
-Task-number: QTBUG-89977
-Change-Id: Ic1b7ddbffb8a0a00f8c621d09a868f1d94a52c21
-Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-[Retrieved (and backported) from:
-https://github.com/qt/qtbase/commit/813a928c7c3cf98670b6043149880ed5c955efb9]
-Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
----
- src/corelib/text/qbytearraymatcher.h     | 2 ++
- src/corelib/tools/qsharedpointer_impl.h  | 3 ---
- src/plugins/platforms/xcb/qxcbwindow.cpp | 2 +-
- 3 files changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/src/corelib/text/qbytearraymatcher.h b/src/corelib/text/qbytearraymatcher.h
-index 0eedfc1d20..f5f9bef7b8 100644
---- a/src/corelib/text/qbytearraymatcher.h
-+++ b/src/corelib/text/qbytearraymatcher.h
-@@ -42,6 +42,8 @@
- 
- #include <QtCore/qbytearray.h>
- 
-+#include <limits>
-+
- QT_BEGIN_NAMESPACE
- 
- 
-diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
-index 790c187cb9..4aee98af53 100644
---- a/src/corelib/tools/qsharedpointer_impl.h
-+++ b/src/corelib/tools/qsharedpointer_impl.h
-@@ -155,9 +155,6 @@ namespace QtSharedPointer {
- #endif
-         inline void checkQObjectShared(...) { }
-         inline void setQObjectShared(...) { }
--
--        inline void operator delete(void *ptr) { ::operator delete(ptr); }
--        inline void operator delete(void *, void *) { }
-     };
-     // sizeof(ExternalRefCountData) = 12 (32-bit) / 16 (64-bit)
- 
-diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
-index 9e7e1a5572..f0866a90ac 100644
---- a/src/plugins/platforms/xcb/qxcbwindow.cpp
-+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
-@@ -698,7 +698,7 @@ void QXcbWindow::show()
-         if (isTransient(window())) {
-             const QWindow *tp = window()->transientParent();
-             if (tp && tp->handle())
--                transientXcbParent = static_cast<const QXcbWindow *>(tp->handle())->winId();
-+                transientXcbParent = tp->handle()->winId();
-             // Default to client leader if there is no transient parent, else modal dialogs can
-             // be hidden by their parents.
-             if (!transientXcbParent)
--- 
-2.31.1
-
diff --git a/package/qt5/qt5base/0008-Add-missing-limits-include.patch b/package/qt5/qt5base/0008-Add-missing-limits-include.patch
deleted file mode 100644
index e489f2e551..0000000000
--- a/package/qt5/qt5base/0008-Add-missing-limits-include.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 87a869a8404047240cccaa9f101351aeb9417a26 Mon Sep 17 00:00:00 2001
-From: Nicolas Fella <nicolas.fella@kdab.com>
-Date: Sun, 20 Jun 2021 17:36:41 +0200
-Subject: [PATCH] Add missing limits include
-
-The code uses std::numeric_limits but is lacking the appropriate include
-
-Pick-to: 5.15 6.1 6.2
-Change-Id: I41fa5ac4d8c4e06f35b5b1551ef2ad8417df80bd
-Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-
-[Upstream: https://code.qt.io/cgit/qt/qtbase.git/patch/?id=2b2b3155d9f6ba1e4f859741468fbc47db09292b]
-Signed-off-by: Peter Seiderer <ps.report@gmx.net>
----
- src/corelib/tools/qoffsetstringarray_p.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/corelib/tools/qoffsetstringarray_p.h b/src/corelib/tools/qoffsetstringarray_p.h
-index 4dd9e960..e26a57ff 100644
---- a/src/corelib/tools/qoffsetstringarray_p.h
-+++ b/src/corelib/tools/qoffsetstringarray_p.h
-@@ -55,6 +55,7 @@
- 
- #include <tuple>
- #include <array>
-+#include <limits>
- 
- QT_BEGIN_NAMESPACE
- 
--- 
-2.32.0
-
diff --git a/package/qt5/qt5base/0009-Fix-build-on-riscv32.patch b/package/qt5/qt5base/0009-Fix-build-on-riscv32.patch
deleted file mode 100644
index 98c7210551..0000000000
--- a/package/qt5/qt5base/0009-Fix-build-on-riscv32.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 035dc537bee26e3b63a211b2835d8560439e161f Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Fri, 27 Aug 2021 16:28:32 +0200
-Subject: Fix build on riscv32
-
-riscv32 fails to build because __NR_futex is not defined on this
-architecture:
-
-In file included from thread/qmutex_linux.cpp:45,
-                 from thread/qmutex.cpp:804:
-thread/qfutex_p.h: In function 'int QtLinuxFutex::_q_futex(int*, int, int, quintptr, int*, int)':
-thread/qfutex_p.h:116:30: error: '__NR_futex' was not declared in this scope; did you mean '_q_futex'?
-  116 |         int result = syscall(__NR_futex, addr, op | FUTEX_PRIVATE_FLAG, val, val2, addr2, val3);
-      |                              ^~~~~~~~~~
-      |                              _q_futex
-
-Pick-to: 6.1 6.2
-Fixes: QTBUG-96067
-Change-Id: Ib6a9bcc496f37e69ac39362cb0a021fccaf311f5
-Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-[Retrieved from:
-https://code.qt.io/cgit/qt/qtbase.git/commit/?id=035dc537bee26e3b63a211b2835d8560439e161f]
----
- src/corelib/thread/qfutex_p.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/corelib/thread/qfutex_p.h b/src/corelib/thread/qfutex_p.h
-index 40482b6fc1..037207a5c0 100644
---- a/src/corelib/thread/qfutex_p.h
-+++ b/src/corelib/thread/qfutex_p.h
-@@ -103,6 +103,11 @@ QT_END_NAMESPACE
- // if not defined in linux/futex.h
- #  define FUTEX_PRIVATE_FLAG        128         // added in v2.6.22
- 
-+// RISC-V does not supply __NR_futex
-+#  ifndef __NR_futex
-+#    define __NR_futex __NR_futex_time64
-+#  endif
-+
- QT_BEGIN_NAMESPACE
- namespace QtLinuxFutex {
-     constexpr inline bool futexAvailable() { return true; }
--- 
-cgit v1.2.1
-
diff --git a/package/qt5/qt5base/qt5base.hash b/package/qt5/qt5base/qt5base.hash
index a824890e3c..d10847ea04 100644
--- a/package/qt5/qt5base/qt5base.hash
+++ b/package/qt5/qt5base/qt5base.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtbase-everywhere-src-5.15.2.tar.xz.sha256
-sha256  909fad2591ee367993a75d7e2ea50ad4db332f05e1c38dd7a5a274e156a4e0f8  qtbase-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  b23754a97af171a6b0b0a21eda3fcc47ad4ac96db172010a7453afc41b6b227d  qtbase-6e9cf7f32ceffd62d230d482d8d0d4a5b2c9303a.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index ba2971dc08..294542fabb 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -4,12 +4,13 @@
 #
 ################################################################################
 
-QT5BASE_VERSION = $(QT5_VERSION)
-QT5BASE_SITE = $(QT5_SITE)
-QT5BASE_SOURCE = qtbase-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5BASE_VERSION).tar.xz
+QT5BASE_VERSION = 6e9cf7f32ceffd62d230d482d8d0d4a5b2c9303a
+QT5BASE_SITE = $(QT5_SITE)/qtbase/-/archive/$(QT5BASE_VERSION)
+QT5BASE_SOURCE = qtbase-$(QT5BASE_VERSION).tar.bz2
 
 QT5BASE_DEPENDENCIES = host-pkgconf pcre2 zlib
 QT5BASE_INSTALL_STAGING = YES
+QT5BASE_SYNC_QT_HEADERS = YES
 
 # A few comments:
 #  * -no-pch to workaround the issue described at
diff --git a/package/qt5/qt5charts/qt5charts.hash b/package/qt5/qt5charts/qt5charts.hash
index b52be714b7..021d4ea19f 100644
--- a/package/qt5/qt5charts/qt5charts.hash
+++ b/package/qt5/qt5charts/qt5charts.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtcharts-everywhere-src-5.15.2.tar.xz.sha256
-sha256  e0750e4195bd8a8b9758ab4d98d437edbe273cd3d289dd6a8f325df6d13f3d11  qtcharts-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  60f973c79aa059981347864ca26ef361ac38bc835286ac5875f6c7c1248a9b21  qtcharts-130463160b4923069eb98da49edaf7d93180f4f8.tar.bz2
 
 # Hashes for license files:
 sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  LICENSE.GPL3
diff --git a/package/qt5/qt5charts/qt5charts.mk b/package/qt5/qt5charts/qt5charts.mk
index 2c40ac1c89..24e635b93b 100644
--- a/package/qt5/qt5charts/qt5charts.mk
+++ b/package/qt5/qt5charts/qt5charts.mk
@@ -4,10 +4,11 @@
 #
 ################################################################################
 
-QT5CHARTS_VERSION = $(QT5_VERSION)
-QT5CHARTS_SITE = $(QT5_SITE)
-QT5CHARTS_SOURCE = qtcharts-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5CHARTS_VERSION).tar.xz
+QT5CHARTS_VERSION = 130463160b4923069eb98da49edaf7d93180f4f8
+QT5CHARTS_SITE = $(QT5_SITE)/qtcharts/-/archive/$(QT5CHARTS_VERSION)
+QT5CHARTS_SOURCE = qtcharts-$(QT5CHARTS_VERSION).tar.bz2
 QT5CHARTS_INSTALL_STAGING = YES
+QT5CHARTS_SYNC_QT_HEADERS = YES
 
 QT5CHARTS_LICENSE = GPL-3.0
 QT5CHARTS_LICENSE_FILES = LICENSE.GPL3
diff --git a/package/qt5/qt5coap/qt5coap.mk b/package/qt5/qt5coap/qt5coap.mk
index 24de869120..a50f19d7f2 100644
--- a/package/qt5/qt5coap/qt5coap.mk
+++ b/package/qt5/qt5coap/qt5coap.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-QT5COAP_VERSION = $(QT5_VERSION)
+QT5COAP_VERSION = 5.15.2
 QT5COAP_SITE = https://code.qt.io/cgit/qt/qtcoap.git
 QT5COAP_SITE_METHOD = git
 QT5COAP_INSTALL_STAGING = YES
diff --git a/package/qt5/qt5connectivity/qt5connectivity.hash b/package/qt5/qt5connectivity/qt5connectivity.hash
index 3edc2d666a..12e9d637b2 100644
--- a/package/qt5/qt5connectivity/qt5connectivity.hash
+++ b/package/qt5/qt5connectivity/qt5connectivity.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtconnectivity-everywhere-src-5.15.2.tar.xz.sha256
-sha256  0380327871f76103e5b8c2a305988d76d352b6a982b3e7b3bc3cdc184c64bfa0  qtconnectivity-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  216e9f6b1be00897ac1ce12f0ea4d1733eb70acd49ec3a83d01cd472b2fb5450  qtconnectivity-5e9ca5d36d65dadb98ef90013a1dcf15fbd7ae26.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5connectivity/qt5connectivity.mk b/package/qt5/qt5connectivity/qt5connectivity.mk
index 6402b505bf..a4c79be10b 100644
--- a/package/qt5/qt5connectivity/qt5connectivity.mk
+++ b/package/qt5/qt5connectivity/qt5connectivity.mk
@@ -4,10 +4,11 @@
 #
 ################################################################################
 
-QT5CONNECTIVITY_VERSION = $(QT5_VERSION)
-QT5CONNECTIVITY_SITE = $(QT5_SITE)
-QT5CONNECTIVITY_SOURCE = qtconnectivity-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5CONNECTIVITY_VERSION).tar.xz
+QT5CONNECTIVITY_VERSION = 5e9ca5d36d65dadb98ef90013a1dcf15fbd7ae26
+QT5CONNECTIVITY_SITE = $(QT5_SITE)/qtconnectivity/-/archive/$(QT5CONNECTIVITY_VERSION)
+QT5CONNECTIVITY_SOURCE = qtconnectivity-$(QT5CONNECTIVITY_VERSION).tar.bz2
 QT5CONNECTIVITY_INSTALL_STAGING = YES
+QT5CONNECTIVITY_SYNC_QT_HEADERS = YES
 
 QT5CONNECTIVITY_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5CONNECTIVITY_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
diff --git a/package/qt5/qt5declarative/0003-qqmlprofilerevent_p-needs-c-limits-inlcude-fixes-gcc.patch b/package/qt5/qt5declarative/0003-qqmlprofilerevent_p-needs-c-limits-inlcude-fixes-gcc.patch
deleted file mode 100644
index 0e6da652f9..0000000000
--- a/package/qt5/qt5declarative/0003-qqmlprofilerevent_p-needs-c-limits-inlcude-fixes-gcc.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From cc8d62f556c065d28a52e4b784b5d22f2cca3001 Mon Sep 17 00:00:00 2001
-From: Peter Seiderer <ps.report@gmx.net>
-Date: Thu, 22 Jul 2021 23:13:43 +0200
-Subject: [PATCH] qqmlprofilerevent_p: needs c++ limits inlcude (fixes gcc-11
- compile)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes:
-
-  In file included from qqmlprofilertypedevent_p.h:43,
-                   from qqmlprofilertypedevent.cpp:40:
-  qqmlprofilerevent_p.h: In member function ‘void QQmlProfilerEvent::assignNumbers(const Container&)’:
-  qqmlprofilerevent_p.h:314:65: error: ‘numeric_limits’ is not a member of ‘std’
-    314 |                     static_cast<quint16>(numbers.size()) : std::numeric_limits<quint16>::max();
-        |                                                                 ^~~~~~~~~~~~~~
-  qqmlprofilerevent_p.h:314:87: error: expected primary-expression before ‘>’ token
-    314 |                     static_cast<quint16>(numbers.size()) : std::numeric_limits<quint16>::max();
-        |                                                                                       ^
-  qqmlprofilerevent_p.h:314:90: error: ‘::max’ has not been declared; did you mean ‘std::max’?
-    314 |                     static_cast<quint16>(numbers.size()) : std::numeric_limits<quint16>::max();
-        |                                                                                          ^~~
-        |                                                                                          std::max
-
-Signed-off-by: Peter Seiderer <ps.report@gmx.net>
----
- src/qmldebug/qqmlprofilerevent_p.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/qmldebug/qqmlprofilerevent_p.h b/src/qmldebug/qqmlprofilerevent_p.h
-index a7e37d1964..01b2f58f16 100644
---- a/src/qmldebug/qqmlprofilerevent_p.h
-+++ b/src/qmldebug/qqmlprofilerevent_p.h
-@@ -48,6 +48,7 @@
- #include <QtCore/qmetatype.h>
- 
- #include <initializer_list>
-+#include <limits>
- #include <type_traits>
- 
- //
--- 
-2.32.0
-
diff --git a/package/qt5/qt5declarative/qt5declarative.hash b/package/qt5/qt5declarative/qt5declarative.hash
index ab83b71814..f9dc08a6e0 100644
--- a/package/qt5/qt5declarative/qt5declarative.hash
+++ b/package/qt5/qt5declarative/qt5declarative.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtdeclarative-everywhere-src-5.15.2.tar.xz.sha256
-sha256  c600d09716940f75d684f61c5bdaced797f623a86db1627da599027f6c635651  qtdeclarative-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  ff460197ea96d2313d1da92587d82ff5d90e9d56ac8249d83f4a01ea847bdfb3  qtdeclarative-8aa1164f1bb6a5dfb5527bcfbf128ab6f2c73ed4.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5declarative/qt5declarative.mk b/package/qt5/qt5declarative/qt5declarative.mk
index 3318cd24c8..036baed444 100644
--- a/package/qt5/qt5declarative/qt5declarative.mk
+++ b/package/qt5/qt5declarative/qt5declarative.mk
@@ -4,10 +4,11 @@
 #
 ################################################################################
 
-QT5DECLARATIVE_VERSION = $(QT5_VERSION)
-QT5DECLARATIVE_SITE = $(QT5_SITE)
-QT5DECLARATIVE_SOURCE = qtdeclarative-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5DECLARATIVE_VERSION).tar.xz
+QT5DECLARATIVE_VERSION = 8aa1164f1bb6a5dfb5527bcfbf128ab6f2c73ed4
+QT5DECLARATIVE_SITE = $(QT5_SITE)/qtdeclarative/-/archive/$(QT5DECLARATIVE_VERSION)
+QT5DECLARATIVE_SOURCE = qtdeclarative-$(QT5DECLARATIVE_VERSION).tar.bz2
 QT5DECLARATIVE_INSTALL_STAGING = YES
+QT5DECLARATIVE_SYNC_QT_HEADERS = YES
 
 QT5DECLARATIVE_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5DECLARATIVE_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
diff --git a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.hash b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.hash
index 9d7a837b8b..e755f0848b 100644
--- a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.hash
+++ b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtgraphicaleffects-everywhere-src-5.15.2.tar.xz.sha256
-sha256  ec8d67f64967d5046410490b549c576f9b9e8b47ec68594ae84aa8870173dfe4  qtgraphicaleffects-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  3035f0a07a0c0a0627ecd082de4b39bbe91521314f11bb63bf4ce81347b855f9  qtgraphicaleffects-c36998dc1581167b12cc3de8e4ac68c2a5d9f76e.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk
index a9ddff454e..542eb4de90 100644
--- a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk
+++ b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT5GRAPHICALEFFECTS_VERSION = $(QT5_VERSION)
-QT5GRAPHICALEFFECTS_SITE = $(QT5_SITE)
-QT5GRAPHICALEFFECTS_SOURCE = qtgraphicaleffects-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5GRAPHICALEFFECTS_VERSION).tar.xz
+QT5GRAPHICALEFFECTS_VERSION = c36998dc1581167b12cc3de8e4ac68c2a5d9f76e
+QT5GRAPHICALEFFECTS_SITE = $(QT5_SITE)/qtgraphicaleffects/-/archive/$(QT5GRAPHICALEFFECTS_VERSION)
+QT5GRAPHICALEFFECTS_SOURCE = qtgraphicaleffects-$(QT5GRAPHICALEFFECTS_VERSION).tar.bz2
 QT5GRAPHICALEFFECTS_DEPENDENCIES = qt5declarative
 QT5GRAPHICALEFFECTS_INSTALL_STAGING = YES
+QT5GRAPHICALEFFECTS_SYNC_QT_HEADERS = YES
 
 QT5GRAPHICALEFFECTS_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5GRAPHICALEFFECTS_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
diff --git a/package/qt5/qt5imageformats/qt5imageformats.hash b/package/qt5/qt5imageformats/qt5imageformats.hash
index b4281e712d..49690de3bb 100644
--- a/package/qt5/qt5imageformats/qt5imageformats.hash
+++ b/package/qt5/qt5imageformats/qt5imageformats.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtimageformats-everywhere-src-5.15.2.tar.xz.sha256
-sha256  bf8285c7ce04284527ab823ddc7cf48a1bb79131db3a7127342167f4814253d7  qtimageformats-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  f2ff68c0d7192443e2fbcfdec73ee6a6bb160461b7757539906d9ad0c7f600d9  qtimageformats-cb82c74310837fe4e832c8ab72176a5d63e4355f.tar.bz2
 
 # Hashes for license files:
 sha256  edfe70e99be2a7c109d860b19204609e582720b211c50caedac729da372a1253  LICENSE.GPLv2
diff --git a/package/qt5/qt5imageformats/qt5imageformats.mk b/package/qt5/qt5imageformats/qt5imageformats.mk
index ffb094d566..506cd123a8 100644
--- a/package/qt5/qt5imageformats/qt5imageformats.mk
+++ b/package/qt5/qt5imageformats/qt5imageformats.mk
@@ -4,10 +4,11 @@
 #
 ################################################################################
 
-QT5IMAGEFORMATS_VERSION = $(QT5_VERSION)
-QT5IMAGEFORMATS_SITE = $(QT5_SITE)
-QT5IMAGEFORMATS_SOURCE = qtimageformats-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5IMAGEFORMATS_VERSION).tar.xz
+QT5IMAGEFORMATS_VERSION = cb82c74310837fe4e832c8ab72176a5d63e4355f
+QT5IMAGEFORMATS_SITE = $(QT5_SITE)/qtimageformats/-/archive/$(QT5IMAGEFORMATS_VERSION)
+QT5IMAGEFORMATS_SOURCE = qtimageformats-$(QT5IMAGEFORMATS_VERSION).tar.bz2
 QT5IMAGEFORMATS_INSTALL_STAGING = YES
+QT5IMAGEFORMATS_SYNC_QT_HEADERS = YES
 
 QT5IMAGEFORMATS_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5IMAGEFORMATS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.GPL3-EXCEPT LICENSE.LGPLv3 LICENSE.FDL
diff --git a/package/qt5/qt5knx/qt5knx.mk b/package/qt5/qt5knx/qt5knx.mk
index 9fc121111c..412e31c652 100644
--- a/package/qt5/qt5knx/qt5knx.mk
+++ b/package/qt5/qt5knx/qt5knx.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-QT5KNX_VERSION = $(QT5_VERSION)
+QT5KNX_VERSION = 5.15.2
 QT5KNX_SITE = https://code.qt.io/cgit/qt/qtknx.git
 QT5KNX_SITE_METHOD = git
 QT5KNX_INSTALL_STAGING = YES
diff --git a/package/qt5/qt5location/0001-3rdparty-mapbox-gl-native-fix-musl-compile-pthread_g.patch b/package/qt5/qt5location-mapboxgl/0001-3rdparty-mapbox-gl-native-fix-musl-compile-pthread_g.patch
similarity index 81%
rename from package/qt5/qt5location/0001-3rdparty-mapbox-gl-native-fix-musl-compile-pthread_g.patch
rename to package/qt5/qt5location-mapboxgl/0001-3rdparty-mapbox-gl-native-fix-musl-compile-pthread_g.patch
index 0894af9ce5..0f56a488e3 100644
--- a/package/qt5/qt5location/0001-3rdparty-mapbox-gl-native-fix-musl-compile-pthread_g.patch
+++ b/package/qt5/qt5location-mapboxgl/0001-3rdparty-mapbox-gl-native-fix-musl-compile-pthread_g.patch
@@ -24,13 +24,13 @@ Signed-off-by: Peter Seiderer <ps.report@gmx.net>
 [yann.morin.1998@free.fr: add uClibc]
 Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
 ---
- src/3rdparty/mapbox-gl-native/platform/default/thread.cpp | 3 ++-
+ platform/default/thread.cpp | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
-diff --git a/src/3rdparty/mapbox-gl-native/platform/default/thread.cpp b/src/3rdparty/mapbox-gl-native/platform/default/thread.cpp
+diff --git a/platform/default/thread.cpp b/platform/default/thread.cpp
 index c7c79b4..3f135eb 100644
---- a/src/3rdparty/mapbox-gl-native/platform/default/thread.cpp
-+++ b/src/3rdparty/mapbox-gl-native/platform/default/thread.cpp
+--- a/platform/default/thread.cpp
++++ b/platform/default/thread.cpp
 @@ -11,8 +11,9 @@ namespace platform {
  
  std::string getCurrentThreadName() {
diff --git a/package/qt5/qt5location-mapboxgl/qt5location-mapboxgl.hash b/package/qt5/qt5location-mapboxgl/qt5location-mapboxgl.hash
new file mode 100644
index 0000000000..e44081c465
--- /dev/null
+++ b/package/qt5/qt5location-mapboxgl/qt5location-mapboxgl.hash
@@ -0,0 +1,16 @@
+# Locally calculated
+sha256  71e3eb527b94a3e2be381cadf0a286eb5d5f248258b2cfb04013ee4009501220  qtlocation-mapboxgl-d3101bbc22edd41c9036ea487d4a71eabd97823d.tar.bz2
+
+# Hashes for license files:
+sha256  50fbbf443ab764019871ed5eedd9035967cb1b4f94baccbc05f3062f2d0fef4e  LICENSE.md
+sha256  c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566  LICENSE_Boost.txt
+sha256  23b997149a52805b5e6acfbd26924e2d2c8dc31d4824c85da46dac4603815055  LICENSE_CSSColorParser.txt
+sha256  44b7f71c4d7f3da85e5e6a5d0cfa6942055d326a24f4d60a3728ebed26ea2b9d  LICENSE_geojson.txt
+sha256  828f2aed51b6526881a236758ec9b08cd69928fbfc70346d9d44a0b3a3444fe1  LICENSE_geojson_vt_cpp.txt
+sha256  e2bf3affd357261f7451bb19108281c1bde54746bfa2beb0c1c34ab042b21700  LICENSE_geometry.txt
+sha256  900ee7709271d6c227e33e600fd3ff156a6eac63fdd7a9089021cd49fe48e19a  LICENSE_mapbox.txt
+sha256  b4fa5cbec66c57716d1a5cd528af311ebb9610f57ae1550b82dac1dff690c6e9  LICENSE_parsedate.txt
+sha256  1f4d477e3c2d74d8706c8f05437bd86804abe46853b1f233ce1549a4de76fa49  LICENSE_protozero.txt
+sha256  3bb670161958064f54329ca1d9d45854f6ec5225aa937048c2c4b8af5b8ab5d0  LICENSE_rapidjson.txt
+sha256  e2bf3affd357261f7451bb19108281c1bde54746bfa2beb0c1c34ab042b21700  LICENSE_vectortile.txt
+sha256  5e39d227943f601123be20a99151094be889e3d6925799d5c67173ab5b2996d5  LICENSE_wagyu.txt
diff --git a/package/qt5/qt5location-mapboxgl/qt5location-mapboxgl.mk b/package/qt5/qt5location-mapboxgl/qt5location-mapboxgl.mk
new file mode 100644
index 0000000000..58e167e483
--- /dev/null
+++ b/package/qt5/qt5location-mapboxgl/qt5location-mapboxgl.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# qt5location-mapboxgl
+#
+################################################################################
+
+QT5LOCATION_MAPBOXGL_VERSION = d3101bbc22edd41c9036ea487d4a71eabd97823d
+QT5LOCATION_MAPBOXGL_SITE = $(QT5_SITE)/qtlocation-mapboxgl/-/archive/$(QT5LOCATION_MAPBOXGL_VERSION)
+QT5LOCATION_MAPBOXGL_SOURCE = qtlocation-mapboxgl-$(QT5LOCATION_MAPBOXGL_VERSION).tar.bz2
+QT5LOCATION_MAPBOXGL_LICENSE = Apache-2.0, BSD-2-Clause, BSD-3-Clause, BSL-1.0, curl, IJG, ISC, Libpng, MIT, NCSA, OpenSSL, Zlib
+QT5LOCATION_MAPBOXGL_LICENSE_FILES = LICENSE.md LICENSE_Boost.txt LICENSE_CSSColorParser.txt LICENSE_geojson.txt LICENSE_geojson_vt_cpp.txt LICENSE_geometry.txt LICENSE_mapbox.txt LICENSE_parsedate.txt LICENSE_protozero.txt LICENSE_rapidjson.txt LICENSE_vectortile.txt LICENSE_wagyu.txt
+
+$(eval $(generic-package))
diff --git a/package/qt5/qt5location/0002-fix-compilation-for-no-opengl-builds.patch b/package/qt5/qt5location/0001-fix-compilation-for-no-opengl-builds.patch
similarity index 100%
rename from package/qt5/qt5location/0002-fix-compilation-for-no-opengl-builds.patch
rename to package/qt5/qt5location/0001-fix-compilation-for-no-opengl-builds.patch
diff --git a/package/qt5/qt5location/qt5location.hash b/package/qt5/qt5location/qt5location.hash
index 0bb293305c..52649897b1 100644
--- a/package/qt5/qt5location/qt5location.hash
+++ b/package/qt5/qt5location/qt5location.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtlocation-everywhere-src-5.15.2.tar.xz.sha256
-sha256  984fcb09e108df49a8dac35d5ce6dffc49caafd2acb1c2f8a5173a6a21f392a0  qtlocation-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  4d8ae2e2b6c1a379fcf68d35a587c2660fbd7d10148bfd93840af98c5800072b  qtlocation-861e372b6ad81570d4f496e42fb25a6699b72f2f.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5location/qt5location.mk b/package/qt5/qt5location/qt5location.mk
index ea741d0df6..98af8b233b 100644
--- a/package/qt5/qt5location/qt5location.mk
+++ b/package/qt5/qt5location/qt5location.mk
@@ -4,10 +4,12 @@
 #
 ################################################################################
 
-QT5LOCATION_VERSION = $(QT5_VERSION)
-QT5LOCATION_SITE = $(QT5_SITE)
-QT5LOCATION_SOURCE = qtlocation-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5LOCATION_VERSION).tar.xz
+QT5LOCATION_VERSION = 861e372b6ad81570d4f496e42fb25a6699b72f2f
+QT5LOCATION_SITE = $(QT5_SITE)/qtlocation/-/archive/$(QT5LOCATION_VERSION)
+QT5LOCATION_SOURCE = qtlocation-$(QT5LOCATION_VERSION).tar.bz2
+QT5LOCATION_PATCH_DEPENDENCIES = qt5location-mapboxgl
 QT5LOCATION_INSTALL_STAGING = YES
+QT5LOCATION_SYNC_QT_HEADERS = YES
 
 QT5LOCATION_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5LOCATION_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
@@ -16,4 +18,10 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5LOCATION_DEPENDENCIES += qt5declarative
 endif
 
+define QT5LOCATION_COPY_MAPBOXGL
+	rm -rf $(@D)/src/3rdparty/mapbox-gl-native
+	cp -a $(QT5LOCATION_MAPBOXGL_DIR) $(@D)/src/3rdparty/mapbox-gl-native
+endef
+QT5LOCATION_POST_PATCH_HOOKS += QT5LOCATION_COPY_MAPBOXGL
+
 $(eval $(qmake-package))
diff --git a/package/qt5/qt5lottie/qt5lottie.hash b/package/qt5/qt5lottie/qt5lottie.hash
index 740f9072f2..46ab3f60df 100644
--- a/package/qt5/qt5lottie/qt5lottie.hash
+++ b/package/qt5/qt5lottie/qt5lottie.hash
@@ -1,5 +1,5 @@
-# Hash from: http://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtlottie-everywhere-src-5.15.2.tar.xz.sha256
-sha256  cec6095ab8f714e609d2ad3ea8c4fd819461ce8793adc42abe37d0f6dc432517  qtlottie-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  edbf1270733e385189dbcdad67ecec24c9e372168215873eadb31735d0947de1  qtlottie-fa8c8bfc6742ab98b61d1351e054e0e73e9a42f4.tar.bz2
 
 # Hashes for license files:
 sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  LICENSE.GPL3
diff --git a/package/qt5/qt5lottie/qt5lottie.mk b/package/qt5/qt5lottie/qt5lottie.mk
index 1423a629b9..e9614fbecf 100644
--- a/package/qt5/qt5lottie/qt5lottie.mk
+++ b/package/qt5/qt5lottie/qt5lottie.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT5LOTTIE_VERSION = $(QT5_VERSION)
-QT5LOTTIE_SITE = $(QT5_SITE)
-QT5LOTTIE_SOURCE = qtlottie-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5LOTTIE_VERSION).tar.xz
+QT5LOTTIE_VERSION = fa8c8bfc6742ab98b61d1351e054e0e73e9a42f4
+QT5LOTTIE_SITE = $(QT5_SITE)/qtlottie/-/archive/$(QT5LOTTIE_VERSION)
+QT5LOTTIE_SOURCE = qtlottie-$(QT5LOTTIE_VERSION).tar.bz2
 QT5LOTTIE_DEPENDENCIES = qt5declarative
 QT5LOTTIE_INSTALL_STAGING = YES
+QT5LOTTIE_SYNC_QT_HEADERS = YES
 
 QT5LOTTIE_LICENSE = GPL-3.0
 QT5LOTTIE_LICENSE_FILES = LICENSE.GPL3 LICENSE.GPL3-EXCEPT
diff --git a/package/qt5/qt5mqtt/qt5mqtt.mk b/package/qt5/qt5mqtt/qt5mqtt.mk
index 54cc1de632..0b62cf1bed 100644
--- a/package/qt5/qt5mqtt/qt5mqtt.mk
+++ b/package/qt5/qt5mqtt/qt5mqtt.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-QT5MQTT_VERSION = $(QT5_VERSION)
+QT5MQTT_VERSION = 5.15.2
 QT5MQTT_SITE = https://code.qt.io/cgit/qt/qtmqtt.git
 QT5MQTT_SITE_METHOD = git
 QT5MQTT_INSTALL_STAGING = YES
diff --git a/package/qt5/qt5multimedia/qt5multimedia.hash b/package/qt5/qt5multimedia/qt5multimedia.hash
index b70a4ecf51..1c4d930248 100644
--- a/package/qt5/qt5multimedia/qt5multimedia.hash
+++ b/package/qt5/qt5multimedia/qt5multimedia.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtmultimedia-everywhere-src-5.15.2.tar.xz.sha256
-sha256  0c3758810e5131aabcf76e4965e4c18b8911af54d9edd9305d2a8278d8346df5  qtmultimedia-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  95e94b016f256b57b2df3f1df7d02d6f077c600faa4312561f02121623dfecef  qtmultimedia-bd29c87027637a013f2c5e3b549fcda84e4d7545.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5multimedia/qt5multimedia.mk b/package/qt5/qt5multimedia/qt5multimedia.mk
index 39eddc3afc..6695369063 100644
--- a/package/qt5/qt5multimedia/qt5multimedia.mk
+++ b/package/qt5/qt5multimedia/qt5multimedia.mk
@@ -4,10 +4,11 @@
 #
 ################################################################################
 
-QT5MULTIMEDIA_VERSION = $(QT5_VERSION)
-QT5MULTIMEDIA_SITE = $(QT5_SITE)
-QT5MULTIMEDIA_SOURCE = qtmultimedia-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5MULTIMEDIA_VERSION).tar.xz
+QT5MULTIMEDIA_VERSION = bd29c87027637a013f2c5e3b549fcda84e4d7545
+QT5MULTIMEDIA_SITE = $(QT5_SITE)/qtmultimedia/-/archive/$(QT5MULTIMEDIA_VERSION)
+QT5MULTIMEDIA_SOURCE = qtmultimedia-$(QT5MULTIMEDIA_VERSION).tar.bz2
 QT5MULTIMEDIA_INSTALL_STAGING = YES
+QT5MULTIMEDIA_SYNC_QT_HEADERS = YES
 
 QT5MULTIMEDIA_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5MULTIMEDIA_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
diff --git a/package/qt5/qt5opcua/qt5opcua.mk b/package/qt5/qt5opcua/qt5opcua.mk
index a58c4c5e14..ef51abddf8 100644
--- a/package/qt5/qt5opcua/qt5opcua.mk
+++ b/package/qt5/qt5opcua/qt5opcua.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-QT5OPCUA_VERSION = $(QT5_VERSION)
+QT5OPCUA_VERSION = 5.15.2
 QT5OPCUA_SITE = https://code.qt.io/qt/qtopcua.git
 QT5OPCUA_SITE_METHOD = git
 QT5OPCUA_INSTALL_STAGING = YES
diff --git a/package/qt5/qt5quickcontrols/qt5quickcontrols.hash b/package/qt5/qt5quickcontrols/qt5quickcontrols.hash
index 1fa0d6430a..2138b3e313 100644
--- a/package/qt5/qt5quickcontrols/qt5quickcontrols.hash
+++ b/package/qt5/qt5quickcontrols/qt5quickcontrols.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtquickcontrols-everywhere-src-5.15.2.tar.xz.sha256
-sha256  c393fb7384b1f047f10e91a6832cf3e6a4c2a41408b8cb2d05af2283e8549fb5  qtquickcontrols-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  7df0648d9b8fdde1ea27abd9d6eb3ff170e8e666872ea97c07e1bb5ac241be4b  qtquickcontrols-cf3f6d7fec824cdf01f9b329ab3b92b1c0e0a420.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5quickcontrols/qt5quickcontrols.mk b/package/qt5/qt5quickcontrols/qt5quickcontrols.mk
index 1ac8689d6e..c2b5ae182e 100644
--- a/package/qt5/qt5quickcontrols/qt5quickcontrols.mk
+++ b/package/qt5/qt5quickcontrols/qt5quickcontrols.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT5QUICKCONTROLS_VERSION = $(QT5_VERSION)
-QT5QUICKCONTROLS_SITE = $(QT5_SITE)
-QT5QUICKCONTROLS_SOURCE = qtquickcontrols-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5QUICKCONTROLS_VERSION).tar.xz
+QT5QUICKCONTROLS_VERSION = cf3f6d7fec824cdf01f9b329ab3b92b1c0e0a420
+QT5QUICKCONTROLS_SITE = $(QT5_SITE)/qtquickcontrols/-/archive/$(QT5QUICKCONTROLS_VERSION)
+QT5QUICKCONTROLS_SOURCE = qtquickcontrols-$(QT5QUICKCONTROLS_VERSION).tar.bz2
 QT5QUICKCONTROLS_DEPENDENCIES = qt5declarative
 QT5QUICKCONTROLS_INSTALL_STAGING = YES
+QT5QUICKCONTROLS_SYNC_QT_HEADERS = YES
 
 QT5QUICKCONTROLS_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-3.0, GFDL-1.3 (docs)
 QT5QUICKCONTROLS_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.LGPL3 LICENSE.FDL
diff --git a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.hash b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.hash
index f66a1186ee..8c0e02152d 100644
--- a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.hash
+++ b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtquickcontrols2-everywhere-src-5.15.2.tar.xz.sha256
-sha256  671b6ce5f4b8ecc94db622d5d5fb29ef4ff92819be08e5ea55bfcab579de8919  qtquickcontrols2-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  d786f7ca3e825eb754d9eff0eb33dee2848e7d447426178625a9bd3fb547bf17  qtquickcontrols2-be66bf9a5618c745d2a6ee2262967af6307b3b07.tar.bz2
 
 # Hashes for license files:
 sha256  d2cfc059acb4abd8e513cd0a73cd8489f34cbafa7bc34d5d31fb3210821cf8ca  LICENSE.GPLv3
diff --git a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk
index 2f6dcd1f2f..4bdb90b203 100644
--- a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk
+++ b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT5QUICKCONTROLS2_VERSION = $(QT5_VERSION)
-QT5QUICKCONTROLS2_SITE = $(QT5_SITE)
-QT5QUICKCONTROLS2_SOURCE = qtquickcontrols2-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5QUICKCONTROLS2_VERSION).tar.xz
+QT5QUICKCONTROLS2_VERSION = be66bf9a5618c745d2a6ee2262967af6307b3b07
+QT5QUICKCONTROLS2_SITE = $(QT5_SITE)/qtquickcontrols2/-/archive/$(QT5QUICKCONTROLS2_VERSION)
+QT5QUICKCONTROLS2_SOURCE = qtquickcontrols2-$(QT5QUICKCONTROLS2_VERSION).tar.bz2
 QT5QUICKCONTROLS2_DEPENDENCIES = qt5declarative
 QT5QUICKCONTROLS2_INSTALL_STAGING = YES
+QT5QUICKCONTROLS2_SYNC_QT_HEADERS = YES
 
 QT5QUICKCONTROLS2_LICENSE = GPL-3.0 or LGPL-3.0, GFDL-1.3 (docs)
 QT5QUICKCONTROLS2_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv3 LICENSE.FDL
diff --git a/package/qt5/qt5quicktimeline/qt5quicktimeline.hash b/package/qt5/qt5quicktimeline/qt5quicktimeline.hash
index ac97fc319c..c2d0b11f2b 100644
--- a/package/qt5/qt5quicktimeline/qt5quicktimeline.hash
+++ b/package/qt5/qt5quicktimeline/qt5quicktimeline.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtquicktimeline-everywhere-src-5.15.2.tar.xz.sha256
-sha256  b9c247227607437acec7c7dd18ad46179d20369c9d22bdb1e9fc128dfb832a28  qtquicktimeline-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  4d88f7f70c8a983378cb9702bf1551c6a150fb283d0540bd43a120d953e077e3  qtquicktimeline-67503cdadea43b95ddad0de1a04951aff0ce1a07.tar.bz2
 
 # Hashes for license files:
 sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  LICENSE.GPL3
diff --git a/package/qt5/qt5quicktimeline/qt5quicktimeline.mk b/package/qt5/qt5quicktimeline/qt5quicktimeline.mk
index ef6927f928..49d0cb330b 100644
--- a/package/qt5/qt5quicktimeline/qt5quicktimeline.mk
+++ b/package/qt5/qt5quicktimeline/qt5quicktimeline.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT5QUICKTIMELINE_VERSION = $(QT5_VERSION)
-QT5QUICKTIMELINE_SITE = $(QT5_SITE)
-QT5QUICKTIMELINE_SOURCE = qtquicktimeline-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5QUICKTIMELINE_VERSION).tar.xz
+QT5QUICKTIMELINE_VERSION = 67503cdadea43b95ddad0de1a04951aff0ce1a07
+QT5QUICKTIMELINE_SITE = $(QT5_SITE)/qtquicktimeline/-/archive/$(QT5QUICKTIMELINE_VERSION)
+QT5QUICKTIMELINE_SOURCE = qtquicktimeline-$(QT5QUICKTIMELINE_VERSION).tar.bz2
 QT5QUICKTIMELINE_DEPENDENCIES = qt5declarative
 QT5QUICKTIMELINE_INSTALL_STAGING = YES
+QT5QUICKTIMELINE_SYNC_QT_HEADERS = YES
 
 QT5QUICKTIMELINE_LICENSE = GPL-3.0, GFDL-1.3 (docs)
 QT5QUICKTIMELINE_LICENSE_FILES = LICENSE.GPL3
diff --git a/package/qt5/qt5remoteobjects/qt5remoteobjects.hash b/package/qt5/qt5remoteobjects/qt5remoteobjects.hash
index 30c5bfc51d..a2573a018a 100644
--- a/package/qt5/qt5remoteobjects/qt5remoteobjects.hash
+++ b/package/qt5/qt5remoteobjects/qt5remoteobjects.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtremoteobjects-everywhere-src-5.15.2.tar.xz.sha256
-sha256  6781b6bc90888254ea77ce812736dac00c67fa4eeb3095f5cd65e4b9c15dcfc2  qtremoteobjects-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  43c876d475228a0b727d2b2ae47cecc8cbd665d1574ad4db61b209c08a488b90  qtremoteobjects-4d6d1e35fb8e0cb900b5e5e9266edea51dc4f735.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5remoteobjects/qt5remoteobjects.mk b/package/qt5/qt5remoteobjects/qt5remoteobjects.mk
index a6b5f0954c..b7dee4f2f3 100644
--- a/package/qt5/qt5remoteobjects/qt5remoteobjects.mk
+++ b/package/qt5/qt5remoteobjects/qt5remoteobjects.mk
@@ -4,13 +4,14 @@
 #
 ################################################################################
 
-QT5REMOTEOBJECTS_VERSION = $(QT5_VERSION)
-QT5REMOTEOBJECTS_SITE = $(QT5_SITE)
-QT5REMOTEOBJECTS_SOURCE = qtremoteobjects-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5REMOTEOBJECTS_VERSION).tar.xz
+QT5REMOTEOBJECTS_VERSION = 4d6d1e35fb8e0cb900b5e5e9266edea51dc4f735
+QT5REMOTEOBJECTS_SITE = $(QT5_SITE)/qtremoteobjects/-/archive/$(QT5REMOTEOBJECTS_VERSION)
+QT5REMOTEOBJECTS_SOURCE = qtremoteobjects-$(QT5REMOTEOBJECTS_VERSION).tar.bz2
 QT5REMOTEOBJECTS_DEPENDENCIES = qt5base
 QT5REMOTEOBJECTS_INSTALL_STAGING = YES
 QT5REMOTEOBJECTS_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception (tools), GFDL-1.3 (docs)
 QT5REMOTEOBJECTS_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3
+QT5REMOTEOBJECTS_SYNC_QT_HEADERS = YES
 
 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5REMOTEOBJECTS_DEPENDENCIES += qt5declarative
diff --git a/package/qt5/qt5script/qt5script.hash b/package/qt5/qt5script/qt5script.hash
index 783598047b..0b34ff3e8f 100644
--- a/package/qt5/qt5script/qt5script.hash
+++ b/package/qt5/qt5script/qt5script.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtscript-everywhere-src-5.15.2.tar.xz.sha256
-sha256  a299715369afbd1caa4d7fa2875d442eab91adcaacafce54a36922442624673e  qtscript-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  bd748330ad08ea504875b9e0a316c0ecc01e6990e16d3bec61f5f55b9e291011  qtscript-5be95f966aabc5170f0aacfd4b0a46217241bfd6.tar.bz2
 
 # Hashes for license files:
 sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  LICENSE.GPL3
diff --git a/package/qt5/qt5script/qt5script.mk b/package/qt5/qt5script/qt5script.mk
index 77254fec0f..4e51eacfc3 100644
--- a/package/qt5/qt5script/qt5script.mk
+++ b/package/qt5/qt5script/qt5script.mk
@@ -4,10 +4,11 @@
 #
 ################################################################################
 
-QT5SCRIPT_VERSION = $(QT5_VERSION)
-QT5SCRIPT_SITE = $(QT5_SITE)
-QT5SCRIPT_SOURCE = qtscript-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5SCRIPT_VERSION).tar.xz
+QT5SCRIPT_VERSION = 5be95f966aabc5170f0aacfd4b0a46217241bfd6
+QT5SCRIPT_SITE = $(QT5_SITE)/qtscript/-/archive/$(QT5SCRIPT_VERSION)
+QT5SCRIPT_SOURCE = qtscript-$(QT5SCRIPT_VERSION).tar.bz2
 QT5SCRIPT_INSTALL_STAGING = YES
+QT5SCRIPT_SYNC_QT_HEADERS = YES
 
 # JavaScriptCore contains files under BSD-2-Clause, BSD-3-Clause, and LGPL-2+.
 # This is linked into libQt5Script, which also contains Qt sources under
diff --git a/package/qt5/qt5scxml/qt5scxml.hash b/package/qt5/qt5scxml/qt5scxml.hash
index 6f816548e6..85e72f5378 100644
--- a/package/qt5/qt5scxml/qt5scxml.hash
+++ b/package/qt5/qt5scxml/qt5scxml.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtscxml-everywhere-src-5.15.2.tar.xz.sha256
-sha256  60b9590b9a41c60cee7b8a8c8410ee4625f0389c1ff8d79883ec5a985638a7dc  qtscxml-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  6ce28e969efae2ab74fe3eda61a5d90fcfc4bf734cd9f36942a6968189530e69  qtscxml-7a15000f42c7a3171719727cd056f82a78244ed7.tar.bz2
 
 # Hashes for license files:
 sha256  0dbe024961f6ab5c52689cbd036c977975d0d0f6a67ff97762d96cb819dd5652  LICENSE.GPL3-EXCEPT
diff --git a/package/qt5/qt5scxml/qt5scxml.mk b/package/qt5/qt5scxml/qt5scxml.mk
index 186a2d381b..d5d26536a3 100644
--- a/package/qt5/qt5scxml/qt5scxml.mk
+++ b/package/qt5/qt5scxml/qt5scxml.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT5SCXML_VERSION = $(QT5_VERSION)
-QT5SCXML_SITE = $(QT5_SITE)
-QT5SCXML_SOURCE = qtscxml-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5SCXML_VERSION).tar.xz
+QT5SCXML_VERSION = 7a15000f42c7a3171719727cd056f82a78244ed7
+QT5SCXML_SITE = $(QT5_SITE)/qtscxml/-/archive/$(QT5SCXML_VERSION)
+QT5SCXML_SOURCE = qtscxml-$(QT5SCXML_VERSION).tar.bz2
 QT5SCXML_DEPENDENCIES = qt5declarative
 QT5SCXML_INSTALL_STAGING = YES
+QT5SCXML_SYNC_QT_HEADERS = YES
 
 QT5SCXML_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5SCXML_LICENSE_FILES = LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
diff --git a/package/qt5/qt5sensors/qt5sensors.hash b/package/qt5/qt5sensors/qt5sensors.hash
index 179c9833e0..6be87e8cf9 100644
--- a/package/qt5/qt5sensors/qt5sensors.hash
+++ b/package/qt5/qt5sensors/qt5sensors.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtsensors-everywhere-src-5.15.2.tar.xz.sha256
-sha256  3f0011f9e9942cad119146b54d960438f4568a22a274cdad4fae06bb4e0e4839  qtsensors-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  1db8f6093595b574217eaec98da874d5eb46bb80343ddaa0a5bff0f6b45c5498  qtsensors-921a31375f29e429e95352b08b2b9dbfea663cb1.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5sensors/qt5sensors.mk b/package/qt5/qt5sensors/qt5sensors.mk
index f928aad1c1..eebda912a9 100644
--- a/package/qt5/qt5sensors/qt5sensors.mk
+++ b/package/qt5/qt5sensors/qt5sensors.mk
@@ -4,12 +4,13 @@
 #
 ################################################################################
 
-QT5SENSORS_VERSION = $(QT5_VERSION)
-QT5SENSORS_SITE = $(QT5_SITE)
-QT5SENSORS_SOURCE = qtsensors-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5SENSORS_VERSION).tar.xz
+QT5SENSORS_VERSION = 921a31375f29e429e95352b08b2b9dbfea663cb1
+QT5SENSORS_SITE = $(QT5_SITE)/qtsensors/-/archive/$(QT5SENSORS_VERSION)
+QT5SENSORS_SOURCE = qtsensors-$(QT5SENSORS_VERSION).tar.bz2
 QT5SENSORS_INSTALL_STAGING = YES
 QT5SENSORS_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5SENSORS_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
+QT5SENSORS_SYNC_QT_HEADERS = YES
 
 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5SENSORS_DEPENDENCIES += qt5declarative
diff --git a/package/qt5/qt5serialbus/qt5serialbus.hash b/package/qt5/qt5serialbus/qt5serialbus.hash
index 4f05049b99..8b560a8a83 100644
--- a/package/qt5/qt5serialbus/qt5serialbus.hash
+++ b/package/qt5/qt5serialbus/qt5serialbus.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtserialbus-everywhere-src-5.15.2.tar.xz.sha256
-sha256  aeeb7e5c0d3f8503215b22e1a84c0002ca67cf63862f6e3c6ef44a67ca31bd88  qtserialbus-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  77056fba2ea313241c4780d959d8a3d916add816ced4cd5c95138e331a178d6b  qtserialbus-8884c5e43df846deac5a0c7c290eeb633d6bfe32.tar.bz2
 
 # Hashes for license files:
 sha256  edfe70e99be2a7c109d860b19204609e582720b211c50caedac729da372a1253  LICENSE.GPLv2
diff --git a/package/qt5/qt5serialbus/qt5serialbus.mk b/package/qt5/qt5serialbus/qt5serialbus.mk
index 412a255612..fc62c85318 100644
--- a/package/qt5/qt5serialbus/qt5serialbus.mk
+++ b/package/qt5/qt5serialbus/qt5serialbus.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT5SERIALBUS_VERSION = $(QT5_VERSION)
-QT5SERIALBUS_SITE = $(QT5_SITE)
-QT5SERIALBUS_SOURCE = qtserialbus-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5SERIALBUS_VERSION).tar.xz
+QT5SERIALBUS_VERSION = 8884c5e43df846deac5a0c7c290eeb633d6bfe32
+QT5SERIALBUS_SITE = $(QT5_SITE)/qtserialbus/-/archive/$(QT5SERIALBUS_VERSION)
+QT5SERIALBUS_SOURCE = qtserialbus-$(QT5SERIALBUS_VERSION).tar.bz2
 QT5SERIALBUS_DEPENDENCIES = qt5serialport
 QT5SERIALBUS_INSTALL_STAGING = YES
+QT5SERIALBUS_SYNC_QT_HEADERS = YES
 
 QT5SERIALBUS_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-3.0, GFDL-1.3 (docs)
 QT5SERIALBUS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv3 LICENSE.FDL
diff --git a/package/qt5/qt5serialport/qt5serialport.hash b/package/qt5/qt5serialport/qt5serialport.hash
index 37bc8401f8..6d821c387f 100644
--- a/package/qt5/qt5serialport/qt5serialport.hash
+++ b/package/qt5/qt5serialport/qt5serialport.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtserialport-everywhere-src-5.15.2.tar.xz.sha256
-sha256  59c559d748417306bc1b2cf2315c1e63eed011ace38ad92946af71f23e2ef79d  qtserialport-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  fb618df447132364cabf75e36b5a1d74ae7664a604662366711b58e10d1ce075  qtserialport-941d1d8560d1f3e40077c251fbde6fd6a5b0f0d4.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5serialport/qt5serialport.mk b/package/qt5/qt5serialport/qt5serialport.mk
index 902967c757..370093f6f8 100644
--- a/package/qt5/qt5serialport/qt5serialport.mk
+++ b/package/qt5/qt5serialport/qt5serialport.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT5SERIALPORT_VERSION = $(QT5_VERSION)
-QT5SERIALPORT_SITE = $(QT5_SITE)
-QT5SERIALPORT_SOURCE = qtserialport-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5SERIALPORT_VERSION).tar.xz
+QT5SERIALPORT_VERSION = 941d1d8560d1f3e40077c251fbde6fd6a5b0f0d4
+QT5SERIALPORT_SITE = $(QT5_SITE)/qtserialport/-/archive/$(QT5SERIALPORT_VERSION)
+QT5SERIALPORT_SOURCE = qtserialport-$(QT5SERIALPORT_VERSION).tar.bz2
 QT5SERIALPORT_INSTALL_STAGING = YES
 QT5SERIALPORT_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5SERIALPORT_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
+QT5SERIALPORT_SYNC_QT_HEADERS = YES
 
 $(eval $(qmake-package))
diff --git a/package/qt5/qt5svg/qt5svg.hash b/package/qt5/qt5svg/qt5svg.hash
index 7773a940bb..abffc2891d 100644
--- a/package/qt5/qt5svg/qt5svg.hash
+++ b/package/qt5/qt5svg/qt5svg.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtsvg-everywhere-src-5.15.2.tar.xz.sha256
-sha256  8bc3c2c1bc2671e9c67d4205589a8309b57903721ad14c60ea21a5d06acb585e  qtsvg-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  5d058785a3fd18fa9b94656e1b0bb097d423e21cd3d2a217a77e9dc708a9eb0c  qtsvg-0cb681eacca0f757702fa409bb05d3d3650aba4e.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5svg/qt5svg.mk b/package/qt5/qt5svg/qt5svg.mk
index d4b31c231e..d48a37fafe 100644
--- a/package/qt5/qt5svg/qt5svg.mk
+++ b/package/qt5/qt5svg/qt5svg.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT5SVG_VERSION = $(QT5_VERSION)
-QT5SVG_SITE = $(QT5_SITE)
-QT5SVG_SOURCE = qtsvg-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5SVG_VERSION).tar.xz
+QT5SVG_VERSION = 0cb681eacca0f757702fa409bb05d3d3650aba4e
+QT5SVG_SITE = $(QT5_SITE)/qtsvg/-/archive/$(QT5SVG_VERSION)
+QT5SVG_SOURCE = qtsvg-$(QT5SVG_VERSION).tar.bz2
 QT5SVG_INSTALL_STAGING = YES
 QT5SVG_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5SVG_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPLv3 LICENSE.LGPLv3 LICENSE.FDL
+QT5SVG_SYNC_QT_HEADERS = YES
 
 $(eval $(qmake-package))
diff --git a/package/qt5/qt5tools/qt5tools.hash b/package/qt5/qt5tools/qt5tools.hash
index e52d8e6df7..a563801997 100644
--- a/package/qt5/qt5tools/qt5tools.hash
+++ b/package/qt5/qt5tools/qt5tools.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qttools-everywhere-src-5.15.2.tar.xz.sha256
-sha256  c189d0ce1ff7c739db9a3ace52ac3e24cb8fd6dbf234e49f075249b38f43c1cc  qttools-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  e5ee14a50d5be68ba53e11c76c6e90cc7d7023eab5050447869e7f5e472478a8  qttools-33693a928986006d79c1ee743733cde5966ac402.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5tools/qt5tools.mk b/package/qt5/qt5tools/qt5tools.mk
index 0543afd8f7..e2385080ce 100644
--- a/package/qt5/qt5tools/qt5tools.mk
+++ b/package/qt5/qt5tools/qt5tools.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT5TOOLS_VERSION = $(QT5_VERSION)
-QT5TOOLS_SITE = $(QT5_SITE)
-QT5TOOLS_SOURCE = qttools-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5TOOLS_VERSION).tar.xz
+QT5TOOLS_VERSION = 33693a928986006d79c1ee743733cde5966ac402
+QT5TOOLS_SITE = $(QT5_SITE)/qttools/-/archive/$(QT5TOOLS_VERSION)
+QT5TOOLS_SOURCE = qttools-$(QT5TOOLS_VERSION).tar.bz2
 
 QT5TOOLS_INSTALL_STAGING = YES
+QT5TOOLS_SYNC_QT_HEADERS = YES
 
 # linguist tools compile conditionally on qtHaveModule(qmldevtools-private),
 # but the condition is used only used to decide if lupdate will support
diff --git a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.hash b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.hash
index 82f132378e..1e2c658109 100644
--- a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.hash
+++ b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtvirtualkeyboard-everywhere-src-5.15.2.tar.xz.sha256
-sha256  9a3193913be30f09a896e3b8c2f9696d2e9b3f88a63ae9ca8c97a2786b68cf55  qtvirtualkeyboard-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  5da55e63278127365d8d8881e43b34fd6544dfb46c7e1116ea15e16a3d211afe  qtvirtualkeyboard-353b75b2e34bdae901625bbddf5c5e3f3e6c0de5.tar.bz2
 
 # Hashes for license files:
 sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  LICENSE.GPL3
diff --git a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
index 3984c9866e..db0884fd18 100644
--- a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
+++ b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT5VIRTUALKEYBOARD_VERSION = $(QT5_VERSION)
-QT5VIRTUALKEYBOARD_SITE = $(QT5_SITE)
-QT5VIRTUALKEYBOARD_SOURCE = qtvirtualkeyboard-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5VIRTUALKEYBOARD_VERSION).tar.xz
+QT5VIRTUALKEYBOARD_VERSION = 353b75b2e34bdae901625bbddf5c5e3f3e6c0de5
+QT5VIRTUALKEYBOARD_SITE = $(QT5_SITE)/qtvirtualkeyboard/-/archive/$(QT5VIRTUALKEYBOARD_VERSION)
+QT5VIRTUALKEYBOARD_SOURCE = qtvirtualkeyboard-$(QT5VIRTUALKEYBOARD_VERSION).tar.bz2
 QT5VIRTUALKEYBOARD_DEPENDENCIES = qt5declarative qt5svg
 QT5VIRTUALKEYBOARD_INSTALL_STAGING = YES
+QT5VIRTUALKEYBOARD_SYNC_QT_HEADERS = YES
 
 QT5VIRTUALKEYBOARD_LICENSE = GPL-3.0
 QT5VIRTUALKEYBOARD_LICENSE_FILES = LICENSE.GPL3
diff --git a/package/qt5/qt5wayland/qt5wayland.hash b/package/qt5/qt5wayland/qt5wayland.hash
index b17dbdd10d..35708ec077 100644
--- a/package/qt5/qt5wayland/qt5wayland.hash
+++ b/package/qt5/qt5wayland/qt5wayland.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtwayland-everywhere-src-5.15.2.tar.xz.sha256
-sha256  193732229ff816f3aaab9a5e2f6bed71ddddbf1988ce003fe8dd84a92ce9aeb5  qtwayland-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  11dcc39291976721adc453f484e7b5ae22a574bce0710e24c61c2e80e6268e30  qtwayland-e0646f531e1e73a90a93faaa45d933ae40769985.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5wayland/qt5wayland.mk b/package/qt5/qt5wayland/qt5wayland.mk
index 0076bbfe73..70e5b2655e 100644
--- a/package/qt5/qt5wayland/qt5wayland.mk
+++ b/package/qt5/qt5wayland/qt5wayland.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT5WAYLAND_VERSION = $(QT5_VERSION)
-QT5WAYLAND_SITE = $(QT5_SITE)
-QT5WAYLAND_SOURCE = qtwayland-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5WAYLAND_VERSION).tar.xz
+QT5WAYLAND_VERSION = e0646f531e1e73a90a93faaa45d933ae40769985
+QT5WAYLAND_SITE = $(QT5_SITE)/qtwayland/-/archive/$(QT5WAYLAND_VERSION)
+QT5WAYLAND_SOURCE = qtwayland-$(QT5WAYLAND_VERSION).tar.bz2
 QT5WAYLAND_DEPENDENCIES = wayland
 QT5WAYLAND_INSTALL_STAGING = YES
+QT5WAYLAND_SYNC_QT_HEADERS = YES
 
 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
 QT5WAYLAND_DEPENDENCIES += qt5declarative
diff --git a/package/qt5/qt5webchannel/qt5webchannel.hash b/package/qt5/qt5webchannel/qt5webchannel.hash
index 47c7da3365..af195b32b3 100644
--- a/package/qt5/qt5webchannel/qt5webchannel.hash
+++ b/package/qt5/qt5webchannel/qt5webchannel.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtwebchannel-everywhere-src-5.15.2.tar.xz.sha256
-sha256  127fe79c43b386713f151ed7d411cd81e45e29f9c955584f29736f78c9303ec1  qtwebchannel-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  cc75d29ca38d512b79f2bfbcdb641cdb02dd3a1024f2c9c530abec00418effbf  qtwebchannel-fa8b07105b5e274daaa8adcc129fa4aa0447f9f7.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5webchannel/qt5webchannel.mk b/package/qt5/qt5webchannel/qt5webchannel.mk
index 176c0fd7a3..042a28fca9 100644
--- a/package/qt5/qt5webchannel/qt5webchannel.mk
+++ b/package/qt5/qt5webchannel/qt5webchannel.mk
@@ -4,13 +4,14 @@
 #
 ################################################################################
 
-QT5WEBCHANNEL_VERSION = $(QT5_VERSION)
-QT5WEBCHANNEL_SITE = $(QT5_SITE)
-QT5WEBCHANNEL_SOURCE = qtwebchannel-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5WEBCHANNEL_VERSION).tar.xz
+QT5WEBCHANNEL_VERSION = fa8b07105b5e274daaa8adcc129fa4aa0447f9f7
+QT5WEBCHANNEL_SITE = $(QT5_SITE)/qtwebchannel/-/archive/$(QT5WEBCHANNEL_VERSION)
+QT5WEBCHANNEL_SOURCE = qtwebchannel-$(QT5WEBCHANNEL_VERSION).tar.bz2
 QT5WEBCHANNEL_DEPENDENCIES = qt5websockets
 QT5WEBCHANNEL_INSTALL_STAGING = YES
 QT5WEBCHANNEL_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5WEBCHANNEL_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
+QT5WEBCHANNEL_SYNC_QT_HEADERS = YES
 
 ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
 QT5WEBCHANNEL_LICENSE += , BSD-3-Clause (examples)
diff --git a/package/qt5/qt5webkit-examples/qt5webkit-examples.mk b/package/qt5/qt5webkit-examples/qt5webkit-examples.mk
index 84bc291739..3b14284e37 100644
--- a/package/qt5/qt5webkit-examples/qt5webkit-examples.mk
+++ b/package/qt5/qt5webkit-examples/qt5webkit-examples.mk
@@ -6,7 +6,7 @@
 
 QT5WEBKIT_EXAMPLES_VERSION = 5.9.1
 QT5WEBKIT_EXAMPLES_SITE = https://download.qt.io/official_releases/qt/5.9/5.9.1/submodules
-QT5WEBKIT_EXAMPLES_SOURCE = qtwebkit-examples-opensource-src-$(QT5WEBKIT_VERSION).tar.xz
+QT5WEBKIT_EXAMPLES_SOURCE = qtwebkit-examples-opensource-src-$(QT5WEBKIT_EXAMPLES_VERSION).tar.xz
 QT5WEBKIT_EXAMPLES_DEPENDENCIES = qt5webkit
 
 QT5WEBKIT_EXAMPLES_LICENSE_FILES = LICENSE.LGPLv21 LICENSE.LGPLv3 LICENSE.GPLv2 LICENSE.GPLv3
diff --git a/package/qt5/qt5websockets/qt5websockets.hash b/package/qt5/qt5websockets/qt5websockets.hash
index 29a9ebe439..3cc87865dc 100644
--- a/package/qt5/qt5websockets/qt5websockets.hash
+++ b/package/qt5/qt5websockets/qt5websockets.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtwebsockets-everywhere-src-5.15.2.tar.xz.sha256
-sha256  a0b42d85dd34ff6e2d23400e02f83d8b85bcd80e60efd1521d12d9625d4a233f  qtwebsockets-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  0f59abfa0172e1d4f7cddc3ed457b71faa3bba1cc25b02a06aa79b5ba0c68653  qtwebsockets-b13b56904b76e96ea52d0efe56395acc94b17d96.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5websockets/qt5websockets.mk b/package/qt5/qt5websockets/qt5websockets.mk
index a35cdc5799..d222f025ee 100644
--- a/package/qt5/qt5websockets/qt5websockets.mk
+++ b/package/qt5/qt5websockets/qt5websockets.mk
@@ -4,12 +4,13 @@
 #
 ################################################################################
 
-QT5WEBSOCKETS_VERSION = $(QT5_VERSION)
-QT5WEBSOCKETS_SITE = $(QT5_SITE)
-QT5WEBSOCKETS_SOURCE = qtwebsockets-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5WEBSOCKETS_VERSION).tar.xz
+QT5WEBSOCKETS_VERSION = b13b56904b76e96ea52d0efe56395acc94b17d96
+QT5WEBSOCKETS_SITE = $(QT5_SITE)/qtwebsockets/-/archive/$(QT5WEBSOCKETS_VERSION)
+QT5WEBSOCKETS_SOURCE = qtwebsockets-$(QT5WEBSOCKETS_VERSION).tar.bz2
 QT5WEBSOCKETS_INSTALL_STAGING = YES
 QT5WEBSOCKETS_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools)
 QT5WEBSOCKETS_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3
+QT5WEBSOCKETS_SYNC_QT_HEADERS = YES
 
 ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
 QT5WEBSOCKETS_LICENSE += , BSD-3-Clause (examples)
diff --git a/package/qt5/qt5webview/qt5webview.hash b/package/qt5/qt5webview/qt5webview.hash
index c1cee9cf85..51d0fb0d7a 100644
--- a/package/qt5/qt5webview/qt5webview.hash
+++ b/package/qt5/qt5webview/qt5webview.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtwebview-everywhere-src-5.15.2.tar.xz.sha256
-sha256  be9f46167e4977ead5ef5ecf883fdb812a4120f2436383583792f65557e481e7  qtwebview-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  0fd949c35355bbde613c9daa61e32a3d8ed4a7b3e9fc0e3acf92981cc8bf16c3  qtwebview-920de5f1cd9f9001cfef1bfd2c19e6720793362f.tar.bz2
 
 # Hashes for license files:
 sha256  ed8742a95cb9db653a09b050e27ccff5e67ba69c14aa2c3137f2a4e1892f6c0d  LICENSE.FDL
diff --git a/package/qt5/qt5webview/qt5webview.mk b/package/qt5/qt5webview/qt5webview.mk
index 0f37f3eb85..ed1cfe5065 100644
--- a/package/qt5/qt5webview/qt5webview.mk
+++ b/package/qt5/qt5webview/qt5webview.mk
@@ -4,13 +4,14 @@
 #
 ################################################################################
 
-QT5WEBVIEW_VERSION = $(QT5_VERSION)
-QT5WEBVIEW_SITE = $(QT5_SITE)
-QT5WEBVIEW_SOURCE = qtwebview-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5WEBVIEW_VERSION).tar.xz
+QT5WEBVIEW_VERSION = 920de5f1cd9f9001cfef1bfd2c19e6720793362f
+QT5WEBVIEW_SITE = $(QT5_SITE)/qtwebview/-/archive/$(QT5WEBVIEW_VERSION)
+QT5WEBVIEW_SOURCE = qtwebview-$(QT5WEBVIEW_VERSION).tar.bz2
 QT5WEBVIEW_DEPENDENCIES = qt5webengine
 QT5WEBVIEW_INSTALL_STAGING = YES
 QT5WEBVIEW_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0, GFDL-1.3 (docs)
 QT5WEBVIEW_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv3 LICENSE.FDL
+QT5WEBVIEW_SYNC_QT_HEADERS = YES
 
 ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
 QT5WEBVIEW_LICENSE += , BSD-3-Clause (examples)
diff --git a/package/qt5/qt5x11extras/qt5x11extras.hash b/package/qt5/qt5x11extras/qt5x11extras.hash
index 08e6753f21..b854cedcb6 100644
--- a/package/qt5/qt5x11extras/qt5x11extras.hash
+++ b/package/qt5/qt5x11extras/qt5x11extras.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtx11extras-everywhere-src-5.15.2.tar.xz.sha256
-sha256  7014702ee9a644a5a93da70848ac47c18851d4f8ed622b29a72eed9282fc6e3e  qtx11extras-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  b562bc8b81e35d71df5530be07522b50065f177fb744782e4fc7536970c5d9da  qtx11extras-3898f5484fd4864b047729bfeda9a1222f32364f.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5x11extras/qt5x11extras.mk b/package/qt5/qt5x11extras/qt5x11extras.mk
index 075d36dcd8..7b1e32df17 100644
--- a/package/qt5/qt5x11extras/qt5x11extras.mk
+++ b/package/qt5/qt5x11extras/qt5x11extras.mk
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-QT5X11EXTRAS_VERSION = $(QT5_VERSION)
-QT5X11EXTRAS_SITE = $(QT5_SITE)
-QT5X11EXTRAS_SOURCE = qtx11extras-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5X11EXTRAS_VERSION).tar.xz
+QT5X11EXTRAS_VERSION = 3898f5484fd4864b047729bfeda9a1222f32364f
+QT5X11EXTRAS_SITE = $(QT5_SITE)/qtx11extras/-/archive/$(QT5X11EXTRAS_VERSION)
+QT5X11EXTRAS_SOURCE = qtx11extras-$(QT5X11EXTRAS_VERSION).tar.bz2
 QT5X11EXTRAS_INSTALL_STAGING = YES
 QT5X11EXTRAS_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5X11EXTRAS_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
+QT5X11EXTRAS_SYNC_QT_HEADERS = YES
 
 $(eval $(qmake-package))
diff --git a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.hash b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.hash
index 682e114a7f..c0e3caa407 100644
--- a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.hash
+++ b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.hash
@@ -1,5 +1,5 @@
-# Hash from: https://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/qtxmlpatterns-everywhere-src-5.15.2.tar.xz.sha256
-sha256  76ea2162a7c349188d7e7e4f6c77b78e8a205494c90fee3cea3487a1ae2cf2fa  qtxmlpatterns-everywhere-src-5.15.2.tar.xz
+# Locally calculated
+sha256  20363267cd8dc93622a0f444708eb83f0ed6d9d9bceaf13c5db806d96b00cf09  qtxmlpatterns-189e28d0aff1f3d7960228ba318b83e3cadac98c.tar.bz2
 
 # Hashes for license files:
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
diff --git a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
index 6845483327..27818ecb78 100644
--- a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
+++ b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
@@ -4,12 +4,13 @@
 #
 ################################################################################
 
-QT5XMLPATTERNS_VERSION = $(QT5_VERSION)
-QT5XMLPATTERNS_SITE = $(QT5_SITE)
-QT5XMLPATTERNS_SOURCE = qtxmlpatterns-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5XMLPATTERNS_VERSION).tar.xz
+QT5XMLPATTERNS_VERSION = 189e28d0aff1f3d7960228ba318b83e3cadac98c
+QT5XMLPATTERNS_SITE = $(QT5_SITE)/qtxmlpatterns/-/archive/$(QT5XMLPATTERNS_VERSION)
+QT5XMLPATTERNS_SOURCE = qtxmlpatterns-$(QT5XMLPATTERNS_VERSION).tar.bz2
 QT5XMLPATTERNS_INSTALL_STAGING = YES
 QT5XMLPATTERNS_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5XMLPATTERNS_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
+QT5XMLPATTERNS_SYNC_QT_HEADERS = YES
 
 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5XMLPATTERNS_DEPENDENCIES += qt5declarative
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related

* Re: Re: [PATCH] thunderbolt: Check for null pointer after calling kmemdup
From: Mika Westerberg @ 2022-01-05 10:11 UTC (permalink / raw)
  To: Jiasheng Jiang
  Cc: andreas.noever, michael.jamet, YehezkelShB, linux-usb,
	linux-kernel
In-Reply-To: <20220105085307.2410653-1-jiasheng@iscas.ac.cn>

On Wed, Jan 05, 2022 at 04:53:07PM +0800, Jiasheng Jiang wrote:
> On Wed, Jan 05, 2022 at 03:30:47PM +0800, Mika Westerberg wrote:
> > This is doing two things so I suggest sending two patches instead.
> 
> Fine, I have already sent the patch for icm_handle_event() independently.

Thanks!

> > However, for the UUID part, I think it works fine if we get NULL (and I
> > think kmemdup() issues warning too).
> >
> > There are probably not needed either since the "fix" here is for pretty
> > rare case of running out of memory. I think there is not even a NULL
> > pointer dereference because UUID is optional.
> 
> As for icm_icl_set_uuid(), I think the check for kmemdup() is needed.
> Because users need to know that icm_start() fails, or they will be puzzled
> why the uuid is unsetted.
> So at least it is a cleanup.
> if so, I would like to send patch for icm_icl_set_uuid() without fixes tag.

I don't think icm_start() actually fails because if this. If the UUID is
not set tb_switch_add() will look it up from the host router vendor area
then.

We can log a warning or something like that (but I think that's already
done in kmemdup()).

^ permalink raw reply

* Re: [PATCH 3/4] coresight: trbe: Work around the invalid prohibited states
From: Suzuki K Poulose @ 2022-01-05 10:13 UTC (permalink / raw)
  To: Anshuman Khandual, linux-arm-kernel
  Cc: Catalin Marinas, Will Deacon, Mathieu Poirier, coresight,
	linux-doc, linux-kernel
In-Reply-To: <1641359159-22726-4-git-send-email-anshuman.khandual@arm.com>

Hi Anshuman

On 05/01/2022 05:05, Anshuman Khandual wrote:
> TRBE implementations affected by Arm erratum #2038923 might get TRBE into
> an inconsistent view on whether trace is prohibited within the CPU. As a
> result, the trace buffer or trace buffer state might be corrupted. This
> happens after TRBE buffer has been enabled by setting TRBLIMITR_EL1.E,
> followed by just a single context synchronization event before execution
> changes from a context, in which trace is prohibited to one where it isn't,
> or vice versa. In these mentioned conditions, the view of whether trace is
> prohibited is inconsistent between parts of the CPU, and the trace buffer
> or the trace buffer state might be corrupted.
> 
> Work around this problem in the TRBE driver by preventing an inconsistent
> view of whether the trace is prohibited or not based on TRBLIMITR_EL1.E by
> immediately following a change to TRBLIMITR_EL1.E with at least one ISB
> instruction before an ERET, or two ISB instructions if no ERET is to take
> place. This adds a new cpu errata in arm64 errata framework and also
> updates TRBE driver as required.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Cc: Suzuki Poulose <suzuki.poulose@arm.com>
> Cc: coresight@lists.linaro.org
> Cc: linux-doc@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
>   Documentation/arm64/silicon-errata.rst       |  2 +
>   arch/arm64/Kconfig                           | 23 ++++++++++
>   arch/arm64/kernel/cpu_errata.c               |  9 ++++
>   arch/arm64/tools/cpucaps                     |  1 +
>   drivers/hwtracing/coresight/coresight-trbe.c | 47 +++++++++++++++-----
>   5 files changed, 72 insertions(+), 10 deletions(-)

As with the previous patch, it may be a good idea to split the
patch to arm64 and trbe parts.

> 
> diff --git a/Documentation/arm64/silicon-errata.rst b/Documentation/arm64/silicon-errata.rst
> index c9b30e6c2b6c..e0ef3e9a4b8b 100644
> --- a/Documentation/arm64/silicon-errata.rst
> +++ b/Documentation/arm64/silicon-errata.rst
> @@ -54,6 +54,8 @@ stable kernels.
>   +----------------+-----------------+-----------------+-----------------------------+
>   | ARM            | Cortex-A510     | #2064142        | ARM64_ERRATUM_2064142       |
>   +----------------+-----------------+-----------------+-----------------------------+
> +| ARM            | Cortex-A510     | #2038923        | ARM64_ERRATUM_2038923       |
> ++----------------+-----------------+-----------------+-----------------------------+
>   | ARM            | Cortex-A53      | #826319         | ARM64_ERRATUM_826319        |
>   +----------------+-----------------+-----------------+-----------------------------+
>   | ARM            | Cortex-A53      | #827319         | ARM64_ERRATUM_827319        |
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 2105b68d88db..026e34fb6fad 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -796,6 +796,29 @@ config ARM64_ERRATUM_2064142
>   
>   	  If unsure, say Y.
>   
> +config ARM64_ERRATUM_2038923
> +	bool "Cortex-A510: 2038923: workaround TRBE corruption with enable"
> +	depends on CORESIGHT_TRBE
> +	default y
> +	help
> +	  This option adds the workaround for ARM Cortex-A510 erratum 2038923.
> +
> +	  Affected Cortex-A510 core might cause an inconsistent view on whether trace is
> +	  prohibited within the CPU. As a result, the trace buffer or trace buffer state
> +	  might be corrupted. This happens after TRBE buffer has been enabled by setting
> +	  TRBLIMITR_EL1.E, followed by just a single context synchronization event before
> +	  execution changes from a context, in which trace is prohibited to one where it
> +	  isn't, or vice versa. In these mentioned conditions, the view of whether trace
> +	  is prohibited is inconsistent between parts of the CPU, and the trace buffer or
> +	  the trace buffer state might be corrupted.
> +
> +	  Work around this in the driver by preventing an inconsistent view of whether the
> +	  trace is prohibited or not based on TRBLIMITR_EL1.E by immediately following a
> +	  change to TRBLIMITR_EL1.E with at least one ISB instruction before an ERET, or
> +	  two ISB instructions if no ERET is to take place.
> +
> +	  If unsure, say Y.
> +
>   config CAVIUM_ERRATUM_22375
>   	bool "Cavium erratum 22375, 24313"
>   	default y
> diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
> index cbb7d5a9aee7..60b0c1f1d912 100644
> --- a/arch/arm64/kernel/cpu_errata.c
> +++ b/arch/arm64/kernel/cpu_errata.c
> @@ -607,6 +607,15 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
>   		ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A510, 0, 0, 2)
>   	},
>   #endif
> +#ifdef CONFIG_ARM64_ERRATUM_2038923
> +	{
> +		.desc = "ARM erratum 2038923",
> +		.capability = ARM64_WORKAROUND_2038923,
> +
> +		/* Cortex-A510 r0p0 - r0p2 */
> +		ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A510, 0, 0, 2)
> +	},
> +#endif
>   	{
>   	}
>   };
> diff --git a/arch/arm64/tools/cpucaps b/arch/arm64/tools/cpucaps
> index fca3cb329e1d..45a06d36d080 100644
> --- a/arch/arm64/tools/cpucaps
> +++ b/arch/arm64/tools/cpucaps
> @@ -56,6 +56,7 @@ WORKAROUND_1463225
>   WORKAROUND_1508412
>   WORKAROUND_1542419
>   WORKAROUND_2064142
> +WORKAROUND_2038923
>   WORKAROUND_TRBE_OVERWRITE_FILL_MODE
>   WORKAROUND_TSB_FLUSH_FAILURE
>   WORKAROUND_TRBE_WRITE_OUT_OF_RANGE
> diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c
> index ec24b62b2cec..0689c6dab96d 100644
> --- a/drivers/hwtracing/coresight/coresight-trbe.c
> +++ b/drivers/hwtracing/coresight/coresight-trbe.c
> @@ -92,11 +92,13 @@ struct trbe_buf {
>   #define TRBE_WORKAROUND_OVERWRITE_FILL_MODE	0
>   #define TRBE_WORKAROUND_WRITE_OUT_OF_RANGE	1
>   #define TRBE_WORKAROUND_SYSREG_WRITE_FAILURE	2
> +#define TRBE_WORKAROUND_CORRUPTION_WITH_ENABLE	3
>   
>   static int trbe_errata_cpucaps[] = {
>   	[TRBE_WORKAROUND_OVERWRITE_FILL_MODE] = ARM64_WORKAROUND_TRBE_OVERWRITE_FILL_MODE,
>   	[TRBE_WORKAROUND_WRITE_OUT_OF_RANGE] = ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE,
>   	[TRBE_WORKAROUND_SYSREG_WRITE_FAILURE] = ARM64_WORKAROUND_2064142,
> +	[TRBE_WORKAROUND_CORRUPTION_WITH_ENABLE] = ARM64_WORKAROUND_2038923,
>   	-1,		/* Sentinel, must be the last entry */
>   };
>   
> @@ -174,6 +176,11 @@ static inline bool trbe_may_fail_sysreg_write(struct trbe_cpudata *cpudata)
>   	return trbe_has_erratum(cpudata, TRBE_WORKAROUND_SYSREG_WRITE_FAILURE);
>   }
>   
> +static inline bool trbe_may_corrupt_with_enable(struct trbe_cpudata *cpudata)
> +{

minor nit: trbe_needs_{ctxt_sync, isb}_after_enable() ?

> +	return trbe_has_erratum(cpudata, TRBE_WORKAROUND_CORRUPTION_WITH_ENABLE);
> +}
> +
>   static int trbe_alloc_node(struct perf_event *event)
>   {
>   	if (event->cpu == -1)
> @@ -187,6 +194,30 @@ static inline void trbe_drain_buffer(void)
>   	dsb(nsh);
>   }
>   
> +static inline void set_trbe_enabled(struct trbe_cpudata *cpudata)
> +{
> +	u64 trblimitr = read_sysreg_s(SYS_TRBLIMITR_EL1);

minor nit: This implies we do the TRBE programming in the following
manner in the common case (i.e, TRBE enabled in the beginning of a
session).
   -> set TRBE LIMIT
   -> read TRBE LIMIT
   -> set TRBE ENABLED

Could we please optimize this ? I believe the buf->trbe_limit
must hold the LIMITR value at any point in time. And thus this
function could simply be :

set_trbe_enabled(trbe_buf)
{
	limitr = trbe_buf->limit | LIMITR_ENABLE
	write(limitr, TRBLIMITR_EL1);
	...
}

Otherwise looks good to me

Suzuki

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply

* Re: [PATCH V40 12/29] x86: Lock down IO port access when the kernel is locked down
From: Matthew Garrett @ 2022-01-05 10:14 UTC (permalink / raw)
  To: Kai-Heng Feng
  Cc: jmorris, linux-security-module, linux-kernel, linux-api,
	David Howells, Kees Cook, x86
In-Reply-To: <CAAd53p6VcAo0MVMWerTag42cWFE2ifzdQ=AFmGd9a=2gFjgv5A@mail.gmail.com>

On Wed, Jan 05, 2022 at 06:05:26PM +0800, Kai-Heng Feng wrote:
> On Wed, Jan 5, 2022 at 3:20 PM Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> >
> > On Wed, Jan 05, 2022 at 02:57:57PM +0800, Kai-Heng Feng wrote:
> >
> > > The affected system from the customer has SecureBoot enabled (and
> > > hence lockdown), and the kernel upgrade surprisingly broke ioperm()
> > > usage.
> >
> > Which kernel was being used that was signed but didn't implement
> > lockdown? That sounds, uh, bad.
> 
> It was upgraded from older distro release. Older kernels don't have lockdown.

But have a signed bootloader? Which releases?

> > There's two main choices:
> >
> > 1) Disable secure boot on the system in question - if there's a need to
> > run userland that can do arbitrary port IO then secure boot isn't
> > providing any meaningful security benefit in any case.
> 
> How so?
> Other security features are still incredible valuable, we don't want
> to toss them out just because someone has to use ioperm().

Because having the ability to do port io allows you to tamper with the 
running kernel and disable all the other security boundaries, making 
them pointless. Many PCI devices have a port IO side channel into MMIO 
BARs for use in early boot, so if an attacker can fill that BAR as they 
wish and then modify the BAR to map it into the kernel address space 
(and fix up the bridges appropriately), or if the port IO interface can 
be used to trigger DMA, the outcomes are pretty bad. The point of 
lockdown is to disable every plausible interface for userland (even uid 
0) to have access to any interfaces that would let them insert modified 
code into ring 0 - port IO is definitely one of those interfaces. An 
attacker could just take a kernel that allows ioperm(), add an initramfs 
containing their payload, boot, hotpatch the kernel to disable lockdown, 
and then kexec into their backdoored payload.

> >
> > 2) Implement a kernel driver that abstracts the hardware access away
> > from userland, and ensures that all the accesses are performed in a safe
> > way.
> >
> > Doing port IO from userland is almost always a terrible idea - it
> > usually involves indexed accesses (you write an address to one port and
> > then write or read data from another), and if two processes are trying
> > to do this simultaneously (either because SMP or because one process
> > gets preempted after writing the address but before accessing the data
> > register), and in that case you can end up with accesses to the wrong
> > register as a result. You really want this sort of thing to be mediated
> > by the kernel, both from a safety perspective and to ensure appropriate
> > synchronisation.
> 
> Agree, let me start a discussion with them.

Sounds good.

^ permalink raw reply

* [Buildroot] [PATCH 1/3] package/qt5/qt5webengine-chromium-catapult: new package
From: James Hilliard @ 2022-01-05 10:14 UTC (permalink / raw)
  To: buildroot
  Cc: Naumann Andreas, Joshua Henderson, Bartosz Bilas,
	Angelo Compagnucci, Peter Seiderer, Gaël Portay,
	Thomas Petazzoni, James Hilliard, Julien Corjon

This version of catapult is python3 compatible and will be used to
replace the python2 only version in qt5webengine-chromium.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 .../qt5webengine-chromium-catapult.hash             |  3 +++
 .../qt5webengine-chromium-catapult.mk               | 13 +++++++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 package/qt5/qt5webengine-chromium-catapult/qt5webengine-chromium-catapult.hash
 create mode 100644 package/qt5/qt5webengine-chromium-catapult/qt5webengine-chromium-catapult.mk

diff --git a/package/qt5/qt5webengine-chromium-catapult/qt5webengine-chromium-catapult.hash b/package/qt5/qt5webengine-chromium-catapult/qt5webengine-chromium-catapult.hash
new file mode 100644
index 0000000000..8190a6dd5d
--- /dev/null
+++ b/package/qt5/qt5webengine-chromium-catapult/qt5webengine-chromium-catapult.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  66b8593e665c4236f7b1c487548d41d3826eddbf486ff985dbdfd01cddcaa1a8  qt5webengine-chromium-catapult-5eedfe23148a234211ba477f76fc2ea2e8529189-br1.tar.gz
+sha256  f0df289ba9d03d857ad1c2f5918861376b1510b71588ffc60eff5c7a7bfedb09  LICENSE
diff --git a/package/qt5/qt5webengine-chromium-catapult/qt5webengine-chromium-catapult.mk b/package/qt5/qt5webengine-chromium-catapult/qt5webengine-chromium-catapult.mk
new file mode 100644
index 0000000000..fac3c996fa
--- /dev/null
+++ b/package/qt5/qt5webengine-chromium-catapult/qt5webengine-chromium-catapult.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# qt5webengine-chromium-catapult
+#
+################################################################################
+
+QT5WEBENGINE_CHROMIUM_CATAPULT_VERSION = 5eedfe23148a234211ba477f76fc2ea2e8529189
+QT5WEBENGINE_CHROMIUM_CATAPULT_SITE = https://chromium.googlesource.com/catapult.git
+QT5WEBENGINE_CHROMIUM_CATAPULT_SITE_METHOD = git
+QT5WEBENGINE_CHROMIUM_CATAPULT_LICENSE = BSD-3-Clause
+QT5WEBENGINE_CHROMIUM_CATAPULT_LICENSE_FILES = LICENSE
+
+$(eval $(generic-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related

* [PATCH 1/2] dt-bindings: reset: mt7986: Add reset-controller header file
From: Sam Shih @ 2022-01-05 10:04 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Matthias Brugger, Philipp Zabel,
	Rob Herring, Ryder Lee, linux-kernel, linux-watchdog,
	linux-arm-kernel, linux-mediatek, devicetree
  Cc: John Crispin, Sam Shih
In-Reply-To: <20220105100456.7126-1-sam.shih@mediatek.com>

Add infracfg, toprgu, and ethsys reset-controller header file
for MT7986 platform.

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
---
 include/dt-bindings/reset/mt7986-resets.h | 55 +++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 include/dt-bindings/reset/mt7986-resets.h

diff --git a/include/dt-bindings/reset/mt7986-resets.h b/include/dt-bindings/reset/mt7986-resets.h
new file mode 100644
index 000000000000..af3d16c81192
--- /dev/null
+++ b/include/dt-bindings/reset/mt7986-resets.h
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
+/*
+ * Copyright (c) 2022 MediaTek Inc.
+ * Author: Sam Shih <sam.shih@mediatek.com>
+ */
+
+#ifndef _DT_BINDINGS_RESET_CONTROLLER_MT7986
+#define _DT_BINDINGS_RESET_CONTROLLER_MT7986
+
+/* INFRACFG resets */
+#define MT7986_INFRACFG_PEXTP_MAC_SW_RST	6
+#define MT7986_INFRACFG_SSUSB_SW_RST		7
+#define MT7986_INFRACFG_EIP97_SW_RST		8
+#define MT7986_INFRACFG_AUDIO_SW_RST		13
+#define MT7986_INFRACFG_CQ_DMA_SW_RST		14
+
+#define MT7986_INFRACFG_TRNG_SW_RST		17
+#define MT7986_INFRACFG_AP_DMA_SW_RST		32
+#define MT7986_INFRACFG_I2C_SW_RST		33
+#define MT7986_INFRACFG_NFI_SW_RST		34
+#define MT7986_INFRACFG_SPI0_SW_RST		35
+#define MT7986_INFRACFG_SPI1_SW_RST		36
+#define MT7986_INFRACFG_UART0_SW_RST		37
+#define MT7986_INFRACFG_UART1_SW_RST		38
+#define MT7986_INFRACFG_UART2_SW_RST		39
+#define MT7986_INFRACFG_AUXADC_SW_RST		43
+
+#define MT7986_INFRACFG_APXGPT_SW_RST		66
+#define MT7986_INFRACFG_PWM_SW_RST		68
+
+#define MT7986_INFRACFG_SW_RST_NUM		69
+
+/* TOPRGU resets */
+#define MT7986_TOPRGU_APMIXEDSYS_SW_RST		0
+#define MT7986_TOPRGU_SGMII0_SW_RST		1
+#define MT7986_TOPRGU_SGMII1_SW_RST		2
+#define MT7986_TOPRGU_INFRA_SW_RST		3
+#define MT7986_TOPRGU_U2PHY_SW_RST		5
+#define MT7986_TOPRGU_PCIE_SW_RST		6
+#define MT7986_TOPRGU_SSUSB_SW_RST		7
+#define MT7986_TOPRGU_ETHDMA_SW_RST		20
+#define MT7986_TOPRGU_CONSYS_SW_RST		23
+
+#define MT7986_TOPRGU_SW_RST_NUM		24
+
+/* ETHSYS Subsystem resets */
+#define MT7986_ETHSYS_FE_SW_RST			6
+#define MT7986_ETHSYS_PMTR_SW_RST		8
+#define MT7986_ETHSYS_GMAC_SW_RST		23
+#define MT7986_ETHSYS_PPE0_SW_RST		30
+#define MT7986_ETHSYS_PPE1_SW_RST		31
+
+#define MT7986_ETHSYS_SW_RST_NUM		32
+
+#endif  /* _DT_BINDINGS_RESET_CONTROLLER_MT7986 */
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related

* [PATCH 0/2] Add toprgu reset-controller support for MT7986
From: Sam Shih @ 2022-01-05 10:04 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Matthias Brugger, Philipp Zabel,
	Rob Herring, Ryder Lee, linux-kernel, linux-watchdog,
	linux-arm-kernel, linux-mediatek, devicetree
  Cc: John Crispin, Sam Shih

These patches aim to add watchdog toprgu reset-controller support
for MT7986.

Sam Shih (2):
  dt-bindings: reset: mt7986: Add reset-controller header file
  watchdog: mtk_wdt: mt7986: Add toprgu reset controller support

 drivers/watchdog/mtk_wdt.c                |  6 +++
 include/dt-bindings/reset/mt7986-resets.h | 55 +++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 include/dt-bindings/reset/mt7986-resets.h

-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply

* [PATCH 2/2] watchdog: mtk_wdt: mt7986: Add toprgu reset controller support
From: Sam Shih @ 2022-01-05 10:04 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Matthias Brugger, Philipp Zabel,
	Rob Herring, Ryder Lee, linux-kernel, linux-watchdog,
	linux-arm-kernel, linux-mediatek, devicetree
  Cc: John Crispin, Sam Shih
In-Reply-To: <20220105100456.7126-1-sam.shih@mediatek.com>

Besides watchdog, the mt7986 toprgu module also provides software reset
functionality for various peripheral subsystems
(eg, ethernet, pcie, and connectivity)

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
---
 drivers/watchdog/mtk_wdt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 543cf38bd04e..c6437fe1f4c0 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -10,6 +10,7 @@
  */
 
 #include <dt-bindings/reset/mt2712-resets.h>
+#include <dt-bindings/reset/mt7986-resets.h>
 #include <dt-bindings/reset/mt8183-resets.h>
 #include <dt-bindings/reset/mt8192-resets.h>
 #include <dt-bindings/reset/mt8195-resets.h>
@@ -76,6 +77,10 @@ static const struct mtk_wdt_data mt2712_data = {
 	.toprgu_sw_rst_num = MT2712_TOPRGU_SW_RST_NUM,
 };
 
+static const struct mtk_wdt_data mt7986_data = {
+	.toprgu_sw_rst_num = MT7986_TOPRGU_SW_RST_NUM,
+};
+
 static const struct mtk_wdt_data mt8183_data = {
 	.toprgu_sw_rst_num = MT8183_TOPRGU_SW_RST_NUM,
 };
@@ -418,6 +423,7 @@ static int mtk_wdt_resume(struct device *dev)
 static const struct of_device_id mtk_wdt_dt_ids[] = {
 	{ .compatible = "mediatek,mt2712-wdt", .data = &mt2712_data },
 	{ .compatible = "mediatek,mt6589-wdt" },
+	{ .compatible = "mediatek,mt7986-wdt", .data = &mt7986_data },
 	{ .compatible = "mediatek,mt8183-wdt", .data = &mt8183_data },
 	{ .compatible = "mediatek,mt8192-wdt", .data = &mt8192_data },
 	{ .compatible = "mediatek,mt8195-wdt", .data = &mt8195_data },
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related

* Re: [PATCH v2 1/3] can: flexcan: change RX-FIFO feature at runtime
From: Marc Kleine-Budde @ 2022-01-05 10:14 UTC (permalink / raw)
  To: Dario Binacchi; +Cc: linux-can
In-Reply-To: <CABGWkvo+h2CASM7q8z3UXRofrY7enVXS6njFKnKyqRUjgkbB_A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1458 bytes --]

On 05.01.2022 09:25:35, Dario Binacchi wrote:
> > Is the name "rx-fifo" acceptable? Can you think of a better name?
> 
> If I am not mistaken this series arises from the need to deactivate
> the RxFIFO only if it is acceptable not to receive the notification of
> RTR messages.

ACK

> I wonder if this can be made explicit to the user.

I was hoping that we can find a better string that better represents
what this option does.

> Do you think it makes sense to explicitly RTR ("rtr-notify") instead
> of RxFIFO (rx-fifo)? And if it makes sense to make it clear that it
> occurs at the expense of a smaller number of messages allocated for
> reception?

I see it the other way round, probably biased by the existing driver :)
The user wants to use more buffers at the expense of loosing the ability
to receive RTR messages.

I've talked to one of my colleges and we came to the conclusion that the
driver should present the user the option to opt out from RTR reception.

If the user has opted out from RTR reception the driver can do internal
optimization, such as switching from FIFO to mailbox mode.

What about "rtr-rx" or "rx-rtr"?

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply

* [PATCH 1/2] dt-bindings: reset: mt7986: Add reset-controller header file
From: Sam Shih @ 2022-01-05 10:04 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Matthias Brugger, Philipp Zabel,
	Rob Herring, Ryder Lee, linux-kernel, linux-watchdog,
	linux-arm-kernel, linux-mediatek, devicetree
  Cc: John Crispin, Sam Shih
In-Reply-To: <20220105100456.7126-1-sam.shih@mediatek.com>

Add infracfg, toprgu, and ethsys reset-controller header file
for MT7986 platform.

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
---
 include/dt-bindings/reset/mt7986-resets.h | 55 +++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 include/dt-bindings/reset/mt7986-resets.h

diff --git a/include/dt-bindings/reset/mt7986-resets.h b/include/dt-bindings/reset/mt7986-resets.h
new file mode 100644
index 000000000000..af3d16c81192
--- /dev/null
+++ b/include/dt-bindings/reset/mt7986-resets.h
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
+/*
+ * Copyright (c) 2022 MediaTek Inc.
+ * Author: Sam Shih <sam.shih@mediatek.com>
+ */
+
+#ifndef _DT_BINDINGS_RESET_CONTROLLER_MT7986
+#define _DT_BINDINGS_RESET_CONTROLLER_MT7986
+
+/* INFRACFG resets */
+#define MT7986_INFRACFG_PEXTP_MAC_SW_RST	6
+#define MT7986_INFRACFG_SSUSB_SW_RST		7
+#define MT7986_INFRACFG_EIP97_SW_RST		8
+#define MT7986_INFRACFG_AUDIO_SW_RST		13
+#define MT7986_INFRACFG_CQ_DMA_SW_RST		14
+
+#define MT7986_INFRACFG_TRNG_SW_RST		17
+#define MT7986_INFRACFG_AP_DMA_SW_RST		32
+#define MT7986_INFRACFG_I2C_SW_RST		33
+#define MT7986_INFRACFG_NFI_SW_RST		34
+#define MT7986_INFRACFG_SPI0_SW_RST		35
+#define MT7986_INFRACFG_SPI1_SW_RST		36
+#define MT7986_INFRACFG_UART0_SW_RST		37
+#define MT7986_INFRACFG_UART1_SW_RST		38
+#define MT7986_INFRACFG_UART2_SW_RST		39
+#define MT7986_INFRACFG_AUXADC_SW_RST		43
+
+#define MT7986_INFRACFG_APXGPT_SW_RST		66
+#define MT7986_INFRACFG_PWM_SW_RST		68
+
+#define MT7986_INFRACFG_SW_RST_NUM		69
+
+/* TOPRGU resets */
+#define MT7986_TOPRGU_APMIXEDSYS_SW_RST		0
+#define MT7986_TOPRGU_SGMII0_SW_RST		1
+#define MT7986_TOPRGU_SGMII1_SW_RST		2
+#define MT7986_TOPRGU_INFRA_SW_RST		3
+#define MT7986_TOPRGU_U2PHY_SW_RST		5
+#define MT7986_TOPRGU_PCIE_SW_RST		6
+#define MT7986_TOPRGU_SSUSB_SW_RST		7
+#define MT7986_TOPRGU_ETHDMA_SW_RST		20
+#define MT7986_TOPRGU_CONSYS_SW_RST		23
+
+#define MT7986_TOPRGU_SW_RST_NUM		24
+
+/* ETHSYS Subsystem resets */
+#define MT7986_ETHSYS_FE_SW_RST			6
+#define MT7986_ETHSYS_PMTR_SW_RST		8
+#define MT7986_ETHSYS_GMAC_SW_RST		23
+#define MT7986_ETHSYS_PPE0_SW_RST		30
+#define MT7986_ETHSYS_PPE1_SW_RST		31
+
+#define MT7986_ETHSYS_SW_RST_NUM		32
+
+#endif  /* _DT_BINDINGS_RESET_CONTROLLER_MT7986 */
-- 
2.29.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related

* [PATCH 2/2] watchdog: mtk_wdt: mt7986: Add toprgu reset controller support
From: Sam Shih @ 2022-01-05 10:04 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Matthias Brugger, Philipp Zabel,
	Rob Herring, Ryder Lee, linux-kernel, linux-watchdog,
	linux-arm-kernel, linux-mediatek, devicetree
  Cc: John Crispin, Sam Shih
In-Reply-To: <20220105100456.7126-1-sam.shih@mediatek.com>

Besides watchdog, the mt7986 toprgu module also provides software reset
functionality for various peripheral subsystems
(eg, ethernet, pcie, and connectivity)

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
---
 drivers/watchdog/mtk_wdt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 543cf38bd04e..c6437fe1f4c0 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -10,6 +10,7 @@
  */
 
 #include <dt-bindings/reset/mt2712-resets.h>
+#include <dt-bindings/reset/mt7986-resets.h>
 #include <dt-bindings/reset/mt8183-resets.h>
 #include <dt-bindings/reset/mt8192-resets.h>
 #include <dt-bindings/reset/mt8195-resets.h>
@@ -76,6 +77,10 @@ static const struct mtk_wdt_data mt2712_data = {
 	.toprgu_sw_rst_num = MT2712_TOPRGU_SW_RST_NUM,
 };
 
+static const struct mtk_wdt_data mt7986_data = {
+	.toprgu_sw_rst_num = MT7986_TOPRGU_SW_RST_NUM,
+};
+
 static const struct mtk_wdt_data mt8183_data = {
 	.toprgu_sw_rst_num = MT8183_TOPRGU_SW_RST_NUM,
 };
@@ -418,6 +423,7 @@ static int mtk_wdt_resume(struct device *dev)
 static const struct of_device_id mtk_wdt_dt_ids[] = {
 	{ .compatible = "mediatek,mt2712-wdt", .data = &mt2712_data },
 	{ .compatible = "mediatek,mt6589-wdt" },
+	{ .compatible = "mediatek,mt7986-wdt", .data = &mt7986_data },
 	{ .compatible = "mediatek,mt8183-wdt", .data = &mt8183_data },
 	{ .compatible = "mediatek,mt8192-wdt", .data = &mt8192_data },
 	{ .compatible = "mediatek,mt8195-wdt", .data = &mt8195_data },
-- 
2.29.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related

* Re: [PATCH 3/4] coresight: trbe: Work around the invalid prohibited states
From: Suzuki K Poulose @ 2022-01-05 10:13 UTC (permalink / raw)
  To: Anshuman Khandual, linux-arm-kernel
  Cc: Catalin Marinas, Will Deacon, Mathieu Poirier, coresight,
	linux-doc, linux-kernel
In-Reply-To: <1641359159-22726-4-git-send-email-anshuman.khandual@arm.com>

Hi Anshuman

On 05/01/2022 05:05, Anshuman Khandual wrote:
> TRBE implementations affected by Arm erratum #2038923 might get TRBE into
> an inconsistent view on whether trace is prohibited within the CPU. As a
> result, the trace buffer or trace buffer state might be corrupted. This
> happens after TRBE buffer has been enabled by setting TRBLIMITR_EL1.E,
> followed by just a single context synchronization event before execution
> changes from a context, in which trace is prohibited to one where it isn't,
> or vice versa. In these mentioned conditions, the view of whether trace is
> prohibited is inconsistent between parts of the CPU, and the trace buffer
> or the trace buffer state might be corrupted.
> 
> Work around this problem in the TRBE driver by preventing an inconsistent
> view of whether the trace is prohibited or not based on TRBLIMITR_EL1.E by
> immediately following a change to TRBLIMITR_EL1.E with at least one ISB
> instruction before an ERET, or two ISB instructions if no ERET is to take
> place. This adds a new cpu errata in arm64 errata framework and also
> updates TRBE driver as required.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Cc: Suzuki Poulose <suzuki.poulose@arm.com>
> Cc: coresight@lists.linaro.org
> Cc: linux-doc@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
>   Documentation/arm64/silicon-errata.rst       |  2 +
>   arch/arm64/Kconfig                           | 23 ++++++++++
>   arch/arm64/kernel/cpu_errata.c               |  9 ++++
>   arch/arm64/tools/cpucaps                     |  1 +
>   drivers/hwtracing/coresight/coresight-trbe.c | 47 +++++++++++++++-----
>   5 files changed, 72 insertions(+), 10 deletions(-)

As with the previous patch, it may be a good idea to split the
patch to arm64 and trbe parts.

> 
> diff --git a/Documentation/arm64/silicon-errata.rst b/Documentation/arm64/silicon-errata.rst
> index c9b30e6c2b6c..e0ef3e9a4b8b 100644
> --- a/Documentation/arm64/silicon-errata.rst
> +++ b/Documentation/arm64/silicon-errata.rst
> @@ -54,6 +54,8 @@ stable kernels.
>   +----------------+-----------------+-----------------+-----------------------------+
>   | ARM            | Cortex-A510     | #2064142        | ARM64_ERRATUM_2064142       |
>   +----------------+-----------------+-----------------+-----------------------------+
> +| ARM            | Cortex-A510     | #2038923        | ARM64_ERRATUM_2038923       |
> ++----------------+-----------------+-----------------+-----------------------------+
>   | ARM            | Cortex-A53      | #826319         | ARM64_ERRATUM_826319        |
>   +----------------+-----------------+-----------------+-----------------------------+
>   | ARM            | Cortex-A53      | #827319         | ARM64_ERRATUM_827319        |
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 2105b68d88db..026e34fb6fad 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -796,6 +796,29 @@ config ARM64_ERRATUM_2064142
>   
>   	  If unsure, say Y.
>   
> +config ARM64_ERRATUM_2038923
> +	bool "Cortex-A510: 2038923: workaround TRBE corruption with enable"
> +	depends on CORESIGHT_TRBE
> +	default y
> +	help
> +	  This option adds the workaround for ARM Cortex-A510 erratum 2038923.
> +
> +	  Affected Cortex-A510 core might cause an inconsistent view on whether trace is
> +	  prohibited within the CPU. As a result, the trace buffer or trace buffer state
> +	  might be corrupted. This happens after TRBE buffer has been enabled by setting
> +	  TRBLIMITR_EL1.E, followed by just a single context synchronization event before
> +	  execution changes from a context, in which trace is prohibited to one where it
> +	  isn't, or vice versa. In these mentioned conditions, the view of whether trace
> +	  is prohibited is inconsistent between parts of the CPU, and the trace buffer or
> +	  the trace buffer state might be corrupted.
> +
> +	  Work around this in the driver by preventing an inconsistent view of whether the
> +	  trace is prohibited or not based on TRBLIMITR_EL1.E by immediately following a
> +	  change to TRBLIMITR_EL1.E with at least one ISB instruction before an ERET, or
> +	  two ISB instructions if no ERET is to take place.
> +
> +	  If unsure, say Y.
> +
>   config CAVIUM_ERRATUM_22375
>   	bool "Cavium erratum 22375, 24313"
>   	default y
> diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
> index cbb7d5a9aee7..60b0c1f1d912 100644
> --- a/arch/arm64/kernel/cpu_errata.c
> +++ b/arch/arm64/kernel/cpu_errata.c
> @@ -607,6 +607,15 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
>   		ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A510, 0, 0, 2)
>   	},
>   #endif
> +#ifdef CONFIG_ARM64_ERRATUM_2038923
> +	{
> +		.desc = "ARM erratum 2038923",
> +		.capability = ARM64_WORKAROUND_2038923,
> +
> +		/* Cortex-A510 r0p0 - r0p2 */
> +		ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A510, 0, 0, 2)
> +	},
> +#endif
>   	{
>   	}
>   };
> diff --git a/arch/arm64/tools/cpucaps b/arch/arm64/tools/cpucaps
> index fca3cb329e1d..45a06d36d080 100644
> --- a/arch/arm64/tools/cpucaps
> +++ b/arch/arm64/tools/cpucaps
> @@ -56,6 +56,7 @@ WORKAROUND_1463225
>   WORKAROUND_1508412
>   WORKAROUND_1542419
>   WORKAROUND_2064142
> +WORKAROUND_2038923
>   WORKAROUND_TRBE_OVERWRITE_FILL_MODE
>   WORKAROUND_TSB_FLUSH_FAILURE
>   WORKAROUND_TRBE_WRITE_OUT_OF_RANGE
> diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c
> index ec24b62b2cec..0689c6dab96d 100644
> --- a/drivers/hwtracing/coresight/coresight-trbe.c
> +++ b/drivers/hwtracing/coresight/coresight-trbe.c
> @@ -92,11 +92,13 @@ struct trbe_buf {
>   #define TRBE_WORKAROUND_OVERWRITE_FILL_MODE	0
>   #define TRBE_WORKAROUND_WRITE_OUT_OF_RANGE	1
>   #define TRBE_WORKAROUND_SYSREG_WRITE_FAILURE	2
> +#define TRBE_WORKAROUND_CORRUPTION_WITH_ENABLE	3
>   
>   static int trbe_errata_cpucaps[] = {
>   	[TRBE_WORKAROUND_OVERWRITE_FILL_MODE] = ARM64_WORKAROUND_TRBE_OVERWRITE_FILL_MODE,
>   	[TRBE_WORKAROUND_WRITE_OUT_OF_RANGE] = ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE,
>   	[TRBE_WORKAROUND_SYSREG_WRITE_FAILURE] = ARM64_WORKAROUND_2064142,
> +	[TRBE_WORKAROUND_CORRUPTION_WITH_ENABLE] = ARM64_WORKAROUND_2038923,
>   	-1,		/* Sentinel, must be the last entry */
>   };
>   
> @@ -174,6 +176,11 @@ static inline bool trbe_may_fail_sysreg_write(struct trbe_cpudata *cpudata)
>   	return trbe_has_erratum(cpudata, TRBE_WORKAROUND_SYSREG_WRITE_FAILURE);
>   }
>   
> +static inline bool trbe_may_corrupt_with_enable(struct trbe_cpudata *cpudata)
> +{

minor nit: trbe_needs_{ctxt_sync, isb}_after_enable() ?

> +	return trbe_has_erratum(cpudata, TRBE_WORKAROUND_CORRUPTION_WITH_ENABLE);
> +}
> +
>   static int trbe_alloc_node(struct perf_event *event)
>   {
>   	if (event->cpu == -1)
> @@ -187,6 +194,30 @@ static inline void trbe_drain_buffer(void)
>   	dsb(nsh);
>   }
>   
> +static inline void set_trbe_enabled(struct trbe_cpudata *cpudata)
> +{
> +	u64 trblimitr = read_sysreg_s(SYS_TRBLIMITR_EL1);

minor nit: This implies we do the TRBE programming in the following
manner in the common case (i.e, TRBE enabled in the beginning of a
session).
   -> set TRBE LIMIT
   -> read TRBE LIMIT
   -> set TRBE ENABLED

Could we please optimize this ? I believe the buf->trbe_limit
must hold the LIMITR value at any point in time. And thus this
function could simply be :

set_trbe_enabled(trbe_buf)
{
	limitr = trbe_buf->limit | LIMITR_ENABLE
	write(limitr, TRBLIMITR_EL1);
	...
}

Otherwise looks good to me

Suzuki

^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.