Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp461280pxb; Mon, 8 Nov 2021 16:41:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJwU8xXUSrl2vdY9qFV3DN57mQFg0V5bT5KnMasb+zqHdHNLA6n9WDAaw0xYbru7Xasovv1X X-Received: by 2002:a05:6402:11c8:: with SMTP id j8mr4419682edw.138.1636418460342; Mon, 08 Nov 2021 16:41:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636418460; cv=none; d=google.com; s=arc-20160816; b=PDF2QTT30dmifuY7HwCcLAncHYthWb/0J/dv6pOG1WpctfQlwWbxe7PhYCOd6/2ILm br4O7gVoFQPKWYyZTquUcEPCylmOmHIYqsbMH6LnwJwcx6v5yY7nCgx/+jdtCx9u5022 4jYAGSLVODf7jSX81mnT6LXYy+ObsvxsnqB2SnBj9HyXeft5CBaX0TN+YZNQH23dL+lt i2+79zOHcUgEmq/f/e1tZrOlqNIPN+PRjOXWBbRejGOnSUIuxlpASeC/YqlHb8Ta4bHg +2BfaS2rwNP/wG5XOqVLbwmbQ3/VdRirBYS0LmCC4VC8VQO7/GwTgyq7fzXd9pMKarH7 NxVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=4f6NsSAzoXrRNEnjgLNw05vWALB1529bJNL4TSZbd/s=; b=T7/moWRi4bVmw6t+S9+vMGuNZ4DcvR6wVJwGhMG45CpvHzgLqL8FLk96zqF7CWqrXn aej0r3xSqITtjvjvvEuFKgv/Tejsw6fOuHh3FcRi365/+JoxJaWmsp1s8se1evj/QRIn fq1LGeu7HLldMoPoHbNRFsAriHP+uii2INpiZaJGB3/xjB+DgeDf0eLf1s3vyyC/R4FJ mB/nM71FODz5y1S3FRUE6c+w8lBJAz7KMkw4dXk4uRxMUT5nat1QDkzmrhEHKZcnWR5I VCUzaUuqEcKEu+1PLaLu6yjTzBj9Iz16tUukgxl3ZTI+FSgfmWkB/h3Mt6FcI9S4CnsV gxyA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e19si33787407ejs.586.2021.11.08.16.40.35; Mon, 08 Nov 2021 16:41:00 -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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234855AbhKHSJa (ORCPT + 99 others); Mon, 8 Nov 2021 13:09:30 -0500 Received: from mga09.intel.com ([134.134.136.24]:23229 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234728AbhKHSJ3 (ORCPT ); Mon, 8 Nov 2021 13:09:29 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10162"; a="232136200" X-IronPort-AV: E=Sophos;i="5.87,218,1631602800"; d="scan'208";a="232136200" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2021 10:06:41 -0800 X-IronPort-AV: E=Sophos;i="5.87,218,1631602800"; d="scan'208";a="451630202" Received: from smile.fi.intel.com ([10.237.72.184]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2021 10:06:39 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1mk92I-004oXR-SY; Mon, 08 Nov 2021 20:06:26 +0200 Date: Mon, 8 Nov 2021 20:06:26 +0200 From: Andy Shevchenko To: Qian Cai Cc: "Rafael J. Wysocki" , Heikki Krogerus , Greg Kroah-Hartman , Laurentiu Tudor , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH] software node: Skip duplicated software_node sysfs Message-ID: References: <20211101200346.16466-1-quic_qiancai@quicinc.com> <52df4a97-1132-d594-0180-132d0ca714d5@quicinc.com> <1269258d-db4c-3922-776b-f11e6a1e338e@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1269258d-db4c-3922-776b-f11e6a1e338e@quicinc.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 08, 2021 at 11:07:53AM -0500, Qian Cai wrote: > On 11/5/21 3:39 PM, Andy Shevchenko wrote: > >> Andy, thanks for the pointers so far. I was able to trace > >> set_primary_fwnode() and set_secondary_fwnode(). > > > > Can you share the trace you have got? ... > Then, here are the relevant outputs indicating that > "808622B7:01" and "xhci-hcd.3.auto" have the same > primary but different secondaries. So, it confirms my theory if I'm not mistaken. Btw, what you can do in this case is to switch to use fwnode_create_software node and switch them in drd.c. It will be much much easier to achieve then full kernel refactoring. > [ 11.233280] KK set_secondary_fwnode dev name = 808622B7:01, fwnode = ffff000838618840 > [ 11.241846] KK parent = platform > [ 11.245790] KK primary = ffff0008064b9010 > [ 11.259838] KK set_primary_fwnode dev name = (null), fwnode = ffff0008064b9010 > [ 11.267795] KK parent = 808622B7:01 > [ 11.272000] KK fwnode->dev = 808622B7:01 > [ 11.276636] KK secondary = ffff000838618840 > [ 11.680489] KK set_secondary_fwnode dev name = xhci-hcd.3.auto, fwnode = ffff000838325040 > [ 11.689406] KK parent = 808622B7:01 > [ 11.693916] KK primary = ffff0008064b9010 > [ 11.698763] sysfs: cannot create duplicate filename '/devices/platform/808622B7:01/xhci-hcd.3.auto/software_node' -- With Best Regards, Andy Shevchenko