clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM
Subsystems (8)
Sasha Levin
maintainerPATCH 1/10 clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM
From: Baoquan He <[email protected]>
[ Upstream commit e7dd44f4f3166db45248414f5df8f615392de47a ]
On s390 systems (aka mainframes), it has classic channel devices for networking and permanent storage that are currently even more common than PCI devices. Hence it could have a fully functional s390 kernel with CONFIG_PCI=n, then the relevant iomem mapping functions [including ioremap(), devm_ioremap(), etc.] are not available.
Here let COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM so that it won't be built to cause below compiling error if PCI is unset:
------
ld: drivers/clk/clk-fixed-mmio.o: in function `fixed_mmio_clk_setup':
clk-fixed-mmio.c:(.text+0x5e): undefined reference to `of_iomap'
ld: clk-fixed-mmio.c:(.text+0xba): undefined reference to `iounmap'
------
--- drivers/clk/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/clk/Kconfig +1 -0
@@ -444,6 +444,7 @@ config COMMON_CLK_BD718XX config COMMON_CLK_FIXED_MMIO bool "Clock driver for Memory Mapped Fixed values" depends on COMMON_CLK && OF + depends on HAS_IOMEM help Support for Memory Mapped IO Fixed clocks
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 2/10 vmbus_testing: fix wrong python syntax for integer value comparison
From: Ani Sinha <[email protected]>
[ Upstream commit ed0cf84e9cc42e6310961c87709621f1825c2bb8 ]
It is incorrect in python to compare integer values using the "is" keyword. The "is" keyword in python is used to compare references to two objects, not their values. Newer version of python3 (version 3.8) throws a warning when such incorrect comparison is made. For value comparison, "==" should be used.
Fix this in the code and suppress the following warning:
/usr/sbin/vmbus_testing:167: SyntaxWarning: "is" with a literal. Did you mean "=="?
--- tools/hv/vmbus_testing | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/hv/vmbus_testing +2 -2
@@ -164,7 +164,7 @@ def recursive_file_lookup(path, file_map): def get_all_devices_test_status(file_map): for device in file_map: - if (get_test_state(locate_state(device, file_map)) is 1): + if (get_test_state(locate_state(device, file_map)) == 1): print("Testing = ON for: {}" .format(device.split("/")[5])) else:
@@ -203,7 +203,7 @@ def write_test_files(path, value): def set_test_state(state_path, state_value, quiet): write_test_files(state_path, state_value) - if (get_test_state(state_path) is 1): + if (get_test_state(state_path) == 1): if (not quiet): print("Testing = ON for device: {}" .format(state_path.split("/")[5]))
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 3/10 Revert "wifi: ath11k: Enable threaded NAPI"
In reply to Sasha LevinFrom: Kalle Valo <[email protected]>
[ Upstream commit d265ebe41c911314bd273c218a37088835959fa1 ]
This reverts commit 13aa2fb692d3717767303817f35b3e650109add3.
This commit broke QCN9074 initialisation:
[ 358.960477] ath11k_pci 0000:04:00.0: ce desc not available for wmi command 36866 [ 358.960481] ath11k_pci 0000:04:00.0: failed to send WMI_STA_POWERSAVE_PARAM_CMDID [ 358.960484] ath11k_pci 0000:04:00.0: could not set uapsd params -105
As there's no fix available let's just revert it to get QCN9074 working again.
--- drivers/net/wireless/ath/ath11k/ahb.c | 1 - drivers/net/wireless/ath/ath11k/pcic.c | 1 - 2 files changed, 2 deletions(-)
drivers/net/wireless/ath/ath11k/ahb.c +0 -1
@@ -376,7 +376,6 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];if (!irq_grp->napi_enabled) { -dev_set_threaded (&irq_grp->napi_ndev, true);napi_enable (&irq_grp->napi); irq_grp->napi_enabled = true; }
drivers/net/wireless/ath/ath11k/pcic.c +0 -1
@@ -466,7 +466,6 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];if (!irq_grp->napi_enabled) { -dev_set_threaded (&irq_grp->napi_ndev, true);napi_enable (&irq_grp->napi); irq_grp->napi_enabled = true; }
Signature · 7 lines
2.40.1 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH AUTOSEL 6.4 03/10] Revert "wifi: ath11k: Enable threaded NAPI"
Quoted 12 lines · Sasha Levin
From: Kalle Valo <[email protected]>
[ Upstream commit
d265ebe41c911314bd273c218a37088835959fa1]This reverts commit
13aa2fb692d3717767303817f35b3e650109add3.This commit broke QCN9074 initialisation:
[ 358.960477] ath11k_pci 0000:04:00.0: ce desc not available for wmi command 36866 [ 358.960481] ath11k_pci 0000:04:00.0: failed to send WMI_STA_POWERSAVE_PARAM_CMDID [ 358.960484] ath11k_pci 0000:04:00.0: could not set uapsd params -105
Quoted 7 lines
As there's no fix available let's just revert it to get QCN9074 working again.
Signed-off-by Kalle Valo <[email protected]>Signed-off-by Kalle Valo <[email protected]>Signed-off-by Sasha Levin <[email protected]>
This commit break machines like the Lenovo ThinkPad X13s so please do not backport until this has been resolved:
https://lore.kernel.org/lkml/[email protected]
Johan
Sasha Levin
maintainerRe: [PATCH AUTOSEL 6.4 03/10] Revert "wifi: ath11k: Enable threaded NAPI"
Quoted 21 lines · Johan Hovold
Quoted 12 lines · Sasha Levin
From: Kalle Valo <[email protected]>
[ Upstream commit
d265ebe41c911314bd273c218a37088835959fa1]This reverts commit
13aa2fb692d3717767303817f35b3e650109add3.This commit broke QCN9074 initialisation:
[ 358.960477] ath11k_pci 0000:04:00.0: ce desc not available for wmi command 36866 [ 358.960481] ath11k_pci 0000:04:00.0: failed to send WMI_STA_POWERSAVE_PARAM_CMDID [ 358.960484] ath11k_pci 0000:04:00.0: could not set uapsd params -105Quoted 7 lines
As there's no fix available let's just revert it to get QCN9074 working again.
Signed-off-by Kalle Valo <[email protected]>Signed-off-by Kalle Valo <[email protected]>Signed-off-by Sasha Levin <[email protected]>
Quoted 4 lines
This commit break machines like the Lenovo ThinkPad X13s so please do not backport until this has been resolved:
https://lore.kernel.org/lkml/[email protected]
I'll drop it for now, thanks!
Signature · 7 lines
Thanks, Sasha -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Sasha Levin
maintainerPATCH 4/10 Revert "wifi: ath6k: silence false positive -Wno-dangling-pointer warning on GCC 12"
In reply to Sasha LevinFrom: Kalle Valo <[email protected]>
[ Upstream commit a1ce186db7f0e449f35d12fb55ae0da2a1b400e2 ]
This reverts commit bd1d129daa3ede265a880e2c6a7f91eab0f4dc62.
The dangling-pointer warnings were disabled kernel-wide by commit 49beadbd47c2 ("gcc-12: disable '-Wdangling-pointer' warning for now") for v5.19. So this hack in ath6kl is not needed anymore.
--- drivers/net/wireless/ath/ath6kl/Makefile | 5 ----- 1 file changed, 5 deletions(-)
drivers/net/wireless/ath/ath6kl/Makefile +0 -5
@@ -36,11 +36,6 @@ ath6kl_core-y += wmi.o ath6kl_core-y += core.o ath6kl_core-y += recovery.o -# FIXME: temporarily silence -Wdangling-pointer on non W=1+ builds -ifndef KBUILD_EXTRA_WARN -CFLAGS_htc_mbox.o += $(call cc-disable-warning, dangling-pointer) -endif - ath6kl_core-$(CONFIG_NL80211_TESTMODE) += testmode.o ath6kl_core-$(CONFIG_ATH6KL_TRACING) += trace.o
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 5/10 net: dsa: microchip: KSZ9477 register regmap alignment to 32 bit boundaries
In reply to Sasha LevinFrom: Lukasz Majewski <[email protected]>
[ Upstream commit 8d7ae22ae9f8c8a4407f8e993df64440bdbd0cee ]
The commit (SHA1: 5c844d57aa7894154e49cf2fc648bfe2f1aefc1c) provided code to apply "Module 6: Certain PHY registers must be written as pairs instead of singly" errata for KSZ9477 as this chip for certain PHY registers (0xN120 to 0xN13F, N=1,2,3,4,5) must be accesses as 32 bit words instead of 16 or 8 bit access.
Otherwise, adjacent registers (no matter if reserved or not) are overwritten with 0x0.
Without this patch some registers (e.g. 0x113c or 0x1134) required for 32 bit access are out of valid regmap ranges.
As a result, following error is observed and KSZ9477 is not properly configured:
ksz-switch spi1.0: can't rmw 32bit reg 0x113c: -EIO
ksz-switch spi1.0: can't rmw 32bit reg 0x1134: -EIO
ksz-switch spi1.0 lan1 (uninitialized): failed to connect to PHY: -EIO ksz-switch spi1.0 lan1 (uninitialized): error -5 setting up PHY for tree 0, switch 0, port 0
The solution is to modify regmap_reg_range to allow accesses with 4 bytes boundaries.
--- drivers/net/dsa/microchip/ksz_common.c | 35 +++++++++++--------------- 1 file changed, 15 insertions(+), 20 deletions(-)
drivers/net/dsa/microchip/ksz_common.c +15 -20
@@ -635,10 +635,9 @@ static const struct regmap_range ksz9477_valid_regs[] = {regmap_reg_range (0x1030 ,0x1030 ),regmap_reg_range (0x1100 ,0x1115 ),regmap_reg_range (0x111a ,0x111f ), -regmap_reg_range (0x1122 ,0x1127 ), -regmap_reg_range (0x112a ,0x112b ), -regmap_reg_range (0x1136 ,0x1139 ), -regmap_reg_range (0x113e ,0x113f ), +regmap_reg_range (0x1120 ,0x112b ), +regmap_reg_range (0x1134 ,0x113b ), +regmap_reg_range (0x113c ,0x113f ),regmap_reg_range (0x1400 ,0x1401 ),regmap_reg_range (0x1403 ,0x1403 ), regmap_reg_range(0x1410, 0x1417),
@@ -669,10 +668,9 @@ static const struct regmap_range ksz9477_valid_regs[] = {regmap_reg_range (0x2030 ,0x2030 ),regmap_reg_range (0x2100 ,0x2115 ),regmap_reg_range (0x211a ,0x211f ), -regmap_reg_range (0x2122 ,0x2127 ), -regmap_reg_range (0x212a ,0x212b ), -regmap_reg_range (0x2136 ,0x2139 ), -regmap_reg_range (0x213e ,0x213f ), +regmap_reg_range (0x2120 ,0x212b ), +regmap_reg_range (0x2134 ,0x213b ), +regmap_reg_range (0x213c ,0x213f ),regmap_reg_range (0x2400 ,0x2401 ),regmap_reg_range (0x2403 ,0x2403 ), regmap_reg_range(0x2410, 0x2417),
@@ -703,10 +701,9 @@ static const struct regmap_range ksz9477_valid_regs[] = {regmap_reg_range (0x3030 ,0x3030 ),regmap_reg_range (0x3100 ,0x3115 ),regmap_reg_range (0x311a ,0x311f ), -regmap_reg_range (0x3122 ,0x3127 ), -regmap_reg_range (0x312a ,0x312b ), -regmap_reg_range (0x3136 ,0x3139 ), -regmap_reg_range (0x313e ,0x313f ), +regmap_reg_range (0x3120 ,0x312b ), +regmap_reg_range (0x3134 ,0x313b ), +regmap_reg_range (0x313c ,0x313f ),regmap_reg_range (0x3400 ,0x3401 ),regmap_reg_range (0x3403 ,0x3403 ), regmap_reg_range(0x3410, 0x3417),
@@ -737,10 +734,9 @@ static const struct regmap_range ksz9477_valid_regs[] = {regmap_reg_range (0x4030 ,0x4030 ),regmap_reg_range (0x4100 ,0x4115 ),regmap_reg_range (0x411a ,0x411f ), -regmap_reg_range (0x4122 ,0x4127 ), -regmap_reg_range (0x412a ,0x412b ), -regmap_reg_range (0x4136 ,0x4139 ), -regmap_reg_range (0x413e ,0x413f ), +regmap_reg_range (0x4120 ,0x412b ), +regmap_reg_range (0x4134 ,0x413b ), +regmap_reg_range (0x413c ,0x413f ),regmap_reg_range (0x4400 ,0x4401 ),regmap_reg_range (0x4403 ,0x4403 ), regmap_reg_range(0x4410, 0x4417),
@@ -771,10 +767,9 @@ static const struct regmap_range ksz9477_valid_regs[] = {regmap_reg_range (0x5030 ,0x5030 ),regmap_reg_range (0x5100 ,0x5115 ),regmap_reg_range (0x511a ,0x511f ), -regmap_reg_range (0x5122 ,0x5127 ), -regmap_reg_range (0x512a ,0x512b ), -regmap_reg_range (0x5136 ,0x5139 ), -regmap_reg_range (0x513e ,0x513f ), +regmap_reg_range (0x5120 ,0x512b ), +regmap_reg_range (0x5134 ,0x513b ), +regmap_reg_range (0x513c ,0x513f ),regmap_reg_range (0x5400 ,0x5401 ),regmap_reg_range (0x5403 ,0x5403 ), regmap_reg_range(0x5410, 0x5417),
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 6/10 net: annotate data-races around sk->sk_{rcv|snd}timeo
In reply to Sasha LevinFrom: Eric Dumazet <[email protected]>
[ Upstream commit 285975dd674258ccb33e77a1803e8f2015e67105 ]
sk_getsockopt() runs without locks, we must add annotations to sk->sk_rcvtimeo and sk->sk_sndtimeo.
In the future we might allow fetching these fields before we lock the socket in TCP fast path.
--- net/core/sock.c | 24 ++++++++++++++---------- net/sched/em_meta.c | 4 ++-- 2 files changed, 16 insertions(+), 12 deletions(-)
net/core/sock.c +14 -10
@@ -425,6 +425,7 @@ static int sock_set_timeout(long *timeo_p, sockptr_t optval, int optlen, {struct __kernel_sock_timeval tv;int err =sock_copy_user_timeval (&tv, optval, optlen, old_timeval); +long val;if (err)return err;
@@ -435,7 +436,7 @@ static int sock_set_timeout(long *timeo_p, sockptr_t optval, int optlen,if (tv.tv_sec <0 ) {static int warned__read_mostly ; - *timeo_p =0 ; +WRITE_ONCE (*timeo_p,0 );if (warned <10 &&net_ratelimit ()) { warned++; pr_info("%s: `%s' (pid %d) tries to set negative timeout\n",
@@ -443,11 +444,12 @@ static int sock_set_timeout(long *timeo_p, sockptr_t optval, int optlen, }return 0 ; } - *timeo_p =MAX_SCHEDULE_TIMEOUT ; -if (tv.tv_sec ==0 && tv.tv_usec ==0 ) -return 0 ; -if (tv.tv_sec < (MAX_SCHEDULE_TIMEOUT /HZ -1 )) - *timeo_p = tv.tv_sec *HZ +DIV_ROUND_UP ((unsigned long )tv.tv_usec,USEC_PER_SEC /HZ ); + val =MAX_SCHEDULE_TIMEOUT ; +if ((tv.tv_sec || tv.tv_usec) && + (tv.tv_sec < (MAX_SCHEDULE_TIMEOUT /HZ -1 ))) + val = tv.tv_sec *HZ +DIV_ROUND_UP ((unsigned long )tv.tv_usec, +USEC_PER_SEC /HZ ); +WRITE_ONCE (*timeo_p, val);return 0 ; }
@@ -809,9 +811,9 @@ void sock_set_sndtimeo(struct sock *sk, s64 secs) {lock_sock (sk);if (secs && secs <MAX_SCHEDULE_TIMEOUT /HZ -1 ) - sk->sk_sndtimeo = secs *HZ ; +WRITE_ONCE (sk->sk_sndtimeo, secs *HZ );else - sk->sk_sndtimeo =MAX_SCHEDULE_TIMEOUT ; +WRITE_ONCE (sk->sk_sndtimeo,MAX_SCHEDULE_TIMEOUT );release_sock (sk); }EXPORT_SYMBOL (sock_set_sndtimeo);
@@ -1710,12 +1712,14 @@ int sk_getsockopt(struct sock *sk, int level, int optname,case SO_RCVTIMEO_OLD :case SO_RCVTIMEO_NEW : - lv =sock_get_timeout (sk->sk_rcvtimeo, &v,SO_RCVTIMEO_OLD == optname); + lv =sock_get_timeout (READ_ONCE (sk->sk_rcvtimeo), &v, +SO_RCVTIMEO_OLD == optname);break ;case SO_SNDTIMEO_OLD :case SO_SNDTIMEO_NEW : - lv =sock_get_timeout (sk->sk_sndtimeo, &v,SO_SNDTIMEO_OLD == optname); + lv =sock_get_timeout (READ_ONCE (sk->sk_sndtimeo), &v, +SO_SNDTIMEO_OLD == optname);break ;case SO_RCVLOWAT :
net/sched/em_meta.c +2 -2
@@ -568,7 +568,7 @@ META_COLLECTOR(int_sk_rcvtimeo) *err =-1 ;return ; } - dst->value = sk->sk_rcvtimeo /HZ ; + dst->value =READ_ONCE (sk->sk_rcvtimeo) /HZ ; }META_COLLECTOR (int_sk_sndtimeo)
@@ -579,7 +579,7 @@ META_COLLECTOR(int_sk_sndtimeo) *err =-1 ;return ; } - dst->value = sk->sk_sndtimeo /HZ ; + dst->value =READ_ONCE (sk->sk_sndtimeo) /HZ ; }META_COLLECTOR (int_sk_sendmsg_off)
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 7/10 net: usb: qmi_wwan: add Quectel EM05GV2
In reply to Sasha LevinFrom: Martin Kohn <[email protected]>
[ Upstream commit d4480c9bb9258db9ddf2e632f6ef81e96b41089c ]
Add support for Quectel EM05GV2 (G=global) with vendor ID 0x2c7c and product ID 0x030e
Enabling DTR on this modem was necessary to ensure stable operation. Patch for usb: serial: option: is also in progress.
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=030e Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-G C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
--- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1423,6 +1423,7 @@ static const struct usb_device_id products[] = { {QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)}, /* Quectel EG91 */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */ {QMI_FIXED_INTF(0x2c7c, 0x0296, 4)}, /* Quectel BG96 */ + {QMI_QUIRK_SET_DTR(0x2c7c, 0x030e, 4)}, /* Quectel EM05GV2 */ {QMI_QUIRK_SET_DTR(0x2cb7, 0x0104, 4)}, /* Fibocom NL678 series */ {QMI_FIXED_INTF(0x0489, 0xe0b4, 0)}, /* Foxconn T77W968 LTE */ {QMI_FIXED_INTF(0x0489, 0xe0b5, 0)}, /* Foxconn T77W968 LTE with eSIM support*/
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 8/10 wifi: brcmfmac: Fix field-spanning write in brcmf_scan_params_v2_to_v1()
In reply to Sasha LevinFrom: Hans de Goede <[email protected]>
[ Upstream commit 16e455a465fca91907af0108f3d013150386df30 ]
Using brcmfmac with 6.5-rc3 on a brcmfmac43241b4-sdio triggers a backtrace caused by the following field-spanning warning:
memcpy: detected field-spanning write (size 120) of single field
"¶ms_le->channel_list[0]" at drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:1072 (size 2)
The driver still works after this warning. The warning was introduced by the new field-spanning write checks which were enabled recently.
Fix this by replacing the channel_list[1] declaration at the end of the struct with a flexible array declaration.
Most users of struct brcmf_scan_params_le calculate the size to alloc using the size of the non flex-array part of the struct + needed extra space, so they do not care about sizeof(struct brcmf_scan_params_le).
brcmf_notify_escan_complete() however uses the struct on the stack, expecting there to be room for at least 1 entry in the channel-list to store the special -1 abort channel-id.
To make this work use an anonymous union with a padding member added + the actual channel_list flexible array.
--- .../net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +6 -1
@@ -398,7 +398,12 @@ struct brcmf_scan_params_le {* fixed parameter portion is assumed, otherwise * ssid in the fixed portion is ignored */ -__le16 channel_list[1 ];/* list of chanspecs */ +union { +__le16 padding;/* Reserve space for at least 1 entry for abort +* which uses an on stack brcmf_scan_params_le +*/ + DECLARE_FLEX_ARRAY(__le16, channel_list); /* chanspecs */ + }; };struct brcmf_scan_params_v2_le {
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 9/10 powerpc/powermac: Use early_* IO variants in via_calibrate_decr()
In reply to Sasha LevinFrom: Benjamin Gray <[email protected]>
[ Upstream commit 86582e6189dd8f9f52c25d46c70fe5d111da6345 ]
On a powermac platform, via the call path:
start_kernel()
time_init()
ppc_md.calibrate_decr() (pmac_calibrate_decr)
via_calibrate_decr()ioremap() and iounmap() are called. The unmap can enable interrupts unexpectedly (cond_resched() in vunmap_pmd_range()), which causes a warning later in the boot sequence in start_kernel().
Use the early_* variants of these IO functions to prevent this.
The issue is pre-existing, but is surfaced by commit 721255b9826b ("genirq: Use a maple tree for interrupt descriptor management").
--- arch/powerpc/platforms/powermac/time.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/powerpc/platforms/powermac/time.c +3 -3
@@ -26,8 +26,8 @@#include <linux/rtc.h> #include <linux/of_address.h> +#include <asm/early_ioremap.h> #include <asm/sections.h> -#include <asm/io.h> #include <asm/machdep.h> #include <asm/time.h> #include <asm/nvram.h>
@@ -182,7 +182,7 @@ static int __init via_calibrate_decr(void)return 0 ; }of_node_put (vias); - via =ioremap (rsrc.start,resource_size (&rsrc)); + via =early_ioremap (rsrc.start,resource_size (&rsrc));if (via ==NULL ) {printk (KERN_ERR "Failed to map VIA for timer calibration !\n" );return 0 ;
@@ -207,7 +207,7 @@ static int __init via_calibrate_decr(void) ppc_tb_freq = (dstart - dend) *100 /6 ; -iounmap (via); +early_iounmap ((void *)via,resource_size (&rsrc));return 1 ; }
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 10/10 x86/hyperv: add noop functions to x86_init mpparse functions
In reply to Sasha LevinFrom: Saurabh Sengar <[email protected]>
[ Upstream commit 9e2d0c336524706fb327e9b87477f5f3337ad7a6 ]
Hyper-V can run VMs at different privilege "levels" known as Virtual Trust Levels (VTL). Sometimes, it chooses to run two different VMs at different levels but they share some of their address space. In such setups VTL2 (higher level VM) has visibility of all of the VTL0 (level 0) memory space.
When the CONFIG_X86_MPPARSE is enabled for VTL2, the VTL2 kernel performs a search within the low memory to locate MP tables. However, in systems where VTL0 manages the low memory and may contain valid tables, this scanning can result in incorrect MP table information being provided to the VTL2 kernel, mistakenly considering VTL0's MP table as its own
Add noop functions to avoid MP parse scan by VTL2.
--- arch/x86/hyperv/hv_vtl.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/hyperv/hv_vtl.c +4 -0
@@ -25,6 +25,10 @@ void __init hv_vtl_init_platform(void) x86_init.irqs.pre_vector_init = x86_init_noop; x86_init.timers.timer_init = x86_init_noop; +/* Avoid searching for BIOS MP tables */ + x86_init.mpparse.find_smp_config = x86_init_noop; + x86_init.mpparse.get_smp_config = x86_init_uint_noop; + x86_platform.get_wallclock = get_rtc_noop; x86_platform.set_wallclock = set_rtc_noop; x86_platform.get_nmi_reason = hv_get_nmi_reason;
Signature · 1 line
2.40.1