From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CDA5C4332F for ; Tue, 9 Nov 2021 15:24:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4D6E4610E9 for ; Tue, 9 Nov 2021 15:24:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235775AbhKIP0p (ORCPT ); Tue, 9 Nov 2021 10:26:45 -0500 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:19319 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234526AbhKIP0n (ORCPT ); Tue, 9 Nov 2021 10:26:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1636471437; x=1668007437; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=LhDgqmajfz71vOYSGsDh9gMUO7ALBdgAMuleFHkhVRE=; b=TeIK4K0JTNorUsiwPwZwoAGRBmLiCwdqXarvIL6/lsKSeslP7i+DSAm5 FOpobIxpW3HemsPqXFd6M7MefewILap3b5pE8Y30QDoDGN810AjLwO9nR ygfAIzZEDO5j876yfLrrtkX+kXNI2C4Z/+KDv0G2y2Y4wsBI57byusRwT Q=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-02.qualcomm.com with ESMTP; 09 Nov 2021 07:23:57 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2021 07:23:56 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Tue, 9 Nov 2021 07:23:56 -0800 Received: from qian-HP-Z2-SFF-G5-Workstation (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Tue, 9 Nov 2021 07:23:55 -0800 Date: Tue, 9 Nov 2021 10:23:52 -0500 From: Qian Cai To: Andy Shevchenko CC: "Rafael J. Wysocki" , Heikki Krogerus , Greg Kroah-Hartman , Laurentiu Tudor , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Felipe Balbi , , Lorenzo Pieralisi , 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: X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 08, 2021 at 11:43:54PM -0500, Qian Cai wrote: > Then, which functions do you suggest to replace with > fwnode_create_software_node()? In dwc3_host_init(), > > int dwc3_host_init(struct dwc3 *dwc) > { > ... > xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); > ... > ret = platform_device_add(xhci); > > I am wondering if that we could solve the problem by avoiding > "xhci-hcd" string here which would unfortunately clash with > xhci_plat_init() as mentioned before: Okay, I suppose that name has to be "xhci-hcd" to match the dirver name. Otherwise, the below path did not run to create "xhci-hcd" either. I noticed that the regression was discussed a few months ago and leave it as is. https://lore.kernel.org/lkml/e9bc1397-99b7-a57e-4860-80d146848e2c@nxp.com/ Alternatively, we might revert the commit 434b73e61cc6 ("iommu/arm-smmu-v3: Use device properties for pasid-num-bits") started to use device_add_properties() in iort_named_component_init() which probably does not look pretty either. I can't think of any other ways to avoid refactoring at the moment. > > sysfs_create_link > software_node_notify > device_create_managed_software_node > iort_named_component_init > iort_iommu_configure_id > acpi_dma_configure_id > platform_dma_configure > really_probe.part.0 > really_probe > __driver_probe_device > driver_probe_device > __driver_attach > bus_for_each_dev > driver_attach > bus_add_driver > driver_register > __platform_driver_register > xhci_plat_init > do_one_initcall > kernel_init_freeable > kernel_init > ret_from_fork