From patchwork Fri Sep 10 01:14:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saravana Kannan X-Patchwork-Id: 508872 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-26.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC851C433FE for ; Fri, 10 Sep 2021 01:22:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A039C610C9 for ; Fri, 10 Sep 2021 01:22:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238883AbhIJBXL (ORCPT ); Thu, 9 Sep 2021 21:23:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233536AbhIJBXH (ORCPT ); Thu, 9 Sep 2021 21:23:07 -0400 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 E660EC0613BB for ; Thu, 9 Sep 2021 18:14:57 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id f64-20020a2538430000b0290593bfc4b046so316248yba.9 for ; Thu, 09 Sep 2021 18:14:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=85stIuvqC7qXvT5OV0bxpCSRV3islXlTG8FuUpmB6wU=; b=nPp1DZY5v8HPhBDJ8jyynRo0qkVY4WIpV/P2Z4KrAH+CXnr+lJO+uYbYGSMnNsuFH0 1hCEfbFVCkaBdzRO/ZMU1H+jW59xthzaQ2XaSIT+pbM/nhPjkSiQorLtd+RxgzMYK1P2 Ch1Dn6ZXH1PsY7OGl293RP8ACT3dlLcEOpziT0xI3N1+R8m8Ghzm722s1qxmPgZEOvjn iqFc3tBiKqUUw6+lEm6ZHHyUVl6Ntpp1ss1hrYBsldFVV+JhACJuz0zkNtqps5QsUVuz XIG9qvbJk6nar/cnBNhzNnFqgHtz18SdPSBjLZ/eYu6pdyEOrFPCja/0m4ZNsu2BKRNg FUWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=85stIuvqC7qXvT5OV0bxpCSRV3islXlTG8FuUpmB6wU=; b=N2IlNxt6wc9ca6osZ7VSx2SgxKHUwRLiIf9f8VggqRVMp7dZkE9Pv2eSFL9fYZwCpW +q7S9egcytTWm/0VEMZXs87Sdbnf7ASB7CFT3DQ66X+oLDsfMNuo/VxX8OdjybI11sTP Jc+98hKgf18ECgf7DTL16zPkB1+FAEWtnh4/WO/Mq+VtbZ94dulFBOZVaS78ix04vRS5 jH1LsB53p85EzUhM+YnOaQEdQmR1ak20EI4wo0DrtFlMp7Qvn+BaifJlBadYoxMoUznB 37vq9v5rjlezS1q2IviQCbIuy0WLHEVBwL4AFARHwsqWRjnUSLfmKYhlxPPSiDdZYUMg MeHA== X-Gm-Message-State: AOAM532DNjRh+VkIpYk8Cl/uvnUuwvVUsL3H6QPnP4r/1Qcgo+GKtoG0 5jozV/VMmaF/3LQ9CCmoPNK01K9gvbaFjC8= X-Google-Smtp-Source: ABdhPJzz94EF6js4TQNESTU8ocFK+QyflQuccilOIE6oq/6PZh3SN0Dg+hA+CzGTYuc99t12ZwOKjZ7ruFbm42Q= X-Received: from saravanak.san.corp.google.com ([2620:15c:2d:3:dada:6772:417c:a317]) (user=saravanak job=sendgmr) by 2002:a05:6902:102f:: with SMTP id x15mr7805359ybt.81.1631236497165; Thu, 09 Sep 2021 18:14:57 -0700 (PDT) Date: Thu, 9 Sep 2021 18:14:45 -0700 Message-Id: <20210910011446.3208894-1-saravanak@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog Subject: [PATCH] of: property: Disable fw_devlink DT support for X86 From: Saravana Kannan To: Rob Herring , Frank Rowand , Greg Kroah-Hartman , Saravana Kannan Cc: Andre Muller , kernel-team@android.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Andre reported fw_devlink=on breaking OLPC XO-1.5 [1]. OLPC XO-1.5 is an X86 system that uses a mix of ACPI and OF to populate devices. The root cause seems to be ISA devices not setting their fwnode field. But trying to figure out how to fix that doesn't seem worth the trouble because the OLPC devicetree is very sparse/limited and fw_devlink only adds the links causing this issue. Considering that there aren't many users of OF in an X86 system, simply fw_devlink DT support for X86. [1] - https://lore.kernel.org/lkml/3c1f2473-92ad-bfc4-258e-a5a08ad73dd0@web.de/ Fixes: ea718c699055 ("Revert "Revert "driver core: Set fw_devlink=on by default""") Signed-off-by: Saravana Kannan Cc: Andre Muller Acked-by: Greg Kroah-Hartman --- drivers/of/property.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/property.c b/drivers/of/property.c index 0c0dc2e369c0..3fd74bb34819 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1444,6 +1444,9 @@ static int of_fwnode_add_links(struct fwnode_handle *fwnode) struct property *p; struct device_node *con_np = to_of_node(fwnode); + if (IS_ENABLED(CONFIG_X86)) + return 0; + if (!con_np) return -EINVAL;