Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3763633rwb; Tue, 16 Aug 2022 08:23:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Fh9ZldvVmeAhElYQyeSZRtYenr9k+rQiXAeu4hEkp0SqRuI3HBB1xB/Yisn3HYQzCAOA0 X-Received: by 2002:a17:906:8a53:b0:730:b81c:138 with SMTP id gx19-20020a1709068a5300b00730b81c0138mr13686655ejc.114.1660663418810; Tue, 16 Aug 2022 08:23:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1660663418; cv=pass; d=google.com; s=arc-20160816; b=Az45LmTaVYoIz0wq0qYV9ts7Q7xia08V+HbW1XBdugB9e+jVaBOt/jPFAj6y2yXU54 QoQiZC5jHYdTzqsZsRjjyANorRPNi/Bn39dbUIyK1r61QGh6er8TA2Mohb3KH1ZtQtJp JXUD6rui02GQzZB4mKPnmMDJ0FmgaUqFz0jFhBs6G/09DynrLY2eSAtuOtTL4zluhIBA bH9+XX8umjC3zkfxIEyyMoQkGvqDTdAZ7lRt3eUAwzVAu6TUesGIAWmdGtW7lXS+6JHY 5gmAxPrRgGd2Dm+CkVFIAqZ09IvWeF+YTgkXTFBhiPt9OMbN+Mqw19t8beVGffdBdgS8 YsoQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=fXY0gozIbvPFL27WYqJUQOvc6i+Rbm3I/iaIB5C8whk=; b=UFR0BLwv8HzX+ck0BIEd7B1VMq5ngP0msIp/TbErFAahjkMwh/w6tI1CWbQqqyyt7k lowFwe52OWrvvsAWFkVMTdONohrZ2JnaMvCdx/eOI+u5qdJL39FNDxx47NIYX/5Ly1hQ EckUWveNJ3RDx8z5LYUjgqq/N6Kk3OLzgiIv3g4gdHa+PMoOt9IF/k6rxqCKvPtx4X0q Bp/A+hj2mZdWlXBE3p1WakD3UAe6SRtzhBhWMu9X/xYT7a8r0zXKCgJhR6VvvvEOAtOM 5wU5gZg7NGaZ6Og0yfpIb/JV43AF7f4ifmGJdDCaa9QCDgpYdZguNamwDn5hl4IYB4lP ivZw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=lsBmqxid; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jp10-20020a170906f74a00b00733d7baedd8si8876161ejb.179.2022.08.16.08.23.10; Tue, 16 Aug 2022 08:23:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=lsBmqxid; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235952AbiHPOfc (ORCPT + 99 others); Tue, 16 Aug 2022 10:35:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234214AbiHPOfZ (ORCPT ); Tue, 16 Aug 2022 10:35:25 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2050.outbound.protection.outlook.com [40.107.243.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7821A6CF65; Tue, 16 Aug 2022 07:35:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ds9vtXKl6pDzoLL6UlJHFwgzmb3wo9Z6aB9PU5Idd2J0P9KafudZiKMBupiSi0m4ONvfIcKi37kBoi2OZaMxs09m72n1Jk39aEYMKuFiXqM5yVC2XaOBM2kA6tVjdIFPQ/ZwGKDxMD+DqQtm8yE8yQ9rGMEi9TckSQEOAtxtrT5eBcZKh6JCErK7clOPqYdCIYLNUJibZygMZTaHPZ9uPH4GhetN6ml++P2eSiPfviH+29AlDWTQZEqLaDX1+jXgTXlFiwaGmtnII97HOIZByAqWQJ2WzL6Xm3Yjr7hq5GDkwbrwxMcpIx+dKM4kH8XdXQflBgZm5j4hzbLqToXmuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fXY0gozIbvPFL27WYqJUQOvc6i+Rbm3I/iaIB5C8whk=; b=P6NKJ73sy8/7Znd6qAmRao9amKi24b3qsCY9bNj5EKi9D/HybNnBwMpio3hB5/F+qSbrg3tkE2pgqSmGAqMMI6G4b2vJK/y8vn7uzifQMJB6o21rUWDsxgOBA0khhjhqfdAmaGiAm8jiCQVDYKuTbVncTqrmHqseVCQ40phdcWJkMuuDOr/O9ofog3oJPp3F58uTuBDK15gLFGcuA6YPgjiqTSVLINWENpMFuRI2c6q9htKFQ5NKYxzE9tgy5bObLcDKBQ7wW+roUbpLGSf8aSAQRxxuKdVXbqLGDAbu6Q2kp5KgfgvjQkomJLogXsOiTPoBP0kVmtz3/BEWse1w9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fXY0gozIbvPFL27WYqJUQOvc6i+Rbm3I/iaIB5C8whk=; b=lsBmqxid6Qbm5LXeONBKpNIW2LT/B1mgS0WRj2iOMl/GTvyabPpvDoi+pYeeSJzjfT8WBbr+JlKEQToej8i61vYnLcpCYsrY269u3M3rg0Z3VhXs47vu9SA48yp0V8+YPpbv7OA8Bc0DQY9SYzqhOK5UPhHbbOQZHTbbTpqbEBxfh1lutbdlTQSW8OUQ/gyoye0IKszmEf8SULHIVy/FzTo9zc4MhLGFRZE9kNSbgV5VO9eCPt/kKLjMGJj8Y6QpmXfdQJz/jz33/BhwWAchYQKuAqDGnzx3XB/Lh9rXM/AKigGdWwXmeJiv4u1NaawLHLebf8rH++txTqk39Dsong== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BN8PR12MB2900.namprd12.prod.outlook.com (2603:10b6:408:69::18) by BYAPR12MB3093.namprd12.prod.outlook.com (2603:10b6:a03:dc::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.11; Tue, 16 Aug 2022 14:35:21 +0000 Received: from BN8PR12MB2900.namprd12.prod.outlook.com ([fe80::b150:321c:21e4:40c9]) by BN8PR12MB2900.namprd12.prod.outlook.com ([fe80::b150:321c:21e4:40c9%7]) with mapi id 15.20.5525.011; Tue, 16 Aug 2022 14:35:20 +0000 Message-ID: <5d9f537b-a7a3-b8ae-8779-9ffc15fd11bb@nvidia.com> Date: Tue, 16 Aug 2022 20:05:08 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH V1] PCI: designware-ep: Fix DBI access before core init Content-Language: en-US To: Lorenzo Pieralisi , Manivannan Sadhasivam Cc: Rob Herring , Bjorn Helgaas , Jingoo Han , Gustavo Pimentel , Krzysztof Wilczynski , Bjorn Helgaas , PCI , "linux-kernel@vger.kernel.org" , Krishna Thota , Manikanta Maddireddy , sagar.tv@gmail.com, Xiaowei Bao , Hou Zhiqiang References: <051a3baf-b4dd-7764-2e61-03584cefb4d3@nvidia.com> <20220729224404.GA478920@bhelgaas> <20220730145025.GA4005@thinkpad> <20220802072426.GA2494@thinkpad> <20220802140738.GA115652@thinkpad> From: Vidya Sagar In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MA1PR01CA0180.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:d::18) To BN8PR12MB2900.namprd12.prod.outlook.com (2603:10b6:408:69::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2c34c6ff-cb57-4402-f12b-08da7f948bc8 X-MS-TrafficTypeDiagnostic: BYAPR12MB3093:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?utf-8?B?b3BmK2JITjVxN1FoN2x2RGVwdHBFT2trTmVmdXVlKzB3VnE2TFNGTHQrUFFi?= =?utf-8?B?YTYzTW8zVDFuU0lpUzVWQ0VlVWxBR2JSdFJJMHVDMlgwd0dtcmRoN3BobTNG?= =?utf-8?B?MWUzeDBidDl6a09PTExJOUJkUFliWFVvckJrZTZ2ZGlnK2lkMDk1eU9VK0FU?= =?utf-8?B?WE9UVmVLQThjNlAxZW9XYlg5RGk5NnBodGd0aG42UEdJUENqOGhSOHlLbzJM?= =?utf-8?B?cFFDMVVRd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?B?RFdLYzFEYlpyc2Q0c1QraDNFWHUwMkQ5V3VRM2Iyb0hDakpaL2p1YkZzL1Zi?= =?utf-8?B?QlJDTGl2VmFJS0xJWTI2bFJCRERyRkVyY1B0NEN0REZ1TE9zdzR3UTN4TWFJ?= =?utf-8?B?RTl5aVpnTUhvSE5aR3lCN1JyRUtja1AvM041VENHVnlhTU9Kdz09?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB2900.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(136003)(376002)(396003)(346002)(39860400002)(366004)(66946007)(316002)(31696002)(66556008)(8676002)(83380400001)(53546011)(41300700001)(6666004)(4326008)(2906002)(110136005)(36756003)(54906003)(186003)(31686004)(2616005)(38100700002)(26005)(66476007)(6512007)(6486002)(6506007)(86362001)(8936002)(478600001)(7416002)(5660300002)(966005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ei9TbFdvdXUxVjhlNGlNWGQ2MWgxMWsxMUlyci9xNVNqTmJ5b2tXdGRPY3ho?= =?utf-8?B?OCtWY3NaN1VqRHZ1WTd5b3R6ZTFZbnhMY2VHUkkxclZ6U1FSbkJqWFUyczdz?= =?utf-8?B?T1pyV2ZrSFFZa0o1SzA4dGFpOURldE5nVHdzbmdxaklnelRGMlZDaERmdTdM?= =?utf-8?B?Yi9yclBmTFZuWnVlajNlc2J3QzZodjdsYTJlU0FQUzFSK0hnMzJJU2c4NHh6?= =?utf-8?B?SzFVcEtLTi92UzllUFVpSXNFeUcyak96WnZkOVdyNTlMMy94Wm93NWlrQ3Yx?= =?utf-8?B?N1VwVi9pMy92dnRuWGZFS1d3YU1yZUJZNm1EaW1uZ01TdkZOTzYzblAwYlNl?= =?utf-8?B?TmNsRVI3cmVwT3NRYXlxZ0hzS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-Message-Id: 2c34c6ff-cb57-4402-f12b-08da7f948bc8 X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB2900.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2022 14:35:20.8279 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hm0u4Ji+3GGhvxDAYVaHucz+1PcQ7hiob1nUKv1ARPDNggZ0rHs17sdgenK6LUvYAy4GL/Ab62q/6oNMn1k4Og== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3093 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/16/2022 7:45 PM, Lorenzo Pieralisi wrote: > External email: Use caution opening links or attachments > > > On Tue, Aug 02, 2022 at 07:37:38PM +0530, Manivannan Sadhasivam wrote: >> On Tue, Aug 02, 2022 at 12:54:37PM +0530, Manivannan Sadhasivam wrote: >>> On Mon, Aug 01, 2022 at 02:27:14PM -0600, Rob Herring wrote: >>>> On Sat, Jul 30, 2022 at 8:50 AM Manivannan Sadhasivam >>>> wrote: >>>>> >>>>> On Fri, Jul 29, 2022 at 05:44:04PM -0500, Bjorn Helgaas wrote: >>>>>> [+cc Xiaowei (author of 6bfc9c3a2c70), Hou (author of 8bcca2658558)] >>>>>> >>>>>> On Thu, Jul 28, 2022 at 05:56:28PM +0530, Vidya Sagar wrote: >>>>>>> On 7/28/2022 3:44 AM, Bjorn Helgaas wrote: >>>>>>>> On Wed, Jun 22, 2022 at 09:31:33AM +0530, Vidya Sagar wrote: >>>>>>>>> Platforms that cannot support their core initialization without the >>>>>>>>> reference clock from the host, implement the feature 'core_init_notifier' >>>>>>>>> to indicate the DesignWare sub-system about when their core is getting >>>>>>>>> initialized. Any accesses to the core (Ex:- DBI) would result in system >>>>>>>>> hang in such systems (Ex:- tegra194). This patch moves any access to the >>>>>>>>> core to dw_pcie_ep_init_complete() API which is effectively called only >>>>>>>>> after the core initialization. >>>> >>>>>> 6) What's going on with the CORE_INIT and LINK_UP notifiers? >>>>>> dw_pcie_ep_init_notify() is only called by qcom and tegra. >>>>>> dw_pcie_ep_linkup() is only called by dra7xx, qcom, and tegra. >>>>>> As far as I can tell, nobody at all registers to handle those >>>>>> events except a test. I think it's pointless to have that code >>>>>> if nobody uses it. >>>>>> >>>>> >>>>> I have submitted an actual driver that makes use of these notifiers: >>>>> https://lore.kernel.org/lkml/20220502060611.58987-9-manivannan.sadhasivam@linaro.org/ >>>> >>>> Notifiers aren't the best interface in the kernel. I think they are >>>> best used if there's no real linkage between the sender and receiver. >>>> For an EPC and EPF that's a fixed interface, so define a proper >>>> interface. >>>> >>> >>> Fair point! The use of notifiers also suffer from an issue where the notifier >>> chain in EPC is atomic but the EPF calls some of the functions like >>> pci_epc_write_header() could potentially sleep. >>> >>> I'll try to come up with an interface. >>> >> >> I thought about using a new set of callbacks that define the EPC events and >> have the EPF drivers populate them during probe time. Like below, >> >> ``` >> diff --git a/include/linux/pci-epf.h b/include/linux/pci-epf.h >> index e03c57129ed5..45247802d6f7 100644 >> --- a/include/linux/pci-epf.h >> +++ b/include/linux/pci-epf.h >> @@ -74,6 +74,20 @@ struct pci_epf_ops { >> struct config_group *group); >> }; >> >> +/** >> + * struct pci_epf_events - Callbacks for capturing the EPC events >> + * @init_complete: Callback for the EPC initialization complete event >> + * @link_up: Callback for the EPC link up event >> + */ >> +struct pci_epc_events { >> + void (*init_complete)(struct pci_epf *epf); >> + void (*link_up)(struct pci_epf *epf); >> +}; >> + >> /** >> * struct pci_epf_driver - represents the PCI EPF driver >> * @probe: ops to perform when a new EPF device has been bound to the EPF driver >> @@ -172,6 +186,7 @@ struct pci_epf { >> unsigned int is_vf; >> unsigned long vfunction_num_map; >> struct list_head pci_vepf; >> + struct pci_epc_events *events; >> }; >> >> /** >> ``` >> >> When each of the event is received by the EPC driver, it will use the EPC API >> to call the relevant event callback for _each_ EPF. Like below: >> >> ``` >> diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c >> index 6ad9b38b63a9..4b0b30b91403 100644 >> --- a/drivers/pci/endpoint/pci-epc-core.c >> +++ b/drivers/pci/endpoint/pci-epc-core.c >> @@ -724,10 +724,15 @@ EXPORT_SYMBOL_GPL(pci_epc_linkdown); >> */ >> void pci_epc_init_notify(struct pci_epc *epc) >> { >> + struct pci_epf *epf; >> + >> if (!epc || IS_ERR(epc)) >> return; >> >> - blocking_notifier_call_chain(&epc->notifier, CORE_INIT, NULL); >> + list_for_each_entry(epf, &epc->pci_epf, list) { >> + if (epf->events->init_complete) >> + epf->events->init_complete(epf); >> + } >> } >> EXPORT_SYMBOL_GPL(pci_epc_init_notify); >> ``` >> >> Does this look good to you? I can spin up an RFC series, but wanted to check the >> interface design beforehand. > > I am resuming patch reviews, have you posted a follow up ? > > Just to understand where we are with this thread and start reviewing > from there, I will update patchwork accordingly (you should add > a Link: to this thread anyway in the new series). Manivannan posted a new patch set at https://patchwork.kernel.org/project/linux-pci/list/?series=666818 to address concerns with the notifier mechanism. I would be sending a follow-up patch for the current patch soon. Thanks, Vidya Sagar > > Thanks, > Lorenzo > >> Thanks, >> Mani >> >>> Thanks, >>> Mani >>> >>>> Rob >>> >>> -- >>> மணிவண்ணன் சதாசிவம் >> >> -- >> மணிவண்ணன் சதாசிவம்