Loading drivers/net/wireless/ath/wil6210/wil_platform.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -29,6 +29,7 @@ enum wil_platform_event { enum wil_platform_features { enum wil_platform_features { WIL_PLATFORM_FEATURE_FW_EXT_CLK_CONTROL = 0, WIL_PLATFORM_FEATURE_FW_EXT_CLK_CONTROL = 0, WIL_PLATFORM_FEATURE_TRIPLE_MSI = 1, WIL_PLATFORM_FEATURE_MAX, WIL_PLATFORM_FEATURE_MAX, }; }; Loading drivers/platform/msm/msm_11ad/msm_11ad.c +42 −17 Original line number Original line Diff line number Diff line Loading @@ -131,7 +131,8 @@ struct msm11ad_ctx { /* cpu boost support */ /* cpu boost support */ bool use_cpu_boost; bool use_cpu_boost; bool is_cpu_boosted; bool is_cpu_boosted; struct cpumask boost_cpu; struct cpumask boost_cpu_0; struct cpumask boost_cpu_1; bool keep_radio_on_during_sleep; bool keep_radio_on_during_sleep; int features; int features; Loading Loading @@ -964,13 +965,22 @@ static void msm_11ad_init_cpu_boost(struct msm11ad_ctx *ctx) if (minfreq != maxfreq) { if (minfreq != maxfreq) { /* /* * use first big core for boost, to be compatible with WLAN * use first 2 big cores for boost, to be compatible with WLAN * which assigns big cores from the last index * which assigns big cores from the last index */ */ ctx->use_cpu_boost = true; ctx->use_cpu_boost = true; cpumask_clear(&ctx->boost_cpu); cpumask_clear(&ctx->boost_cpu_0); cpumask_set_cpu(boost_cpu, &ctx->boost_cpu); cpumask_clear(&ctx->boost_cpu_1); dev_info(ctx->dev, "CPU boost: will use core %d\n", boost_cpu); cpumask_set_cpu(boost_cpu, &ctx->boost_cpu_0); if (boost_cpu < (nr_cpu_ids - 1)) { cpumask_set_cpu(boost_cpu + 1, &ctx->boost_cpu_1); dev_info(ctx->dev, "CPU boost: will use cores %d - %d\n", boost_cpu, boost_cpu + 1); } else { cpumask_set_cpu(boost_cpu, &ctx->boost_cpu_1); dev_info(ctx->dev, "CPU boost: will use core %d\n", boost_cpu); } } else { } else { ctx->use_cpu_boost = false; ctx->use_cpu_boost = false; dev_info(ctx->dev, "CPU boost disabled, uniform topology\n"); dev_info(ctx->dev, "CPU boost disabled, uniform topology\n"); Loading Loading @@ -1253,7 +1263,8 @@ static struct platform_driver msm_11ad_driver = { }; }; module_platform_driver(msm_11ad_driver); module_platform_driver(msm_11ad_driver); static void msm_11ad_set_boost_affinity(struct msm11ad_ctx *ctx) static void msm_11ad_set_affinity_hint(struct msm11ad_ctx *ctx, uint irq, struct cpumask *boost_cpu) { { /* /* * There is a very small window where user space can change the * There is a very small window where user space can change the Loading @@ -1264,15 +1275,14 @@ static void msm_11ad_set_boost_affinity(struct msm11ad_ctx *ctx) struct irq_desc *desc; struct irq_desc *desc; while (retries > 0) { while (retries > 0) { irq_modify_status(ctx->pcidev->irq, IRQ_NO_BALANCING, 0); irq_modify_status(irq, IRQ_NO_BALANCING, 0); rc = irq_set_affinity_hint(ctx->pcidev->irq, &ctx->boost_cpu); rc = irq_set_affinity_hint(irq, boost_cpu); if (rc) if (rc) dev_warn(ctx->dev, dev_warn(ctx->dev, "Failed set affinity, rc=%d\n", rc); "Failed set affinity, rc=%d\n", rc); irq_modify_status(ctx->pcidev->irq, 0, IRQ_NO_BALANCING); irq_modify_status(irq, 0, IRQ_NO_BALANCING); desc = irq_to_desc(ctx->pcidev->irq); desc = irq_to_desc(irq); if (cpumask_equal(desc->irq_common_data.affinity, if (cpumask_equal(desc->irq_common_data.affinity, boost_cpu)) &ctx->boost_cpu)) break; break; retries--; retries--; } } Loading @@ -1281,15 +1291,30 @@ static void msm_11ad_set_boost_affinity(struct msm11ad_ctx *ctx) dev_warn(ctx->dev, "failed to set CPU boost affinity\n"); dev_warn(ctx->dev, "failed to set CPU boost affinity\n"); } } static void msm_11ad_clear_boost_affinity(struct msm11ad_ctx *ctx) static void msm_11ad_set_boost_affinity(struct msm11ad_ctx *ctx) { msm_11ad_set_affinity_hint(ctx, ctx->pcidev->irq, &ctx->boost_cpu_0); /* boost rx and tx interrupts */ if (ctx->features & BIT(WIL_PLATFORM_FEATURE_TRIPLE_MSI)) msm_11ad_set_affinity_hint(ctx, ctx->pcidev->irq + 1, &ctx->boost_cpu_1); } static void msm_11ad_clear_affinity_hint(struct msm11ad_ctx *ctx, uint irq) { { int rc; int rc; irq_modify_status(ctx->pcidev->irq, IRQ_NO_BALANCING, 0); irq_modify_status(irq, IRQ_NO_BALANCING, 0); rc = irq_set_affinity_hint(ctx->pcidev->irq, NULL); rc = irq_set_affinity_hint(irq, NULL); if (rc) if (rc) dev_warn(ctx->dev, dev_warn(ctx->dev, "Failed clear affinity, rc=%d\n", rc); "Failed clear affinity, rc=%d\n", rc); } static void msm_11ad_clear_boost_affinity(struct msm11ad_ctx *ctx) { msm_11ad_clear_affinity_hint(ctx, ctx->pcidev->irq); if (ctx->features & BIT(WIL_PLATFORM_FEATURE_TRIPLE_MSI)) msm_11ad_clear_affinity_hint(ctx, ctx->pcidev->irq + 1); } } /* hooks for the wil6210 driver */ /* hooks for the wil6210 driver */ Loading Loading
drivers/net/wireless/ath/wil6210/wil_platform.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -29,6 +29,7 @@ enum wil_platform_event { enum wil_platform_features { enum wil_platform_features { WIL_PLATFORM_FEATURE_FW_EXT_CLK_CONTROL = 0, WIL_PLATFORM_FEATURE_FW_EXT_CLK_CONTROL = 0, WIL_PLATFORM_FEATURE_TRIPLE_MSI = 1, WIL_PLATFORM_FEATURE_MAX, WIL_PLATFORM_FEATURE_MAX, }; }; Loading
drivers/platform/msm/msm_11ad/msm_11ad.c +42 −17 Original line number Original line Diff line number Diff line Loading @@ -131,7 +131,8 @@ struct msm11ad_ctx { /* cpu boost support */ /* cpu boost support */ bool use_cpu_boost; bool use_cpu_boost; bool is_cpu_boosted; bool is_cpu_boosted; struct cpumask boost_cpu; struct cpumask boost_cpu_0; struct cpumask boost_cpu_1; bool keep_radio_on_during_sleep; bool keep_radio_on_during_sleep; int features; int features; Loading Loading @@ -964,13 +965,22 @@ static void msm_11ad_init_cpu_boost(struct msm11ad_ctx *ctx) if (minfreq != maxfreq) { if (minfreq != maxfreq) { /* /* * use first big core for boost, to be compatible with WLAN * use first 2 big cores for boost, to be compatible with WLAN * which assigns big cores from the last index * which assigns big cores from the last index */ */ ctx->use_cpu_boost = true; ctx->use_cpu_boost = true; cpumask_clear(&ctx->boost_cpu); cpumask_clear(&ctx->boost_cpu_0); cpumask_set_cpu(boost_cpu, &ctx->boost_cpu); cpumask_clear(&ctx->boost_cpu_1); dev_info(ctx->dev, "CPU boost: will use core %d\n", boost_cpu); cpumask_set_cpu(boost_cpu, &ctx->boost_cpu_0); if (boost_cpu < (nr_cpu_ids - 1)) { cpumask_set_cpu(boost_cpu + 1, &ctx->boost_cpu_1); dev_info(ctx->dev, "CPU boost: will use cores %d - %d\n", boost_cpu, boost_cpu + 1); } else { cpumask_set_cpu(boost_cpu, &ctx->boost_cpu_1); dev_info(ctx->dev, "CPU boost: will use core %d\n", boost_cpu); } } else { } else { ctx->use_cpu_boost = false; ctx->use_cpu_boost = false; dev_info(ctx->dev, "CPU boost disabled, uniform topology\n"); dev_info(ctx->dev, "CPU boost disabled, uniform topology\n"); Loading Loading @@ -1253,7 +1263,8 @@ static struct platform_driver msm_11ad_driver = { }; }; module_platform_driver(msm_11ad_driver); module_platform_driver(msm_11ad_driver); static void msm_11ad_set_boost_affinity(struct msm11ad_ctx *ctx) static void msm_11ad_set_affinity_hint(struct msm11ad_ctx *ctx, uint irq, struct cpumask *boost_cpu) { { /* /* * There is a very small window where user space can change the * There is a very small window where user space can change the Loading @@ -1264,15 +1275,14 @@ static void msm_11ad_set_boost_affinity(struct msm11ad_ctx *ctx) struct irq_desc *desc; struct irq_desc *desc; while (retries > 0) { while (retries > 0) { irq_modify_status(ctx->pcidev->irq, IRQ_NO_BALANCING, 0); irq_modify_status(irq, IRQ_NO_BALANCING, 0); rc = irq_set_affinity_hint(ctx->pcidev->irq, &ctx->boost_cpu); rc = irq_set_affinity_hint(irq, boost_cpu); if (rc) if (rc) dev_warn(ctx->dev, dev_warn(ctx->dev, "Failed set affinity, rc=%d\n", rc); "Failed set affinity, rc=%d\n", rc); irq_modify_status(ctx->pcidev->irq, 0, IRQ_NO_BALANCING); irq_modify_status(irq, 0, IRQ_NO_BALANCING); desc = irq_to_desc(ctx->pcidev->irq); desc = irq_to_desc(irq); if (cpumask_equal(desc->irq_common_data.affinity, if (cpumask_equal(desc->irq_common_data.affinity, boost_cpu)) &ctx->boost_cpu)) break; break; retries--; retries--; } } Loading @@ -1281,15 +1291,30 @@ static void msm_11ad_set_boost_affinity(struct msm11ad_ctx *ctx) dev_warn(ctx->dev, "failed to set CPU boost affinity\n"); dev_warn(ctx->dev, "failed to set CPU boost affinity\n"); } } static void msm_11ad_clear_boost_affinity(struct msm11ad_ctx *ctx) static void msm_11ad_set_boost_affinity(struct msm11ad_ctx *ctx) { msm_11ad_set_affinity_hint(ctx, ctx->pcidev->irq, &ctx->boost_cpu_0); /* boost rx and tx interrupts */ if (ctx->features & BIT(WIL_PLATFORM_FEATURE_TRIPLE_MSI)) msm_11ad_set_affinity_hint(ctx, ctx->pcidev->irq + 1, &ctx->boost_cpu_1); } static void msm_11ad_clear_affinity_hint(struct msm11ad_ctx *ctx, uint irq) { { int rc; int rc; irq_modify_status(ctx->pcidev->irq, IRQ_NO_BALANCING, 0); irq_modify_status(irq, IRQ_NO_BALANCING, 0); rc = irq_set_affinity_hint(ctx->pcidev->irq, NULL); rc = irq_set_affinity_hint(irq, NULL); if (rc) if (rc) dev_warn(ctx->dev, dev_warn(ctx->dev, "Failed clear affinity, rc=%d\n", rc); "Failed clear affinity, rc=%d\n", rc); } static void msm_11ad_clear_boost_affinity(struct msm11ad_ctx *ctx) { msm_11ad_clear_affinity_hint(ctx, ctx->pcidev->irq); if (ctx->features & BIT(WIL_PLATFORM_FEATURE_TRIPLE_MSI)) msm_11ad_clear_affinity_hint(ctx, ctx->pcidev->irq + 1); } } /* hooks for the wil6210 driver */ /* hooks for the wil6210 driver */ Loading