Skip to contentSkip to conversation

ARC: HSDK: wireup perf irq

PATCH New Sasha Levin 1 participant 17 messages Sep 7, 2020

Subsystems (6)
lore
Share & tools
lore

Sasha Levin

author maintainer
#0 lore raw

PATCH 1/17 ARC: HSDK: wireup perf irq

From: Vineet Gupta <[email protected]>

[ Upstream commit fe81d927b78c4f0557836661d32e41ebc957b024 ]

Newer version of HSDK aka HSDK-4xD (with dual issue HS48x4 CPU) wired up the perf interrupt, so enable that in DT.
This is OK for old HSDK where this irq is ignored because pct irq is not wired up in hardware.

---
 arch/arc/boot/dts/hsdk.dts | 2 ++
 1 file changed, 2 insertions(+)
arch/arc/boot/dts/hsdk.dts +2 -0
index 57d81c6aa379d..aeacea148793c 100644
@@ -79,6 +79,8 @@ idu_intc: idu-interrupt-controller {
 
 	arcpct: pct {
 		compatible = "snps,archs-pct";
+		interrupt-parent = <&cpu_intc>;
+		interrupts = <20>;
 	};
 
 	/* TIMER0 with interrupt for clockevent */
Signature · 7 lines
2.25.1


_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
author maintainer
#1 lore raw

PATCH 2/17 dmaengine: acpi: Put the CSRT table after using it

From: Hanjun Guo <[email protected]>

[ Upstream commit 7eb48dd094de5fe0e216b550e73aa85257903973 ]

The acpi_get_table() should be coupled with acpi_put_table() if the mapped table is not used at runtime to release the table mapping, put the CSRT table buf after using it.

---
 drivers/dma/acpi-dma.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/dma/acpi-dma.c +3 -1
index 4a748c3435d7d..8d99c84361cbb 100644
@@ -131,11 +131,13 @@ static void acpi_dma_parse_csrt(struct acpi_device *adev, struct acpi_dma *adma)
 		if (ret < 0) {
 			dev_warn(&adev->dev,
 				 "error in parsing resource group\n");
-			return;
+			break;
 		}
 
 		grp = (struct acpi_csrt_group *)((void *)grp + grp->length);
 	}
+
+	acpi_put_table((struct acpi_table_header *)csrt);
 }
 
 /**
Signature · 1 line
2.25.1
author maintainer
#2 lore raw

PATCH 3/17 drivers/net/wan/lapbether: Added needed_tailroom

In reply to Sasha Levin

From: Xie He <[email protected]>

[ Upstream commit 1ee39c1448c4e0d480c5b390e2db1987561fb5c2 ]

The underlying Ethernet device may request necessary tailroom to be allocated by setting needed_tailroom. This driver should also set needed_tailroom to request the tailroom needed by the underlying Ethernet device to be allocated.

---
 drivers/net/wan/lapbether.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wan/lapbether.c +1 -0
index c94dfa70f2a33..6b2553e893aca 100644
@@ -343,6 +343,7 @@ static int lapbeth_new_device(struct net_device *dev)
 	 */
 	ndev->needed_headroom = -1 + 3 + 2 + dev->hard_header_len
 					   + dev->needed_headroom;
+	ndev->needed_tailroom = dev->needed_tailroom;
 
 	lapbeth = netdev_priv(ndev);
 	lapbeth->axdev = ndev;
Signature · 1 line
2.25.1
author maintainer
#3 lore raw

PATCH 4/17 NFC: st95hf: Fix memleak in st95hf_in_send_cmd

In reply to Sasha Levin

From: Dinghao Liu <[email protected]>

[ Upstream commit f97c04c316d8fea16dca449fdfbe101fbdfee6a2 ]

When down_killable() fails, skb_resp should be freed just like when st95hf_spi_send() fails.

---
 drivers/nfc/st95hf/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nfc/st95hf/core.c +1 -1
index 01acb6e533655..c4b6e29c07192 100644
@@ -981,7 +981,7 @@ static int st95hf_in_send_cmd(struct nfc_digital_dev *ddev,
 	rc = down_killable(&stcontext->exchange_lock);
 	if (rc) {
 		WARN(1, "Semaphore is not found up in st95hf_in_send_cmd\n");
-		return rc;
+		goto free_skb_resp;
 	}
 
 	rc = st95hf_spi_send(&stcontext->spicontext, skb->data,
Signature · 1 line
2.25.1
author maintainer
#4 lore raw

PATCH 5/17 firestream: Fix memleak in fs_open

In reply to Sasha Levin

From: Dinghao Liu <[email protected]>

[ Upstream commit 15ac5cdafb9202424206dc5bd376437a358963f9 ]

When make_rate() fails, vcc should be freed just like other error paths in fs_open().

---
 drivers/atm/firestream.c | 1 +
 1 file changed, 1 insertion(+)
drivers/atm/firestream.c +1 -0
index 0e449ee11ac7f..e7cffd0cc3616 100644
@@ -1013,6 +1013,7 @@ static int fs_open(struct atm_vcc *atm_vcc)
 				error = make_rate (pcr, r, &tmc0, NULL);
 				if (error) {
 					kfree(tc);
+					kfree(vcc);
 					return error;
 				}
 			}
Signature · 1 line
2.25.1
author maintainer
#5 lore raw

PATCH 6/17 ALSA: hda: Fix 2 channel swapping for Tegra

In reply to Sasha Levin

From: Mohan Kumar <[email protected]>

[ Upstream commit 216116eae43963c662eb84729507bad95214ca6b ]

The Tegra HDA codec HW implementation has an issue related to not swapping the 2 channel Audio Sample Packet(ASP) channel mapping. Whatever the FL and FR mapping specified the left channel always comes out of left speaker and right channel on right speaker. So add condition to disallow the swapping of FL,FR during the playback.

---
 sound/pci/hda/patch_hdmi.c | 5 +++++
 1 file changed, 5 insertions(+)
sound/pci/hda/patch_hdmi.c +5 -0
index 9e8cfc409b4b3..d0400538bd2db 100644
@@ -3398,6 +3398,7 @@ static int tegra_hdmi_build_pcms(struct hda_codec *codec)
 
 static int patch_tegra_hdmi(struct hda_codec *codec)
 {
+	struct hdmi_spec *spec;
 	int err;
 
 	err = patch_generic_hdmi(codec);
@@ -3405,6 +3406,10 @@ static int patch_tegra_hdmi(struct hda_codec *codec)
 		return err;
 
 	codec->patch_ops.build_pcms = tegra_hdmi_build_pcms;
+	spec = codec->spec;
+	spec->chmap.ops.chmap_cea_alloc_validate_get_type =
+		nvhdmi_chmap_cea_alloc_validate_get_type;
+	spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate;
 
 	return 0;
 }
Signature · 1 line
2.25.1
author maintainer
#6 lore raw

PATCH 7/17 drivers/net/wan/lapbether: Set network_header before transmitting

In reply to Sasha Levin

From: Xie He <[email protected]>

[ Upstream commit 91244d108441013b7367b3b4dcc6869998676473 ]

Set the skb's network_header before it is passed to the underlying Ethernet device for transmission.

This patch fixes the following issue:

When we use this driver with AF_PACKET sockets, there would be error messages of:
protocol 0805 is buggy, dev (Ethernet interface name)
printed in the system "dmesg" log.

This is because skbs passed down to the Ethernet device for transmission don't have their network_header properly set, and the dev_queue_xmit_nit function in net/core/dev.c complains about this.

Reason of setting the network_header to this place (at the end of the Ethernet header, and at the beginning of the Ethernet payload):

Because when this driver receives an skb from the Ethernet device, the network_header is also set at this place.

---
 drivers/net/wan/lapbether.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/wan/lapbether.c +2 -0
index 6b2553e893aca..15177a54b17d7 100644
@@ -213,6 +213,8 @@ static void lapbeth_data_transmit(struct net_device *ndev, struct sk_buff *skb)
 
 	skb->dev = dev = lapbeth->ethdev;
 
+	skb_reset_network_header(skb);
+
 	dev_hard_header(skb, dev, ETH_P_DEC, bcast_addr, NULL, 0);
 
 	dev_queue_xmit(skb);
Signature · 1 line
2.25.1
author maintainer
#7 lore raw

PATCH 8/17 cfg80211: regulatory: reject invalid hints

In reply to Sasha Levin

From: Johannes Berg <[email protected]>

[ Upstream commit 47caf685a6854593348f216e0b489b71c10cbe03 ]

Reject invalid hints early in order to not cause a kernel WARN later if they're restored to or similar.

---
 net/wireless/reg.c | 3 +++
 1 file changed, 3 insertions(+)
net/wireless/reg.c +3 -0
index b95d1c2bdef7e..9eb9d34cef7b1 100644
@@ -2408,6 +2408,9 @@ int regulatory_hint_user(const char *alpha2,
 	if (WARN_ON(!alpha2))
 		return -EINVAL;
 
+	if (!is_world_regdom(alpha2) && !is_an_alpha2(alpha2))
+		return -EINVAL;
+
 	request = kzalloc(sizeof(struct regulatory_request), GFP_KERNEL);
 	if (!request)
 		return -ENOMEM;
Signature · 1 line
2.25.1
author maintainer
#8 lore raw

PATCH 9/17 net: usb: Fix uninit-was-stored issue in asix_read_phy_addr()

In reply to Sasha Levin

From: Himadri Pandya <[email protected]>

[ Upstream commit a092b7233f0e000cc6f2c71a49e2ecc6f917a5fc ]

The buffer size is 2 Bytes and we expect to receive the same amount of data. But sometimes we receive less data and run into uninit-was-stored issue upon read. Hence modify the error check on the return value to match with the buffer size as a prevention.

Reported-and-tested by: [email protected]

---
 drivers/net/usb/asix_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/asix_common.c +1 -1
index e9fcf6ef716a8..9bf18127e63a1 100644
@@ -309,7 +309,7 @@ int asix_read_phy_addr(struct usbnet *dev, int internal)
 
 	netdev_dbg(dev->net, "asix_get_phy_addr()\n");
 
-	if (ret < 0) {
+	if (ret < 2) {
 		netdev_err(dev->net, "Error reading PHYID register: %02x\n", ret);
 		goto out;
 	}
Signature · 1 line
2.25.1
author maintainer
#9 lore raw

PATCH 10/17 xfs: initialize the shortform attr header padding entry

In reply to Sasha Levin

From: "Darrick J. Wong" <[email protected]>

[ Upstream commit 125eac243806e021f33a1fdea3687eccbb9f7636 ]

Don't leak kernel memory contents into the shortform attr fork.

---
 fs/xfs/libxfs/xfs_attr_leaf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/xfs/libxfs/xfs_attr_leaf.c +2 -2
index 73a541755d5b7..299d17b088e21 100644
@@ -520,8 +520,8 @@ xfs_attr_shortform_create(xfs_da_args_t *args)
 		ASSERT(ifp->if_flags & XFS_IFINLINE);
 	}
 	xfs_idata_realloc(dp, sizeof(*hdr), XFS_ATTR_FORK);
-	hdr = (xfs_attr_sf_hdr_t *)ifp->if_u1.if_data;
-	hdr->count = 0;
+	hdr = (struct xfs_attr_sf_hdr *)ifp->if_u1.if_data;
+	memset(hdr, 0, sizeof(*hdr));
 	hdr->totsize = cpu_to_be16(sizeof(*hdr));
 	xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE | XFS_ILOG_ADATA);
 }
Signature · 1 line
2.25.1
author maintainer
#10 lore raw

PATCH 11/17 irqchip/eznps: Fix build error for !ARC700 builds

In reply to Sasha Levin

From: Vineet Gupta <[email protected]>

[ Upstream commit 89d29997f103d08264b0685796b420d911658b96 ]

eznps driver is supposed to be platform independent however it ends up including stuff from inside arch/arc headers leading to rand config build errors.

The quick hack to fix this (proper fix is too much chrun for non active user-base) is to add following to nps platform agnostic header.
- copy AUX_IENABLE from arch/arc header
- move CTOP_AUX_IACK from arch/arc/plat-eznps/*/**

---
 arch/arc/plat-eznps/include/plat/ctop.h | 1 -
 include/soc/nps/common.h                | 6 ++++++
 2 files changed, 6 insertions(+), 1 deletion(-)
arch/arc/plat-eznps/include/plat/ctop.h +0 -1
index 4f6a1673b3a6e..ddfca2c3357a0 100644
@@ -43,7 +43,6 @@
 #define CTOP_AUX_DPC				(CTOP_AUX_BASE + 0x02C)
 #define CTOP_AUX_LPC				(CTOP_AUX_BASE + 0x030)
 #define CTOP_AUX_EFLAGS				(CTOP_AUX_BASE + 0x080)
-#define CTOP_AUX_IACK				(CTOP_AUX_BASE + 0x088)
 #define CTOP_AUX_GPA1				(CTOP_AUX_BASE + 0x08C)
 #define CTOP_AUX_UDMC				(CTOP_AUX_BASE + 0x300)
 
include/soc/nps/common.h +6 -0
index 9b1d43d671a3f..8c18dc6d3fde5 100644
@@ -45,6 +45,12 @@
 #define CTOP_INST_MOV2B_FLIP_R3_B1_B2_INST	0x5B60
 #define CTOP_INST_MOV2B_FLIP_R3_B1_B2_LIMM	0x00010422
 
+#ifndef AUX_IENABLE
+#define AUX_IENABLE				0x40c
+#endif
+
+#define CTOP_AUX_IACK				(0xFFFFF800 + 0x088)
+
 #ifndef __ASSEMBLY__
 
 /* In order to increase compilation test coverage */
Signature · 1 line
2.25.1
author maintainer
#11 lore raw

PATCH 12/17 drivers/net/wan/hdlc_cisco: Add hard_header_len

In reply to Sasha Levin

From: Xie He <[email protected]>

[ Upstream commit 1a545ebe380bf4c1433e3c136e35a77764fda5ad ]

This driver didn't set hard_header_len. This patch sets hard_header_len for it according to its header_ops->create function.

This driver's header_ops->create function (cisco_hard_header) creates a header of (struct hdlc_header), so hard_header_len should be set to sizeof(struct hdlc_header).

---
 drivers/net/wan/hdlc_cisco.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wan/hdlc_cisco.c +1 -0
index a408abc25512a..7f99fb666f196 100644
@@ -377,6 +377,7 @@ static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr)
 		memcpy(&state(hdlc)->settings, &new_settings, size);
 		spin_lock_init(&state(hdlc)->lock);
 		dev->header_ops = &cisco_header_ops;
+		dev->hard_header_len = sizeof(struct hdlc_header);
 		dev->type = ARPHRD_CISCO;
 		call_netdevice_notifiers(NETDEV_POST_TYPE_CHANGE, dev);
 		netif_dormant_on(dev);
Signature · 1 line
2.25.1
author maintainer
#12 lore raw

PATCH 13/17 ARC: [plat-hsdk]: Switch ethernet phy-mode to rgmii-id

In reply to Sasha Levin

From: Evgeniy Didin <[email protected]>

[ Upstream commit 26907eb605fbc3ba9dbf888f21d9d8d04471271d ]

HSDK board has Micrel KSZ9031, recent commit
bcf3440c6dd ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") caused a breakdown of Ethernet.
Using 'phy-mode = "rgmii"' is not correct because accodring RGMII specification it is necessary to have delay on RX (PHY to MAX) which is not generated in case of "rgmii".
Using "rgmii-id" adds necessary delay and solves the issue.

Also adding name of PHY placed on HSDK board.

---
 arch/arc/boot/dts/hsdk.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arc/boot/dts/hsdk.dts +2 -2
index aeacea148793c..75aa3a8f9fdc9 100644
@@ -163,7 +163,7 @@ ethernet@8000 {
 			reg = <0x8000 0x2000>;
 			interrupts = <10>;
 			interrupt-names = "macirq";
-			phy-mode = "rgmii";
+			phy-mode = "rgmii-id";
 			snps,pbl = <32>;
 			snps,multicast-filter-bins = <256>;
 			clocks = <&gmacclk>;
@@ -179,7 +179,7 @@ mdio {
 				#address-cells = <1>;
 				#size-cells = <0>;
 				compatible = "snps,dwmac-mdio";
-				phy0: ethernet-phy@0 {
+				phy0: ethernet-phy@0 { /* Micrel KSZ9031 */
 					reg = <0>;
 					ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
 					ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
Signature · 1 line
2.25.1
author maintainer
#13 lore raw

PATCH 14/17 cpufreq: intel_pstate: Refuse to turn off with HWP enabled

In reply to Sasha Levin

From: "Rafael J. Wysocki" <[email protected]>

[ Upstream commit 43298db3009f06fe5c69e1ca8b6cfc2565772fa1 ]

After commit f6ebbcf08f37 ("cpufreq: intel_pstate: Implement passive mode with HWP enabled") it is possible to change the driver status to "off" via sysfs with HWP enabled, which effectively causes the driver to unregister itself, but HWP remains active and it forces the minimum performance, so even if another cpufreq driver is loaded, it will not be able to control the CPU frequency.

For this reason, make the driver refuse to change the status to "off" with HWP enabled.

---
 drivers/cpufreq/intel_pstate.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/cpufreq/intel_pstate.c +9 -3
index 5c41dc9aaa46d..be1a7bb0b4011 100644
@@ -2098,9 +2098,15 @@ static int intel_pstate_update_status(const char *buf, size_t size)
 {
 	int ret;
 
-	if (size == 3 && !strncmp(buf, "off", size))
-		return intel_pstate_driver ?
-			intel_pstate_unregister_driver() : -EINVAL;
+	if (size == 3 && !strncmp(buf, "off", size)) {
+		if (!intel_pstate_driver)
+			return -EINVAL;
+
+		if (hwp_active)
+			return -EBUSY;
+
+		return intel_pstate_unregister_driver();
+	}
 
 	if (size == 6 && !strncmp(buf, "active", size)) {
 		if (intel_pstate_driver) {
Signature · 1 line
2.25.1
author maintainer
#14 lore raw

PATCH 15/17 net: usb: dm9601: Add USB ID of Keenetic Plus DSL

In reply to Sasha Levin

From: Kamil Lorenc <[email protected]>

[ Upstream commit a609d0259183a841621f252e067f40f8cc25d6f6 ]

Keenetic Plus DSL is a xDSL modem that uses dm9620 as its USB interface.

---
 drivers/net/usb/dm9601.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/usb/dm9601.c +4 -0
index b91f92e4e5f22..915ac75b55fc7 100644
@@ -625,6 +625,10 @@ static const struct usb_device_id products[] = {
 	 USB_DEVICE(0x0a46, 0x1269),	/* DM9621A USB to Fast Ethernet Adapter */
 	 .driver_info = (unsigned long)&dm9601_info,
 	},
+	{
+	 USB_DEVICE(0x0586, 0x3427),	/* ZyXEL Keenetic Plus DSL xDSL modem */
+	 .driver_info = (unsigned long)&dm9601_info,
+	},
 	{},			// END
 };
 
Signature · 1 line
2.25.1
author maintainer
#15 lore raw

PATCH 16/17 ALSA: hda: fix a runtime pm issue in SOF when integrated GPU is disabled

In reply to Sasha Levin

From: Rander Wang <[email protected]>

[ Upstream commit 13774d81f38538c5fa2924bdcdfa509155480fa6 ]

In snd_hdac_device_init pm_runtime_set_active is called to increase child_count in parent device. But when it is failed to build connection with GPU for one case that integrated graphic gpu is disabled, snd_hdac_ext_bus_device_exit will be invoked to clean up a HD-audio extended codec base device. At this time the child_count of parent is not decreased, which makes parent device can't get suspended.

This patch calls pm_runtime_set_suspended to decrease child_count in parent device in snd_hdac_device_exit to match with snd_hdac_device_init. pm_runtime_set_suspended can make sure that it will not decrease child_count if the device is already suspended.

---
 sound/hda/hdac_device.c | 2 ++
 1 file changed, 2 insertions(+)
sound/hda/hdac_device.c +2 -0
index 19deb306facb7..4a843eb7cc940 100644
@@ -123,6 +123,8 @@ EXPORT_SYMBOL_GPL(snd_hdac_device_init);
 void snd_hdac_device_exit(struct hdac_device *codec)
 {
 	pm_runtime_put_noidle(&codec->dev);
+	/* keep balance of runtime PM child_count in parent device */
+	pm_runtime_set_suspended(&codec->dev);
 	snd_hdac_bus_remove_device(codec->bus, codec);
 	kfree(codec->vendor_name);
 	kfree(codec->chip_name);
Signature · 1 line
2.25.1
author maintainer
#16 lore raw

PATCH 17/17 gcov: Disable gcov build with GCC 10

In reply to Sasha Levin

From: Leon Romanovsky <[email protected]>

[ Upstream commit cfc905f158eaa099d6258031614d11869e7ef71c ]

GCOV built with GCC 10 doesn't initialize n_function variable. This produces different kernel panics as was seen by Colin in Ubuntu and me in FC 32.

As a workaround, let's disable GCOV build for broken GCC 10 version.

---
 kernel/gcov/Kconfig | 1 +
 1 file changed, 1 insertion(+)
kernel/gcov/Kconfig +1 -0
index 1276aabaab550..1d78ed19a3512 100644
@@ -3,6 +3,7 @@ menu "GCOV-based kernel profiling"
 config GCOV_KERNEL
 	bool "Enable gcov-based kernel profiling"
 	depends on DEBUG_FS
+	depends on !CC_IS_GCC || GCC_VERSION < 100000
 	select CONSTRUCTORS if !UML
 	default n
 	---help---
Signature · 1 line
2.25.1