From 7a02051d8ce7a64ddb11f867b4c4ba92279c9848 Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Mon, 2 Dec 2024 22:38:28 -0800 Subject: [PATCH] soc/google/cpif: Don't pin workers onto CPU2 There's no reason to pin workers onto CPU2. Instead, allow the workers to run where the workqueue sees fit, most likely on the CPU which enqueues the worker, which is better than always dumping the workers onto CPU2. Signed-off-by: Sultan Alsawaf --- drivers/soc/samsung/cpif/modem_ctrl_s5100.c | 14 ++++---------- drivers/soc/samsung/cpif/s51xx_pcie.c | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/soc/samsung/cpif/modem_ctrl_s5100.c b/drivers/soc/samsung/cpif/modem_ctrl_s5100.c index e58310103..932be59be 100755 --- a/drivers/soc/samsung/cpif/modem_ctrl_s5100.c +++ b/drivers/soc/samsung/cpif/modem_ctrl_s5100.c @@ -50,8 +50,6 @@ static int s5100_lcd_notifier(struct notifier_block *notifier, #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) -#define RUNTIME_PM_AFFINITY_CORE 2 - static struct modem_ctl *g_mc; static int s5100_poweroff_pcie(struct modem_ctl *mc, bool force_off); @@ -213,8 +211,7 @@ static irqreturn_t ap_wakeup_handler(int irq, void *data) (gpio_val == 1 ? IRQF_TRIGGER_LOW : IRQF_TRIGGER_HIGH)); mif_enable_irq(&mc->cp_gpio_irq[CP_GPIO_IRQ_CP2AP_WAKEUP]); - queue_work_on(RUNTIME_PM_AFFINITY_CORE, mc->wakeup_wq, - (gpio_val == 1 ? &mc->wakeup_work : &mc->suspend_work)); + queue_work(mc->wakeup_wq, gpio_val == 1 ? &mc->wakeup_work : &mc->suspend_work); return IRQ_HANDLED; } @@ -1482,8 +1479,7 @@ static int s5100_pm_notifier(struct notifier_block *notifier, (gpio_val == 1 ? IRQF_TRIGGER_LOW : IRQF_TRIGGER_HIGH)); mif_enable_irq(&mc->cp_gpio_irq[CP_GPIO_IRQ_CP2AP_WAKEUP]); - queue_work_on(RUNTIME_PM_AFFINITY_CORE, mc->wakeup_wq, - (gpio_val == 1 ? &mc->wakeup_work : &mc->suspend_work)); + queue_work(mc->wakeup_wq, gpio_val == 1 ? &mc->wakeup_work : &mc->suspend_work); } spin_unlock_irqrestore(&mc->pcie_pm_lock, flags); break; @@ -1629,13 +1625,11 @@ static int s5100_abox_call_state_notifier(struct notifier_block *nb, switch (action) { case ABOX_CALL_EVENT_OFF: mc->pcie_voice_call_on = false; - queue_work_on(RUNTIME_PM_AFFINITY_CORE, mc->wakeup_wq, - &mc->call_off_work); + queue_work(mc->wakeup_wq, &mc->call_off_work); break; case ABOX_CALL_EVENT_ON: mc->pcie_voice_call_on = true; - queue_work_on(RUNTIME_PM_AFFINITY_CORE, mc->wakeup_wq, - &mc->call_on_work); + queue_work(mc->wakeup_wq, &mc->call_on_work); break; default: mif_err("undefined call event = %lu\n", action); diff --git a/drivers/soc/samsung/cpif/s51xx_pcie.c b/drivers/soc/samsung/cpif/s51xx_pcie.c index 2c8bf33bc..a2f828b74 100755 --- a/drivers/soc/samsung/cpif/s51xx_pcie.c +++ b/drivers/soc/samsung/cpif/s51xx_pcie.c @@ -373,7 +373,7 @@ static void s51xx_pcie_cpl_timeout_cb(struct exynos_pcie_notify *noti) if (mc->pcie_cto_retry_cnt++ < 10) { pr_err("[%s][%d] retry pcie poweron !!!\n", __func__, mc->pcie_cto_retry_cnt); - queue_work_on(2, mc->wakeup_wq, &mc->wakeup_work); + queue_work(mc->wakeup_wq, &mc->wakeup_work); } else { pr_err("[%s][%d] force crash !!!\n", __func__, mc->pcie_cto_retry_cnt);