From nobody Tue Sep 9 21:32:22 2025 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BEF21F4190 for ; Fri, 5 Sep 2025 09:10:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757063432; cv=none; b=FOCxJoqo1l0TALhD0Gxtjo9Q96AsIErKhF/ZfQRD/aQzYe4eqBAaHH6Z/0yvu8RY7Z2SOToCsDERqYn8njxM5Wojax0cOdd2cfvn0Shctis4J2zubMxjHru6pSd5ZNu16T3hCQFg8qs3PopbilQPsxaYZnHarHQVnUn7Wx7uLl8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757063432; c=relaxed/simple; bh=H8tlBxo/I4QKoAzzAETioGThO/7phy21jo5gPXQ6OIo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hm9P3/8bLYG8b58ue31DaoveseJGpLAe+TD5wbAmCE2XtPzWc+CQRjw571KqNdVzMC7d+xb3ximlgLa8JZppxx2UTna9orG4p7ghV9PgnM3Fs+VDoPLElKHFUSr97AQjel+fCg0pER42d1AZ4AxBCAOG65Ghq9iAbTN8tMaeepA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=dPbjTzMR; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="dPbjTzMR" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3da9ad0c1f4so1284780f8f.3 for ; Fri, 05 Sep 2025 02:10:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1757063428; x=1757668228; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nTbLiixSPe1l4QCB72UnekC/gzC3UfcTOHYnl7T9UCY=; b=dPbjTzMR+xzQihcYtBxCIO0bX+frgXReHFLTc8mCewTsSKfineCir2IkEntwjiSg/B ZA1rGnUvNwNJS2lTw3SR+TZedyazSY6+UzLm04+/MkwBuOv83wxzYYsuKqpQUPLaMBnw byTssY+ig3QYMpO7hODJNSDi63ld+mwaConagKtJhwQVAukDTyqHTc8iDESBdBvdhXlK paNK+vZ+4dM+S8UwCdc6NlMuRf1KAF+1q/+09A/1h+BPsR2NnawMyeU6Y95YTN674POm HLJXnFjpi5nLD5BM0RSK2TT7SGOmCi0yvv/aR5pHxhWc3JgKlyyemFyaYQwbj/jvm4L4 +8yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757063428; x=1757668228; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nTbLiixSPe1l4QCB72UnekC/gzC3UfcTOHYnl7T9UCY=; b=jgVixgAKqF/uLNzC61LOETbTIaNKYUDY0B9/YJ4NjpoXIpyPpL16YIcoizIYN0JvQy ouqUDSvO6bPYCSj6xFW2qKvNzly2pqCajWK4DN9Bx7z0c791uTI24zPmWezJKL1j/k5l pcSz0qPEqWYcAw+V3QKJ7mayEu4Xdp7izBAOBstmtvTqJk9f7lt7kpVQgRxfMOJO46ZH 0ggILuWm75wJ+I09HBLaYGEsaX7vMAcnfcc94PX8SfNKXSEPOXBN7BFrh5ywT1tZAqnp 8/E3ImCd2eAqPNoY2yKq7CXV6440m7uiLWEU/49mFk2hXYX+6UXIUIKXYeCih6eCl01A DkgQ== X-Gm-Message-State: AOJu0YwLcfG0+pfC4L3Phfp0yuc9lmUJi4WzU5efgLdWsb4V0TpiN7SH VR7ReTRwY5QMw/vXHxbIzEeGWSPi19q6EWmzgfnwlXYYGUNcKNGw5FjNVZwlJEoytMVYfQo5f4r mMdj1YfM= X-Gm-Gg: ASbGncsdmwazX/f5fzOs8SW98sUml0Vd+EaDdLBxR2ueqOZRrsastoqcOfMK0ngju9M SSF9h8EMK3QXhqn04AHmEzDmKwZCTZGLw2tiE6Hgqglp8trCYqptUDUYFBNwpu3h3yA+OcunPK2 putpQRBodOIyCASgq3InYgy9vnpuJVtIt3hOa97uQqbp9G4oTbToU0ds6kg1nq/iSveElnxezP5 UdrZCaRV4Uw0KX/nezq7TtqjGYWX+sKZC9O+eIn+/wkoMl9UNcadMmI95/cRekxNB4vaPotWtPb PJqgpzS9XAIMuJkXdzyOsVbbqe9bzCr2C2MdFxuzJL84cK4BI/LneY54TU0WCDEDW1HTTXE77SN gKlamorabbeKpjyZbVAcNAMXpGdVJ5ZRLL+taDMSkV2eJXzs= X-Google-Smtp-Source: AGHT+IH70qfE1sbG5B6EhOVJFRp2gPCSNeuRweaStAWJqdo0xRxChgSl7UjLXO4wPAWOfEVCXvXh3A== X-Received: by 2002:a05:6000:4403:b0:3d4:15a2:11e9 with SMTP id ffacd0b85a97d-3d415a21498mr9589221f8f.61.1757063428151; Fri, 05 Sep 2025 02:10:28 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45dd4affb6bsm39726915e9.1.2025.09.05.02.10.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Sep 2025 02:10:27 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 1/2] ASoC: replace use of system_unbound_wq with system_dfl_wq Date: Fri, 5 Sep 2025 11:10:15 +0200 Message-ID: <20250905091016.109428-2-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250905091016.109428-1-marco.crivellari@suse.com> References: <20250905091016.109428-1-marco.crivellari@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently if a user enqueue a work item using schedule_delayed_work() the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to schedule_work() that is using system_wq and queue_work(), that makes use again of WORK_CPU_UNBOUND. This lack of consistentcy cannot be addressed without refactoring the API. system_unbound_wq should be the default workqueue so as not to enforce locality constraints for random work whenever it's not required. Adding system_dfl_wq to encourage its use when unbound work should be used. queue_work() / queue_delayed_work() / mod_delayed_work() will now use the new unbound wq: whether the user still use the old wq a warn will be printed along with a wq redirect to the new one. The old system_unbound_wq will be kept for a few release cycles. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 91c8697c29c3..c8fff8496ede 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -1044,7 +1044,7 @@ int wm_adsp_early_event(struct snd_soc_dapm_widget *w, =20 switch (event) { case SND_SOC_DAPM_PRE_PMU: - queue_work(system_unbound_wq, &dsp->boot_work); + queue_work(system_dfl_wq, &dsp->boot_work); break; case SND_SOC_DAPM_PRE_PMD: wm_adsp_power_down(dsp); --=20 2.51.0 From nobody Tue Sep 9 21:32:22 2025 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D9ED306484 for ; Fri, 5 Sep 2025 09:10:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757063433; cv=none; b=SeaVI5RBkciPY7vuzkzwASyIe6JKZX5pW+AUb611V5zNPG9ovkmeNLDc/6tFXX9IfeV5gz5LrDR9ICvsqazlOC+qZygZ6GnMjt1Sk0fPlTtNu+imiyd/cfQMOyEVqOdJMmjUw4sb8koi+4kgnxMWiIoaEZW7qLgfcY5Key6c1fs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757063433; c=relaxed/simple; bh=5RkNtJkVoCkHKfEYrA6MXCl2MVFvhfJGr8dOveoTRGY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YdkJiTSG8KAKTNEr5b32Y3I/oUG55VnhUkJaFOSb3S9SCmMJ9OZe5jIxq0tS6LnmCkLmpOLQzg37BtZwlpeTsFSy4x8oIwhHl+tLPRaE7U5Wo/Bl+XpGmNlfPrFDK3YFpLjvvNnkYa3FfFmKDo03Zg4Uw8STUhsGEDzSbVCOW74= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=DtaahZ3Q; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="DtaahZ3Q" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-3e014bf8ec1so1387317f8f.1 for ; Fri, 05 Sep 2025 02:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1757063429; x=1757668229; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sm4pe/hBRwVMLzZHjbo9408+9mRS/P1/CN95bOU2KWk=; b=DtaahZ3Q9CWdiIIAALeIi49ETn0CGswcYVGWMYsJqTygRWR044AnL4EJtjnU+htbDQ y7rHUFqsKN29PZORDgtRwopGq+0JnCSgdRPF26Tix6B1z4i9yL+NkGDeCEfehq1xyQ6z fvWbx5KqCJABVQLuBl3zcovsGCYQ8mjd5eYc5mQHcRRuLOgOIdF6L/gQaqxau12mDtQV Nnc17MBRsEzt/8R9F0Lh1KeYzY9BE+vd0BDJ/2ktWJoQQfNtp1xzXFtQjQkoaE3L3YT/ NrIvxbhV5ndG4Mw8RiJWyLplnlnteIHmT6tou2jkEUFXmzOkvwdzapld4GRm3TGftRPQ mA6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757063429; x=1757668229; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sm4pe/hBRwVMLzZHjbo9408+9mRS/P1/CN95bOU2KWk=; b=ePOJNwKtfOdr0oU5h0Zt2mHI/5gCwoZCqwBUGGER/hBCaeVI1fP31gQzfp1cZTBaS4 etvFB37aRwPCJXEE1HD88ZS5CkH2Nj47T/T1JDrSciqRJM1xzb5dA11iZEkjq9hRpA/p aKNMqHkOuw/Z60KoMIpzrAlUPa0ndteVL0hr67jshNXxFL+Gy4jCyMAOBaQrhHSGjYSW +Fil11I5lsAW36FHl00F7gr4jfgmH7ajJJZA1qG2xjqz2UEksh9rE/K42BNOwss4Iu7B LVAaYklaGZPtvaAlruHSyrLD4vrQBfYeAyAm3AfH07Plstzt4gcHXGb09zj07huirTaQ o1Wg== X-Gm-Message-State: AOJu0YxlffTzJ9t4SIq/8zGCLtCPJd9ZxpTg/xKfDTEM1TqnevbwM6ZH dYAwt1Y4ohis2TUSjCkuIvEopT+AYSRwxD7DnFmqICSuFGyDzI8ywwnVOfJ/ZTNFP33AV7CJHT4 jjmyDoNU= X-Gm-Gg: ASbGnctHhGp09qBBm0tpHfpXR9D/0SaKYxy/VyuQBcfSszBaHj3FryOS9riT/lMHJHc bhxf53VNuGvLVXFWB/U3qZUY9owfI25f68+TYiBlN7K4hF/ebAJwgZpLEaWi7MKEkz1GKg/sFdB HdRIn6TwD57GLYQzU4hiQ6AEucyZ8thLN+m1xjRAOcEe/PHztWOuatzlYE4F+LNOQFzdi4n8+Do t7bToXtvYcLNC+dbgVpFttxGLarnIQ90nx1mg06DS37OlCus0n8JTnessfkiUY2l0unQumXhU2U O/y8p3z0nRJtpWQtk5ca1GVe1UtQCc8cZU8EpIoM471ewsYQ0g5GaxMj/NSp7mldMrXVENgdpkf v2nI0Yd/87Kp++ZqEw7CIsEa4DAgD9eXRVvNyS+YSlbEOV+j7ZL7pRdDwbg== X-Google-Smtp-Source: AGHT+IHXZjRfNNN1VASUYYcP6J0MVd6RmogJZXjUNszPLnsyh/h8mAG1e0M5wD4yMRAWOYI+bFu/Yw== X-Received: by 2002:a05:6000:40ce:b0:3e4:bb5f:ee95 with SMTP id ffacd0b85a97d-3e4bb5ff303mr417291f8f.38.1757063429026; Fri, 05 Sep 2025 02:10:29 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45dd4affb6bsm39726915e9.1.2025.09.05.02.10.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Sep 2025 02:10:28 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 2/2] ASoC: replace use of system_wq with system_percpu_wq Date: Fri, 5 Sep 2025 11:10:16 +0200 Message-ID: <20250905091016.109428-3-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250905091016.109428-1-marco.crivellari@suse.com> References: <20250905091016.109428-1-marco.crivellari@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently if a user enqueue a work item using schedule_delayed_work() the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to schedule_work() that is using system_wq and queue_work(), that makes use again of WORK_CPU_UNBOUND. This lack of consistentcy cannot be addressed without refactoring the API. system_wq is a per-CPU worqueue, yet nothing in its name tells about that CPU affinity constraint, which is very often not required by users. Make it clear by adding a system_percpu_wq. queue_work() / queue_delayed_work() mod_delayed_work() will now use the new per-cpu wq: whether the user still stick on the old name a warn will be printed along a wq redirect to the new one. This patch add the new system_percpu_wq except for mm, fs and net subsystem, whom are handled in separated patches. The old wq will be kept for a few release cylces. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- sound/soc/codecs/aw88081.c | 2 +- sound/soc/codecs/aw88166.c | 2 +- sound/soc/codecs/aw88261.c | 2 +- sound/soc/codecs/aw88395/aw88395.c | 2 +- sound/soc/codecs/aw88399.c | 2 +- sound/soc/codecs/cs42l43-jack.c | 6 +++--- sound/soc/codecs/cs42l43.c | 4 ++-- sound/soc/codecs/es8326.c | 12 ++++++------ sound/soc/codecs/rt5663.c | 6 +++--- sound/soc/intel/boards/sof_es8336.c | 2 +- sound/soc/sof/intel/cnl.c | 2 +- sound/soc/sof/intel/hda-ipc.c | 2 +- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/sound/soc/codecs/aw88081.c b/sound/soc/codecs/aw88081.c index ad16ab6812cd..e61c58dcd606 100644 --- a/sound/soc/codecs/aw88081.c +++ b/sound/soc/codecs/aw88081.c @@ -779,7 +779,7 @@ static void aw88081_start(struct aw88081 *aw88081, bool= sync_start) if (sync_start =3D=3D AW88081_SYNC_START) aw88081_start_pa(aw88081); else - queue_delayed_work(system_wq, + queue_delayed_work(system_percpu_wq, &aw88081->start_work, AW88081_START_WORK_DELAY_MS); } diff --git a/sound/soc/codecs/aw88166.c b/sound/soc/codecs/aw88166.c index 6c50c4a18b6a..c9c3ebb9a739 100644 --- a/sound/soc/codecs/aw88166.c +++ b/sound/soc/codecs/aw88166.c @@ -1313,7 +1313,7 @@ static void aw88166_start(struct aw88166 *aw88166, bo= ol sync_start) if (sync_start =3D=3D AW88166_SYNC_START) aw88166_start_pa(aw88166); else - queue_delayed_work(system_wq, + queue_delayed_work(system_percpu_wq, &aw88166->start_work, AW88166_START_WORK_DELAY_MS); } diff --git a/sound/soc/codecs/aw88261.c b/sound/soc/codecs/aw88261.c index fb99871578c5..c8e62af8949e 100644 --- a/sound/soc/codecs/aw88261.c +++ b/sound/soc/codecs/aw88261.c @@ -705,7 +705,7 @@ static void aw88261_start(struct aw88261 *aw88261, bool= sync_start) if (sync_start =3D=3D AW88261_SYNC_START) aw88261_start_pa(aw88261); else - queue_delayed_work(system_wq, + queue_delayed_work(system_percpu_wq, &aw88261->start_work, AW88261_START_WORK_DELAY_MS); } diff --git a/sound/soc/codecs/aw88395/aw88395.c b/sound/soc/codecs/aw88395/= aw88395.c index aea44a199b98..c6fe69cc5e73 100644 --- a/sound/soc/codecs/aw88395/aw88395.c +++ b/sound/soc/codecs/aw88395/aw88395.c @@ -75,7 +75,7 @@ static void aw88395_start(struct aw88395 *aw88395, bool s= ync_start) if (sync_start =3D=3D AW88395_SYNC_START) aw88395_start_pa(aw88395); else - queue_delayed_work(system_wq, + queue_delayed_work(system_percpu_wq, &aw88395->start_work, AW88395_START_WORK_DELAY_MS); } diff --git a/sound/soc/codecs/aw88399.c b/sound/soc/codecs/aw88399.c index ee3cc2a95f85..dfa8ce355e3c 100644 --- a/sound/soc/codecs/aw88399.c +++ b/sound/soc/codecs/aw88399.c @@ -1281,7 +1281,7 @@ static void aw88399_start(struct aw88399 *aw88399, bo= ol sync_start) if (sync_start =3D=3D AW88399_SYNC_START) aw88399_start_pa(aw88399); else - queue_delayed_work(system_wq, + queue_delayed_work(system_percpu_wq, &aw88399->start_work, AW88399_START_WORK_DELAY_MS); } diff --git a/sound/soc/codecs/cs42l43-jack.c b/sound/soc/codecs/cs42l43-jac= k.c index ac19a572fe70..38c73c8dcc45 100644 --- a/sound/soc/codecs/cs42l43-jack.c +++ b/sound/soc/codecs/cs42l43-jack.c @@ -301,7 +301,7 @@ irqreturn_t cs42l43_bias_detect_clamp(int irq, void *da= ta) { struct cs42l43_codec *priv =3D data; =20 - queue_delayed_work(system_wq, &priv->bias_sense_timeout, + queue_delayed_work(system_percpu_wq, &priv->bias_sense_timeout, msecs_to_jiffies(1000)); =20 return IRQ_HANDLED; @@ -432,7 +432,7 @@ irqreturn_t cs42l43_button_press(int irq, void *data) struct cs42l43_codec *priv =3D data; =20 // Wait for 2 full cycles of comb filter to ensure good reading - queue_delayed_work(system_wq, &priv->button_press_work, + queue_delayed_work(system_percpu_wq, &priv->button_press_work, msecs_to_jiffies(20)); =20 return IRQ_HANDLED; @@ -470,7 +470,7 @@ irqreturn_t cs42l43_button_release(int irq, void *data) { struct cs42l43_codec *priv =3D data; =20 - queue_work(system_wq, &priv->button_release_work); + queue_work(system_percpu_wq, &priv->button_release_work); =20 return IRQ_HANDLED; } diff --git a/sound/soc/codecs/cs42l43.c b/sound/soc/codecs/cs42l43.c index ea84ac64c775..105ad53bae0c 100644 --- a/sound/soc/codecs/cs42l43.c +++ b/sound/soc/codecs/cs42l43.c @@ -161,7 +161,7 @@ static void cs42l43_hp_ilimit_clear_work(struct work_st= ruct *work) priv->hp_ilimit_count--; =20 if (priv->hp_ilimit_count) - queue_delayed_work(system_wq, &priv->hp_ilimit_clear_work, + queue_delayed_work(system_percpu_wq, &priv->hp_ilimit_clear_work, msecs_to_jiffies(CS42L43_HP_ILIMIT_DECAY_MS)); =20 snd_soc_dapm_mutex_unlock(dapm); @@ -178,7 +178,7 @@ static void cs42l43_hp_ilimit_work(struct work_struct *= work) =20 if (priv->hp_ilimit_count < CS42L43_HP_ILIMIT_MAX_COUNT) { if (!priv->hp_ilimit_count) - queue_delayed_work(system_wq, &priv->hp_ilimit_clear_work, + queue_delayed_work(system_percpu_wq, &priv->hp_ilimit_clear_work, msecs_to_jiffies(CS42L43_HP_ILIMIT_DECAY_MS)); =20 priv->hp_ilimit_count++; diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c index 066d92b54312..4ba4de184d2c 100644 --- a/sound/soc/codecs/es8326.c +++ b/sound/soc/codecs/es8326.c @@ -812,12 +812,12 @@ static void es8326_jack_button_handler(struct work_st= ruct *work) press_count =3D 0; } button_to_report =3D cur_button; - queue_delayed_work(system_wq, &es8326->button_press_work, + queue_delayed_work(system_percpu_wq, &es8326->button_press_work, msecs_to_jiffies(35)); } else if (prev_button !=3D cur_button) { /* mismatch, detect again */ prev_button =3D cur_button; - queue_delayed_work(system_wq, &es8326->button_press_work, + queue_delayed_work(system_percpu_wq, &es8326->button_press_work, msecs_to_jiffies(35)); } else { /* released or no pressed */ @@ -912,7 +912,7 @@ static void es8326_jack_detect_handler(struct work_stru= ct *work) (ES8326_INT_SRC_PIN9 | ES8326_INT_SRC_BUTTON)); regmap_write(es8326->regmap, ES8326_SYS_BIAS, 0x1f); regmap_update_bits(es8326->regmap, ES8326_HP_DRIVER_REF, 0x0f, 0x0d); - queue_delayed_work(system_wq, &es8326->jack_detect_work, + queue_delayed_work(system_percpu_wq, &es8326->jack_detect_work, msecs_to_jiffies(400)); es8326->hp =3D 1; goto exit; @@ -923,7 +923,7 @@ static void es8326_jack_detect_handler(struct work_stru= ct *work) regmap_write(es8326->regmap, ES8326_INT_SOURCE, (ES8326_INT_SRC_PIN9 | ES8326_INT_SRC_BUTTON)); es8326_enable_micbias(es8326->component); - queue_delayed_work(system_wq, &es8326->button_press_work, 10); + queue_delayed_work(system_percpu_wq, &es8326->button_press_work, 10); goto exit; } if ((iface & ES8326_HPBUTTON_FLAG) =3D=3D 0x01) { @@ -958,10 +958,10 @@ static irqreturn_t es8326_irq(int irq, void *dev_id) goto out; =20 if (es8326->jack->status & SND_JACK_HEADSET) - queue_delayed_work(system_wq, &es8326->jack_detect_work, + queue_delayed_work(system_percpu_wq, &es8326->jack_detect_work, msecs_to_jiffies(10)); else - queue_delayed_work(system_wq, &es8326->jack_detect_work, + queue_delayed_work(system_percpu_wq, &es8326->jack_detect_work, msecs_to_jiffies(300)); =20 out: diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c index 45057562c0c8..44cfec76ad96 100644 --- a/sound/soc/codecs/rt5663.c +++ b/sound/soc/codecs/rt5663.c @@ -1859,7 +1859,7 @@ static irqreturn_t rt5663_irq(int irq, void *data) dev_dbg(regmap_get_device(rt5663->regmap), "%s IRQ queue work\n", __func__); =20 - queue_delayed_work(system_wq, &rt5663->jack_detect_work, + queue_delayed_work(system_percpu_wq, &rt5663->jack_detect_work, msecs_to_jiffies(250)); =20 return IRQ_HANDLED; @@ -1974,7 +1974,7 @@ static void rt5663_jack_detect_work(struct work_struc= t *work) cancel_delayed_work_sync( &rt5663->jd_unplug_work); } else { - queue_delayed_work(system_wq, + queue_delayed_work(system_percpu_wq, &rt5663->jd_unplug_work, msecs_to_jiffies(500)); } @@ -2024,7 +2024,7 @@ static void rt5663_jd_unplug_work(struct work_struct = *work) SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2 | SND_JACK_BTN_3); } else { - queue_delayed_work(system_wq, &rt5663->jd_unplug_work, + queue_delayed_work(system_percpu_wq, &rt5663->jd_unplug_work, msecs_to_jiffies(500)); } } diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/s= of_es8336.c index a0b3679b17b4..e60dd85f5552 100644 --- a/sound/soc/intel/boards/sof_es8336.c +++ b/sound/soc/intel/boards/sof_es8336.c @@ -163,7 +163,7 @@ static int sof_es8316_speaker_power_event(struct snd_so= c_dapm_widget *w, =20 priv->speaker_en =3D !SND_SOC_DAPM_EVENT_ON(event); =20 - queue_delayed_work(system_wq, &priv->pcm_pop_work, msecs_to_jiffies(70)); + queue_delayed_work(system_percpu_wq, &priv->pcm_pop_work, msecs_to_jiffie= s(70)); return 0; } =20 diff --git a/sound/soc/sof/intel/cnl.c b/sound/soc/sof/intel/cnl.c index 385e5339f0a4..207eb18560dd 100644 --- a/sound/soc/sof/intel/cnl.c +++ b/sound/soc/sof/intel/cnl.c @@ -329,7 +329,7 @@ int cnl_ipc_send_msg(struct snd_sof_dev *sdev, struct s= nd_sof_ipc_msg *msg) * CTX_SAVE IPC, which is sent before the DSP enters D3. */ if (hdr->cmd !=3D (SOF_IPC_GLB_PM_MSG | SOF_IPC_PM_CTX_SAVE)) - mod_delayed_work(system_wq, &hdev->d0i3_work, + mod_delayed_work(system_percpu_wq, &hdev->d0i3_work, msecs_to_jiffies(SOF_HDA_D0I3_WORK_DELAY_MS)); =20 return 0; diff --git a/sound/soc/sof/intel/hda-ipc.c b/sound/soc/sof/intel/hda-ipc.c index f3fbf43a70c2..d8fde18145b4 100644 --- a/sound/soc/sof/intel/hda-ipc.c +++ b/sound/soc/sof/intel/hda-ipc.c @@ -96,7 +96,7 @@ void hda_dsp_ipc4_schedule_d0i3_work(struct sof_intel_hda= _dev *hdev, if (hda_dsp_ipc4_pm_msg(msg_data->primary)) return; =20 - mod_delayed_work(system_wq, &hdev->d0i3_work, + mod_delayed_work(system_percpu_wq, &hdev->d0i3_work, msecs_to_jiffies(SOF_HDA_D0I3_WORK_DELAY_MS)); } EXPORT_SYMBOL_NS(hda_dsp_ipc4_schedule_d0i3_work, "SND_SOC_SOF_INTEL_HDA_C= OMMON"); --=20 2.51.0