e842e16f45
- Refresh all patches - Removed upstreamed - Adapted 1 Compile tested on: bcm53xx, cns3xxx, imx6, lantiq Run tested on: cns3xxx & imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> [update from 4.9.28 to 4.9.29] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
@@ -2459,15 +2459,23 @@ static int mtk_probe(struct platform_dev
|
|
goto err_deinit_hw;
|
|
}
|
|
|
|
+ for (i = 0; i < 3; i++) {
|
|
+ int cpu = i % num_online_cpus();
|
|
+
|
|
+ cpumask_set_cpu(cpu, ð->affinity_mask[i]);
|
|
+ }
|
|
+
|
|
err = devm_request_irq(eth->dev, eth->irq[1], mtk_handle_irq_tx, 0,
|
|
dev_name(eth->dev), eth);
|
|
if (err)
|
|
goto err_free_dev;
|
|
+ irq_set_affinity_hint(eth->irq[1], ð->affinity_mask[1]);
|
|
|
|
err = devm_request_irq(eth->dev, eth->irq[2], mtk_handle_irq_rx, 0,
|
|
dev_name(eth->dev), eth);
|
|
if (err)
|
|
goto err_free_dev;
|
|
+ irq_set_affinity_hint(eth->irq[2], ð->affinity_mask[2]);
|
|
|
|
err = mtk_mdio_init(eth);
|
|
if (err)
|
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
|
@@ -539,6 +539,7 @@ struct mtk_eth {
|
|
struct net_device *netdev[MTK_MAX_DEVS];
|
|
struct mtk_mac *mac[MTK_MAX_DEVS];
|
|
int irq[3];
|
|
+ cpumask_t affinity_mask[3];
|
|
u32 msg_enable;
|
|
unsigned long sysclk;
|
|
struct regmap *ethsys;
|