Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4722267rwl; Tue, 28 Mar 2023 10:22:19 -0700 (PDT) X-Google-Smtp-Source: AKy350avtFyBaUm0HNjIiknfr3bNI5AGY+iLemwaG1pCTsNglfmRMhM0QpIfDsOMaqWGUvodyfOd X-Received: by 2002:a62:3887:0:b0:628:605:7a5c with SMTP id f129-20020a623887000000b0062806057a5cmr15089718pfa.16.1680024138960; Tue, 28 Mar 2023 10:22:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680024138; cv=pass; d=google.com; s=arc-20160816; b=B+CAWY559SL1pyt4bK6Up4Pphcbxy6bBf2sLOpc1nsiXA8LsaQ03QGVGSMU/80cH10 QuG4GRCqiujD3G7Y3aI8aYDy2MzgCfWHhJnxV4cUmHaDMV0uAn2hOGREquGjlu8dpePi EdBD/MijVo/+54Y54nMBWgKQh7ff1m+ZXyiDf2ZpOamjyXNKTBpq0vTvlIbeu8DnKyft 1AWK93bC8bg1dVwskyhVb5fkmTK+i4nZ6EcWjREo4jI+MgwPQ/1dzaN5cDOw2lItIoyP 9z3Vf5HP1yqf5BGDJfon7wD0Jog+5NPyT4Mjnl0tFiQj3PIs1SRaVYx0oN4ls7yIdWrc 2B5Q== 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=I7DZOZ33qAEmUL5Ll0k87h+43qGUqRKo/j4A4Nu1dlw=; b=mJ7vxwaHPhdh4MUXaUdXfUt/kSneVVi5Sc2JB7fwVhyFhT/1wrqeT61vcj4vW83jwU gs/Fjvdm4C89W8AZ6E3Z3Zrl6yK5Y9lhpr0zR9P9bg/M4BwfFl56KnwoD0H3xdjyQytC pm0llZVekR0tSjh6FiRQy3BYChCgGpRt2KDocPV/hAlITm9Fo2RwzwbPwOc3YSG9qKEa V0izWl/7PFMmWMnIbEY9M20UmLq4jznZJxvqp2mkl7Z/WoeBnzc3ii4/yZ+pSsLfx+3v zjDv0/MIg7mJfLV11gpz6jTvJ3wDE6vztpbajbtnkk53uGY98j8DSmtm+LZTdcFhsInO RxUw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="itFV/AGq"; 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 18-20020a630412000000b004fc29da6e55si29179912pge.674.2023.03.28.10.21.50; Tue, 28 Mar 2023 10:22:18 -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="itFV/AGq"; 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 S232464AbjC1RDJ (ORCPT + 99 others); Tue, 28 Mar 2023 13:03:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232296AbjC1RDH (ORCPT ); Tue, 28 Mar 2023 13:03:07 -0400 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on20606.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8d::606]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3071F86A5; Tue, 28 Mar 2023 10:03:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MdyiGoHpkEZ6Qvh446N5I9XC2p1BSWk6y1KORKwJ418pRFujjlLLAbgjmevYd9BI0uoNy/a5EW7ZRBuNusqLmPQLjyOhp90uxZFTXIMyYNScVnHAUQ6H/2wXMZzgXCmWh+AMCRnpSaAW69lJbPRNgUp17MsrbAgS9b50wz/w7PAKUHb2eMCjFwKlx+q1YA5jcuaN+IjuJy9LSpUYMVuztnF+3zPUOwf+sWhQGcqK9ineo5tLJ+e9mURvmF8zormxQq8jUiFZ2Qqj0cJMqEtrs2miqqCFBPnCUy5mw0/O9j8O2RFL3ajwd+krVvPyUlxG9KG2oOPsHqLtqpRfcmVW+Q== 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=I7DZOZ33qAEmUL5Ll0k87h+43qGUqRKo/j4A4Nu1dlw=; b=TBD018XBlaGFy6yBo2Jmp4lID/HkluEYdS58rI1uAIMPqjKTLxPvIsMx5xM7EfVQAfF/ONTacci6mCaAaFwHPlqs7Y4TODdiIb1F4ausa2/RDw45aERCV/hHyWjJyfvJrTg0moOS5Wc7hsH49spT/lgW4c9uvGorQRc7TCvPj53853Z5KQHtiiKj8KNXYjEExhOyCwhYtDkQsYmjZAwpcndTSjWFzsGEN01kqGL0GxE85xi1zhj9L/pl2tfiRlJxYkmIe7ajIE6yMdvzG2UJhSoaARnsck+79r0fDDnQRokR8J2nfx8LD32exx/szkFZozX+6Smd6aOITETA7KoQ3w== 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=I7DZOZ33qAEmUL5Ll0k87h+43qGUqRKo/j4A4Nu1dlw=; b=itFV/AGqvzKLQjUEYymln/thbgL38ejnZ9ETUMHWPAhIap0Rd8WMHj+54b1usZmLRUFEkrq5QoOnKX/vs7+5Oz8Tkz+uJfaCzK09Z9l+X576TwprO55/M0k3Fp5Qq81/S6mZUdyht8t6kxQxlsG361E+KnmBy89z5DRX767a9wyUPQkbvTf7mjTKvC9K+Hh2WEHv4cesIYg0E+WtTTiZ7u0Aqv/m2GCMnZwpZqrPIHJ7uIBYsm1ZjRiCw/gOcNOsGYmHPNmdJYeUtqFMMLB+FCJqDiFPBx6+wjZzlGVr1EwQkOdCezzLH3fxSDWcgWZCezn/2rXzMtvqW865snjPoQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from CO6PR12MB5444.namprd12.prod.outlook.com (2603:10b6:5:35e::8) by MN6PR12MB8490.namprd12.prod.outlook.com (2603:10b6:208:470::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.41; Tue, 28 Mar 2023 17:02:55 +0000 Received: from CO6PR12MB5444.namprd12.prod.outlook.com ([fe80::abe1:c2f2:c4bb:ba78]) by CO6PR12MB5444.namprd12.prod.outlook.com ([fe80::abe1:c2f2:c4bb:ba78%2]) with mapi id 15.20.6222.033; Tue, 28 Mar 2023 17:02:55 +0000 Message-ID: <9baff4c3-31ff-c19c-01fb-f438797da9ea@nvidia.com> Date: Tue, 28 Mar 2023 18:02:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v2] PCI: Assign PCI domain by ida_alloc() Content-Language: en-US To: Rob Herring Cc: =?UTF-8?Q?Pali_Roh=c3=a1r?= , Bjorn Helgaas , Andrew Lunn , =?UTF-8?Q?Marek_Beh=c3=ban?= , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, "linux-tegra@vger.kernel.org" References: <20220702204737.7719-1-pali@kernel.org> <20220714184130.5436-1-pali@kernel.org> <20230320205936.wd6pj3trljsduj5c@pali> <993ca7dc-1d39-6ae9-1033-838d81aeb076@nvidia.com> <3414723d-7d79-809f-e63f-35243d945b50@nvidia.com> From: Jon Hunter In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0390.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::17) To CO6PR12MB5444.namprd12.prod.outlook.com (2603:10b6:5:35e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR12MB5444:EE_|MN6PR12MB8490:EE_ X-MS-Office365-Filtering-Correlation-Id: f4337476-1a51-4d95-0773-08db2fae4645 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cAGQl5oc7Aq1cfKl8znS8/AJ6rR9oLQ9OPbelg+YRNl6snvD7ZZB0BATI46ea5mnRbZJw0KzcgzRLhNDTp4XKoyIw4RW2acCJlhwgt3dquEUWsHnTWJnL3ss+I0u5u1TaGlNu7eBtHhtZghDkmaXtkTI0+qCZqyihRGWC9AVsHtbz5Ij2kCO7z53L/Gb5whdHtY9r1hxaQNBSgEf4RbYnDzY76oDqIMR4Wl0bsOJKSgIjboVEdJClGhaiyqQ/pZa4JJaoGl1PgcMzMTPai5WG92WUqEUIJkU3FCDKozRhQm7Oa3EJRRnDr3ow1NCxB4AGi1aT2hImHelpjhKFCNFGol1u3HnhrBJH8K4GDpyUfCInkuhMwwxRryQM8ybmsWCiYEPUtSH+Mygxha6vwEsOFefR3+nwb44+OtySahxQVQjAkhX7Y/KCCA/pigv3nAJh/HP5nZU8VW28b7LtYDOyRNLebGbpj8WHF+PuXjMQ8pCAVjQ4w8vzgMnQH2t85OIYNwYXsQHB1oXK+DDAEvkjGbBDUIiwO1BHvVIVNK6VRavNM4f/sTwVeSF6suiRliUTYGAvz+jIgFjxsQ8cOF2szNWBIRTJ5fWYfg6FKNyqCN2FF9qWPbIopti8UxSEMZhpEZCc/QTb3hGJL9a/6Vu6g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR12MB5444.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(376002)(396003)(136003)(39860400002)(346002)(451199021)(38100700002)(26005)(53546011)(6666004)(36756003)(55236004)(6512007)(6506007)(186003)(6486002)(86362001)(54906003)(41300700001)(31686004)(2906002)(31696002)(8936002)(316002)(8676002)(5660300002)(66476007)(2616005)(66556008)(478600001)(4326008)(66946007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZVVxam9STWJZYVZReE91NzIvWllibUxlSjdTd0ppZXBNK0NoVGVkM3RrTVho?= =?utf-8?B?ZGtldGxoQkQ5Nko4eG9Tc0RDMEZmYTRpckswWnZKZFRZbWVMYk9ITnFPNkI5?= =?utf-8?B?eHdYZC83Z1JsbWdMRVUvaEh2K1VuZGdrek10R3cvK0c0dmpCZzZld0dsaW5K?= =?utf-8?B?UmFBcFFsUEt4UFBoalBWbDlIbFB3K3JMeXdvSlhRNVVKQzhldjdsT256bGFs?= =?utf-8?B?cVhhYURsdGpobFNRR0F4Y2d6bm1EdzB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TRxY2Vy?= =?utf-8?B?c0ZuTlZ6cGs0c2E1RXpqeE85V1dKcllOUkZhUzBxZUVPbDBNRUdaMDkvcEVu?= =?utf-8?Q?+jOtyeMxPrF3xOqT0mN0qWOBB?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4337476-1a51-4d95-0773-08db2fae4645 X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5444.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Mar 2023 17:02:55.6417 (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: i3f1aSUStKkbcg3KHN2Afe4B6jceJdGWNEDkT2rYwEONKzjcDRxza0H4TkUhot8umvFNO+Qurg89uTBDcrg8CQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8490 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, SPF_HELO_PASS,SPF_NONE autolearn=unavailable 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 28/03/2023 14:31, Rob Herring wrote: ... > Does this fix it?: > > diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c > index 0145aef1b930..22d39e12b236 100644 > --- a/drivers/pci/remove.c > +++ b/drivers/pci/remove.c > @@ -157,8 +157,6 @@ void pci_remove_root_bus(struct pci_bus *bus) > list_for_each_entry_safe(child, tmp, > &bus->devices, bus_list) > pci_remove_bus_device(child); > - pci_remove_bus(bus); > - host_bridge->bus = NULL; > > #ifdef CONFIG_PCI_DOMAINS_GENERIC > /* Release domain_nr if it was dynamically allocated */ > @@ -166,6 +164,9 @@ void pci_remove_root_bus(struct pci_bus *bus) > pci_bus_release_domain_nr(bus, host_bridge->dev.parent); > #endif > > + pci_remove_bus(bus); > + host_bridge->bus = NULL; > + > /* remove the host bridge */ > device_del(&host_bridge->dev); > } Yes that does fix it! I had been meaning to get back to this this week to figure out what is going on and so thanks for figuring this out. If you plan to send a fix for this, please add my ... Tested-by: Jon Hunter Cheers! Jon -- nvpublic