From patchwork Mon Feb 5 12:09:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nuno Sa via B4 Relay X-Patchwork-Id: 19930 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp838101dyb; Mon, 5 Feb 2024 04:27:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IHgrzyCdHQL9h0g+9k+rR46Zf0K7vIXnoi0vtvr7SYXsGnhrMMijeMBGibfHSSIkNbZNr4p X-Received: by 2002:a2e:b8ca:0:b0:2d0:772a:e5ae with SMTP id s10-20020a2eb8ca000000b002d0772ae5aemr10263144ljp.14.1707136033465; Mon, 05 Feb 2024 04:27:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707136033; cv=pass; d=google.com; s=arc-20160816; b=FavRCEHDtLZ6POYMIk9bn7+mS5C868a2adM9acxOw01EDDk2yUUrvFKjKzXqEuO1GC E9p3Vwvn42xK27udoRSq8q45cfMCIWWCDe19l4PixAJay/5C6VAVkO/60xLYivMv9XVS Xmo/SqDh49NucMN2QM2mWbVGukhWNYFRejSGhnYObSr6lUs7gYe6rlDbQmknMYN/Afl0 V7SVNce2EmI52lCcnYr3kwjqPLTQriL44FdNzAUbFs8tnSFaup6JQrvMAYK2CJcTJMUv vO35SK2y+I4fgqv+GH8o93A3IlJhjAMhj/0LaPrJjy4HPzVjhewSlhLG8zLWdw7fMt7a Pzow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:from:dkim-signature; bh=Z08lyH+PuYPujwMR5Xn4DPTZOtZmFM2OrDy6HLQs0aM=; fh=KqBW0x+kiPwPX6HmwIB7Ki2RAdX/1Xd4LGyA5S4IM4U=; b=TBYiqmD8f1Y/VR9zCWpohk/RtRIH1aehLUJbGr0N7O5x/C7J565u7b54gvqa0c+0Fn BGrbnKXgtRrEOJY6vcLlPtzFUMeEriNry/o+3dl/Cqmw9miajMjp0DOheiXWnFgg5UTO CvCwSX8ADq10g7sTAq3WoKO0bjL/s5MCf1bOuvrLfu9qcoNEj7x1NDqzhilt20dwjArL iEL2hBtv6dzgB+C8g3yDM52ayrqDriBr+OujkPmo4SM2BJgfTqVspe96tjHKwKu2v+Lf g7bXhH2xpXqdpISoFR5fjruxGYAd6pAhx7Imi4cNmjnelg2PKOAZ3dz5SjFe5DHj2Y5B DpVQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QJy4dfNX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-52574-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52574-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWI7dzefT28UxLqlvz/rrGf8dRkTcAeoZ8ptIRr/5igZ+VIA0oksmFnKJut9nS/wSfOWKHoEtOuRp13wQLToRH9mmtQ8g== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j1-20020aa7ca41000000b005600b909127si3058521edt.442.2024.02.05.04.27.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 04:27:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52574-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QJy4dfNX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-52574-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52574-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7590B1F24B25 for ; Mon, 5 Feb 2024 12:16:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24A3828E0D; Mon, 5 Feb 2024 12:09:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QJy4dfNX" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58CFB2260A; Mon, 5 Feb 2024 12:09:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707134974; cv=none; b=F3ZoDOZgxxZZ+HQy82aym9WMtevEHI1Lfh0KL2kze5P0fXWQmea8dqtABSWOFjeT3Ohnyr5l61NxZmICWNg6uWnvGL/pn9PfGKpzhyBkmZeZjmGDT5U3JTy3yjfX1zzkAp5RwJusOkAqFqooK45L2xwMEhNyzvf3x1xvhFBZ65A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707134974; c=relaxed/simple; bh=7e2upngWNO5ntFqCHIcVwMlIz0QAUH3LlE8pQnC8t+Y=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=CfZBS57ZM3EwtKsND8mNvnYdi/mM0BgJ9Y2nBZBC80Ri6jVFhYC0FN5KBHjy9VDUAMsW3F0L19X7M0+0pucOWhW0zCb01x8iVhgXqSp9/YhAcvrZNGLzOfTqwUvXwzSRdNFho7VjBsELWdhxQfYGQHMsp+JgMq6a2CnsGIhqW2Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QJy4dfNX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 1E39CC433F1; Mon, 5 Feb 2024 12:09:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707134974; bh=7e2upngWNO5ntFqCHIcVwMlIz0QAUH3LlE8pQnC8t+Y=; h=From:Subject:Date:To:Cc:Reply-To:From; b=QJy4dfNXRqwlBLdK8TFL0Pj+Gq+ssJoVQvERYlyll6RJwTjl/kt8eY700LXbhIZ2o drjc2PMprsc61PKhieXH3KATA3fQ5Oi3aSk6MBsEiuEZZdu85eAI67kzGkaIhgMeZf tqYkqPvSu5rdZGcehAZAH7IcRQXrCgfsblsivOai52q5lgq+XslIX1Y7qFJuTnbYf/ LzhBkI4Jdd5bvMr/AzmZCXvTeqBVK1Mxyk4kPcC/HSU+6q+4vn1kVhvW2g0TGRlv03 DmwJbDC/+H9cQIZpUjXb5X97Ltou8eEjW1pemLlxgA5vPxtikgVxpO2W4yUxU9hYfP GVHC9TKbt+waA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B69EC48295; Mon, 5 Feb 2024 12:09:34 +0000 (UTC) From: Nuno Sa via B4 Relay Subject: [PATCH v2 0/2] fix DT overlays when device links are released Date: Mon, 05 Feb 2024 13:09:31 +0100 Message-Id: <20240205-fix-device-links-overlays-v2-0-5344f8c79d57@analog.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAPvPwGUC/42NQQ7CIBBFr9KwdgxQbKwr72G6mNKhJVYwYIhN0 7tLWbkybiZ5k//fX1mkYCmyS7WyQMlG610GeaiYntCNBHbIzCSXigtZg7FvGHJQE8zW3SP4RGH GJcJJSUm8rpG3Pcv9Z6AcLu5bl3my8eXDUqaS2L//WJMAAS0p06BG7Bt9RYezH4/aP/aVosjnt 4KDac0gFFf6TPJb0W3b9gGZsc3KBgEAAA== To: Greg Kroah-Hartman , "Rafael J. Wysocki" , Frank Rowand , Rob Herring , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Len Brown Cc: linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707134972; l=1080; i=nuno.sa@analog.com; s=20231116; h=from:subject:message-id; bh=7e2upngWNO5ntFqCHIcVwMlIz0QAUH3LlE8pQnC8t+Y=; b=lKkAAhch2GHEkpX4cOsUW9bnwLAlEHPSBUI1HTZX8tmKTSyyfC5P5dPUij8SGU4FcRHO0V2Ik quwrkFmJISoDQ2XWu594h3fXNmUIeLEH3X5hotYu7KZTjvmIb3WASnL X-Developer-Key: i=nuno.sa@analog.com; a=ed25519; pk=3NQwYA013OUYZsmDFBf8rmyyr5iQlxV/9H4/Df83o1E= X-Endpoint-Received: by B4 Relay for nuno.sa@analog.com/20231116 with auth_id=100 X-Original-From: Nuno Sa Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790061873332560292 X-GMAIL-MSGID: 1790061873332560292 Link to RFC: * https://lore.kernel.org/lkml/20240123-fix-device-links-overlays-v1-1-9e4f6acaab6c@analog.com/ v1: * https://lore.kernel.org/r/20240202-fix-device-links-overlays-v1-0-f9fd1404c8e2@analog.com Changes in v2: * Don't error out in case alloc_workqueue() fails. Devlinks can still work and we'll then release them synchronously. I'm pasting again the link of the first time I exposed the issue where one can see the resulps (big splat) of failing DT assumption: https://lore.kernel.org/linux-devicetree/20230511151047.1779841-1-nuno.sa@analog.com/ --- Nuno Sa (2): driver: core: add dedicated workqueue for devlink removal of: dynamic: flush devlinks workqueue before destroying the changeset drivers/base/core.c | 32 ++++++++++++++++++++++++++++---- drivers/of/dynamic.c | 8 ++++++++ include/linux/fwnode.h | 1 + 3 files changed, 37 insertions(+), 4 deletions(-) --- base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d change-id: 20240123-fix-device-links-overlays-5422e033a09b -- Thanks! - Nuno Sá