Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1771615pxu; Thu, 17 Dec 2020 19:25:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCgFmC/Q7x8pb5fs83MAfI0MGJ5p4febg343FvyCjxbmqspOrfpVDkDFK1gebfSjNMNEkl X-Received: by 2002:aa7:c802:: with SMTP id a2mr2445092edt.120.1608261950669; Thu, 17 Dec 2020 19:25:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608261950; cv=none; d=google.com; s=arc-20160816; b=Hn0A6T9yICuoHNVg18zIwCnqWhZ9zBi+d0o4N+NpUuTZUoa2uYI00MHhbQv50KcLnP irxk916IZiZuQ0k6SzKWKrEsawnw+jJ+qrf+gaBhvlyeiNeKn4R4jppPllePMSinINR3 4oF1twaZCeqwnHr14HgflC4P7PC0kRqA5jleVgu+qz5FcjjPtcp+Pp1jMAvyDzknyak1 Kysc0qKdEwBXVQ8Vy2cytBoKWwhgyjl9yojQJhLd96Yp3s59q7564fiBYkS2+X7RPEOm q/Op7D8ngu9nrgQARKddjCgZLyT303C1P8r3QRIpoDYYToldWBgX0pAOI5sHpU4LdJEo VOJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :sender:dkim-signature; bh=tFsp6CH4m43xFAZz/38v7JzYiv1DTpcXEDDEsiEkpXE=; b=FB/Jy/K7jRBUdsDmUY3v13QdHLgDxP3ls7eeHEU44o3Hy9oU91QJB/EddUMUiYaXYh qVelwArFufKO8QtfGSgUNzQuF5cn54jUH4d5yR1SntOrih4UFh8JUxJGaQRGOGGRznGi dyJvtLv5VeyD3pqShPMacKM6ejwfuZv7rp/fe5xzS0jXe9aedzkY45wBIiLK7Bi32+UZ /fzuuQ+2pk+EWnxongG1CYBOLnEdlAKIBt8DnkKzyruFLqgN82D3ORHTGfvhMsg4n5i8 nbpksflSfpk/K2Jdi5QMs8kEMD3FH2XtqvlV/3JsJlMh2ERRNOeQRrcxRgsF3QwxbPYQ g14A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=tDe0ASi5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si3865244ejb.22.2020.12.17.19.25.27; Thu, 17 Dec 2020 19:25:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=tDe0ASi5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732460AbgLRDRs (ORCPT + 99 others); Thu, 17 Dec 2020 22:17:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726796AbgLRDRs (ORCPT ); Thu, 17 Dec 2020 22:17:48 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3ECDC0617A7 for ; Thu, 17 Dec 2020 19:17:07 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id h75so962667ybg.18 for ; Thu, 17 Dec 2020 19:17:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=tFsp6CH4m43xFAZz/38v7JzYiv1DTpcXEDDEsiEkpXE=; b=tDe0ASi54Tv7G07RldVhCqkUsWK32D6bMs0uxW4Un41XoPdSo+geG6Cn0h+95C0Gum ppDl0HU33qGgqLEsFg9hzICvzZSE7t87DGpzvakZdHU+iCYx0WfBOiqzYROI3R1aAn9C MYx3h4JtATcVi08xOVdnCqiJw6qLaJkirw0qVmDpt4t2M/E2atBZ9TENz0Vb2N5bNPx8 xCmGRcQn+vu7n0Gx18ArGLOVyWhlGMxycKo5y/7anBgEZceaz0DTciPi/TtjTXLCArIX Bn9Jc01D+W6rmBBplpDENbBqBXf1EEf+rFjHOA7I2qCe4Q8dT7CbkphH4VsvdH7tur7K DvnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=tFsp6CH4m43xFAZz/38v7JzYiv1DTpcXEDDEsiEkpXE=; b=L+Lq2ruB4REQB5oYZXQVcagBOFhjVuO7MF1qUuIIh4ODYTAUDedgQUXtX92Ok4L5uC G4YVpJ1H7vsFdLSBF7gnqyZFSqEmovSlM4bsHxvcfTMLffZNQhTvLX3AOLTvWcgp/ZwU 3bKeNq1dE4Se31qZihsOh9vSeUyMl6Co97+crM4izMuld21lSktjnPrnKdmtwHdjpfn3 WriDet+LtddOx4qQG6y5fUXya/UJJVU8SMwARnFe2pH4wPCALEQ15ApzVbg0G1ZJhzC0 hMKAOxt+dSewAkPigjPdxFMTeviYTeT08WQ/KsOZwMJE8dmYEt/2SAtlWfEi4+YkM6QM fi4A== X-Gm-Message-State: AOAM533dn7lZskQLS3kTwJ1PVdJdwS6pFdt3s5TZG6ocCEBvwKSKuuc9 D6nLUGuDaCkdI2HkgHbVjDzivkz+ESIsV7c= Sender: "saravanak via sendgmr" X-Received: from saravanak.san.corp.google.com ([2620:15c:2d:3:7220:84ff:fe09:fedc]) (user=saravanak job=sendgmr) by 2002:a25:818e:: with SMTP id p14mr3302026ybk.425.1608261427017; Thu, 17 Dec 2020 19:17:07 -0800 (PST) Date: Thu, 17 Dec 2020 19:16:58 -0800 Message-Id: <20201218031703.3053753-1-saravanak@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.29.2.684.gfbc64c5ab5-goog Subject: [PATCH v1 0/5] Enable fw_devlink=on by default From: Saravana Kannan To: Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: Saravana Kannan , kernel-team@android.com, linux-kernel@vger.kernel.org, Jisheng Zhang , Kevin Hilman , John Stultz , Nicolas Saenz Julienne , Marc Zyngier Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As discussed in LPC 2020, cyclic dependencies in firmware that couldn't be broken using logic was one of the last remaining reasons fw_devlink=on couldn't be set by default. This series changes fw_devlink so that when a cyclic dependency is found in firmware, the links between those devices fallback to permissive mode behavior. This way, the rest of the system still benefits from fw_devlink, but the ambiguous cases fallback to permissive mode. Setting fw_devlink=on by default brings a bunch of benefits (currently, only for systems with device tree firmware): * Significantly cuts down deferred probes. * Device probe is effectively attempted in graph order. * Makes it much easier to load drivers as modules without having to worry about functional dependencies between modules (depmod is still needed for symbol dependencies). Greg/Rafael, Can we get this pulled into 5.11-rc1 or -rc2 soon please? I expect to see some issues due to device drivers that aren't following best practices (they don't expose the device to driver core). Want to identify those early on and try to have them fixed before 5.11 release. See [1] for an example of such a case. If we do end up have to revert anything, it'll just be Patch 5/5 (a one liner). Marc, You had hit issues with fw_devlink=on before on some of your systems. Want to give this a shot? Jisheng, Want to fix up one of those gpio drivers you were having problems with? Thanks, Saravana [1] - https://lore.kernel.org/lkml/CAGETcx9PiX==mLxB9PO8Myyk6u2vhPVwTMsA5NkD-ywH5xhusw@mail.gmail.com/ Cc: Jisheng Zhang Cc: Kevin Hilman Cc: John Stultz Cc: Nicolas Saenz Julienne Cc: Marc Zyngier Saravana Kannan (5): driver core: Add debug logs for device link related probe deferrals driver core: Add device link support for INFERRED flag driver core: Have fw_devlink use DL_FLAG_INFERRED driver core: Handle cycles in device links created by fw_devlink driver core: Set fw_devlink=on by default drivers/base/core.c | 101 +++++++++++++++++++++++++++++++++++------ include/linux/device.h | 2 + 2 files changed, 90 insertions(+), 13 deletions(-) -- 2.29.2.684.gfbc64c5ab5-goog