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 X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=no 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 B1FCBC4708F for ; Wed, 2 Jun 2021 22:11:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90FC4613E4 for ; Wed, 2 Jun 2021 22:11:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229576AbhFBWMn (ORCPT ); Wed, 2 Jun 2021 18:12:43 -0400 Received: from mail-ua1-f42.google.com ([209.85.222.42]:37560 "EHLO mail-ua1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbhFBWMm (ORCPT ); Wed, 2 Jun 2021 18:12:42 -0400 Received: by mail-ua1-f42.google.com with SMTP id w28so2191407uae.4 for ; Wed, 02 Jun 2021 15:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3tM4Et0IRPINCmI/KWk7/ASNqZUXJXeskhbuRGxD6XM=; b=aFz3EhG2Uvmn395vAjHexGoj+aWH9YyAhfycpUpjLvxPKSqzAj9CfedQjlS1otVpna wCoTct78JKET0ugSEhAr3JZbBebPZwPKQ3ORUDgVJZ6H2p5kCshGSSs/lOmARnZRqLvv HtTWC4dv87MTOjCx9ActAcZZCyP8P59/xaUNK20O7scRusvPl7BEvpJEI/FpWySu0VL0 Di49ZhuMBUWEykWTwWeoB76MpWIM9F6iKMDT88CvR3UDKi5mFb45v5yIBBfR2U6P5Yfq JfdPPqzbph72wmOcmYDV34h7eXbA0AdudtCEvdanFcfoTTPOyKJ5CG3Obqq2hc6GsbLM F5/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3tM4Et0IRPINCmI/KWk7/ASNqZUXJXeskhbuRGxD6XM=; b=npL4cs9FWO8AmMP7+fBS6pdmTcWttejmP7EfjlefVkDnDKQXWUiawpK6qLUawtf95w PNSs+6JW6jVKHjpA5E2Bw0mIEHSB+ipoWScBbulJpxf7AaB4HQgeC3Pjml/Bs1Ru0snm a9QvNzQAhM22AJfvz1AoBjzAeyt3XmJKOzTh1K9RtPx8TbKZMSTSQcdmgQ5LMj97kO/J VvBz7xLiAsnUJ3eT4FUUkwm65CBnnVsiKaAYVj0EqDUCN4qpXCW9Ixb2bgNdS+BLeeX8 nDSz6X/jjVqex+827tZl6K9AU8+OUgejqcrnRsbEH/OJsvLfGTKPoWypnIdXnIujWOBQ yzWA== X-Gm-Message-State: AOAM533X60QgrKnAyt3BpU9YOm8U6UJyzgqXmj8odBkaAwymTwqFZwuw 1ApT47YoJZuUlQz6Rn9ImxzECjq4P3ZXtok5lsz7 X-Google-Smtp-Source: ABdhPJzJeXBJXVmkiHuV1cIzWTR5JVdNMIJMRR/wxnSZrPhOD++Bki4qb0B3BD04w0PrfpV25LcB/ttHnjjhCqs5tT8= X-Received: by 2002:a1f:9b0c:: with SMTP id d12mr13114242vke.13.1622671787024; Wed, 02 Jun 2021 15:09:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bjorn Helgaas Date: Wed, 2 Jun 2021 17:09:35 -0500 Message-ID: Subject: Re: Arm64 double PCI ECAM reservations in acpi_resource_consumer() To: Qian Cai Cc: Catalin Marinas , Will Deacon , linux-arm , Lorenzo Pieralisi , Linux PCI Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org [+cc linux-pci] On Wed, Jun 2, 2021 at 4:49 PM Qian Cai wrote: > > Bjorn, I noticed PCI ECAM could be reserved twice on arm64. Firs time through, > > [ 19.087790][ T1] acpi_ns_walk_namespace+0xc0/0x390 > [ 19.092927][ T1] acpi_get_devices+0x160/0x1a4 > [ 19.097629][ T1] acpi_resource_consumer+0x8c/0xc0 > [ 19.102680][ T1] pci_acpi_scan_root+0x158/0x4c8 > [ 19.107555][ T1] acpi_pci_root_add+0x450/0x8e8 > [ 19.112345][ T1] acpi_bus_attach+0x300/0x7d0 > [ 19.116960][ T1] acpi_bus_attach+0x178/0x7d0 > [ 19.121576][ T1] acpi_bus_attach+0x178/0x7d0 > [ 19.126190][ T1] acpi_bus_scan+0xa8/0x170 > [ 19.130545][ T1] acpi_scan_init+0x220/0x558 > [ 19.135074][ T1] acpi_init+0x1f4/0x270 > > where pci_acpi_setup_ecam_mapping() confirmed all reservations are succeed. Then, > > [ 19.880588][ T1] acpi_ns_walk_namespace+0xc0/0x390 > [ 19.885725][ T1] acpi_get_devices+0x160/0x1a4 > [ 19.890426][ T1] pnpacpi_init+0xa0/0x10 > > As the results, those messages are showed up during the boot in pnpacpi_init(). > > [ 17.763968] system 00:00: [mem 0x10000000000-0x1000fffffff window] could not be reserved > [ 17.772900] system 00:00: [mem 0x7800000000-0x780fffffff window] could not be reserved > [ 17.781627] system 00:00: [mem 0x7000000000-0x700fffffff window] could not be reserved > [ 17.790350] system 00:00: [mem 0x6000000000-0x600fffffff window] could not be reserved > [ 17.799073] system 00:00: [mem 0x5800000000-0x580fffffff window] could not be reserved > [ 17.808155] system 00:00: [mem 0x1000000000-0x100fffffff window] could not be reserved > [ 17.816862] system 00:00: [mem 0x600000000-0x60fffffff window] could not be reserved > [ 17.825417] system 00:00: [mem 0x400000000-0x40fffffff window] could not be reserved > > Looking through the x86's version of pci_acpi_scan_root(), it won't call acpi_resource_consumer(), so I suppose this bug is only affecting arm64? This might be related to https://lore.kernel.org/linux-acpi/20210510234020.1330087-1-luzmaximilian@gmail.com/T/#u Can you try applying that patch to see if it is related? Bjorn 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 X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 D70D3C4708F for ; Wed, 2 Jun 2021 22:13:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8A7C36121D for ; Wed, 2 Jun 2021 22:13:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A7C36121D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i/4sIhGJLGz3efffZiyJEhkAEWpD8mEEd62M1PIi/3s=; b=zysoEkOIb7qXsV KE9SS5CMBod7BxTHhBjvPIYTramubiw37z7diCw6BlXEyv4oJ3R5kduXLccKC40/wMJQHgmNcWcWe 1sIHAGo+/IPCaYvdIwb3QsqJ3TIRoS8ZtbjqGXh488hQLJi3fl25nEOs3uoClEhSNbtc1IlCUGT2P tubcfQ1DrJcST2E/pNGyJ+XFzs9DB0kWZWY1EZDO7G83gaUoWvHncWbWCe4m8bXuQKbceRseb1uP9 VTBFdOcCIJ7TL9Xhl3LMuaaISnvvqbfIeAt94o21ZoyeCNKUxm5xc3kLrJD2i+TA9CLLBWIx01pia wr3uKUxylwjgmNfPwucg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1loZ5e-006LH8-0q; Wed, 02 Jun 2021 22:11:54 +0000 Received: from mail-ua1-x92b.google.com ([2607:f8b0:4864:20::92b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1loZ5a-006Kws-KG for linux-arm-kernel@lists.infradead.org; Wed, 02 Jun 2021 22:11:52 +0000 Received: by mail-ua1-x92b.google.com with SMTP id l12so2223253uai.0 for ; Wed, 02 Jun 2021 15:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3tM4Et0IRPINCmI/KWk7/ASNqZUXJXeskhbuRGxD6XM=; b=aFz3EhG2Uvmn395vAjHexGoj+aWH9YyAhfycpUpjLvxPKSqzAj9CfedQjlS1otVpna wCoTct78JKET0ugSEhAr3JZbBebPZwPKQ3ORUDgVJZ6H2p5kCshGSSs/lOmARnZRqLvv HtTWC4dv87MTOjCx9ActAcZZCyP8P59/xaUNK20O7scRusvPl7BEvpJEI/FpWySu0VL0 Di49ZhuMBUWEykWTwWeoB76MpWIM9F6iKMDT88CvR3UDKi5mFb45v5yIBBfR2U6P5Yfq JfdPPqzbph72wmOcmYDV34h7eXbA0AdudtCEvdanFcfoTTPOyKJ5CG3Obqq2hc6GsbLM F5/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3tM4Et0IRPINCmI/KWk7/ASNqZUXJXeskhbuRGxD6XM=; b=XAmFTQh5m8+lbu6Ly4tC1vPEm6M1Id7Qr1GWLN+yl2+1aiYCxAHanqYU6ItMq5f2oq M6olcsQ9SRsBC7sOKaM0v3PBQ7uzFkSjmI9FYQqK0bxcqkvOJNv6Q1abpBL+kdDlqQZw gw4wRWEsLFGloCpu5h8I1Ur2LEs95IZcU6gU4DemR0Nx1Y4ji83K8a7+AAXC9huIJrO9 q/c/4ksqRc+Tbeu5Y8+BPBrTPQSO5rGux/ySU8CAfS7ALzJiWsm0qOb7DbQMY1lGuVkS tCMJG0Vrw88DrPuzkekEPtON8FDsTZYwMkaD3s8Iq83bzxz8DxVeHLneJA3aAKR3OeZr rVKA== X-Gm-Message-State: AOAM531ftN7qZcNWIz2cUx8gofbJZ5xREr2Uaq03LF7uOHpPjt+sPico 7peQrrsifbzmnOSKNTKsgTVKwZY4uq8eLz/Cho1b7fbmY+kN X-Google-Smtp-Source: ABdhPJzJeXBJXVmkiHuV1cIzWTR5JVdNMIJMRR/wxnSZrPhOD++Bki4qb0B3BD04w0PrfpV25LcB/ttHnjjhCqs5tT8= X-Received: by 2002:a1f:9b0c:: with SMTP id d12mr13114242vke.13.1622671787024; Wed, 02 Jun 2021 15:09:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bjorn Helgaas Date: Wed, 2 Jun 2021 17:09:35 -0500 Message-ID: Subject: Re: Arm64 double PCI ECAM reservations in acpi_resource_consumer() To: Qian Cai Cc: Catalin Marinas , Will Deacon , linux-arm , Lorenzo Pieralisi , Linux PCI X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210602_151150_684156_5784B912 X-CRM114-Status: GOOD ( 12.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org [+cc linux-pci] On Wed, Jun 2, 2021 at 4:49 PM Qian Cai wrote: > > Bjorn, I noticed PCI ECAM could be reserved twice on arm64. Firs time through, > > [ 19.087790][ T1] acpi_ns_walk_namespace+0xc0/0x390 > [ 19.092927][ T1] acpi_get_devices+0x160/0x1a4 > [ 19.097629][ T1] acpi_resource_consumer+0x8c/0xc0 > [ 19.102680][ T1] pci_acpi_scan_root+0x158/0x4c8 > [ 19.107555][ T1] acpi_pci_root_add+0x450/0x8e8 > [ 19.112345][ T1] acpi_bus_attach+0x300/0x7d0 > [ 19.116960][ T1] acpi_bus_attach+0x178/0x7d0 > [ 19.121576][ T1] acpi_bus_attach+0x178/0x7d0 > [ 19.126190][ T1] acpi_bus_scan+0xa8/0x170 > [ 19.130545][ T1] acpi_scan_init+0x220/0x558 > [ 19.135074][ T1] acpi_init+0x1f4/0x270 > > where pci_acpi_setup_ecam_mapping() confirmed all reservations are succeed. Then, > > [ 19.880588][ T1] acpi_ns_walk_namespace+0xc0/0x390 > [ 19.885725][ T1] acpi_get_devices+0x160/0x1a4 > [ 19.890426][ T1] pnpacpi_init+0xa0/0x10 > > As the results, those messages are showed up during the boot in pnpacpi_init(). > > [ 17.763968] system 00:00: [mem 0x10000000000-0x1000fffffff window] could not be reserved > [ 17.772900] system 00:00: [mem 0x7800000000-0x780fffffff window] could not be reserved > [ 17.781627] system 00:00: [mem 0x7000000000-0x700fffffff window] could not be reserved > [ 17.790350] system 00:00: [mem 0x6000000000-0x600fffffff window] could not be reserved > [ 17.799073] system 00:00: [mem 0x5800000000-0x580fffffff window] could not be reserved > [ 17.808155] system 00:00: [mem 0x1000000000-0x100fffffff window] could not be reserved > [ 17.816862] system 00:00: [mem 0x600000000-0x60fffffff window] could not be reserved > [ 17.825417] system 00:00: [mem 0x400000000-0x40fffffff window] could not be reserved > > Looking through the x86's version of pci_acpi_scan_root(), it won't call acpi_resource_consumer(), so I suppose this bug is only affecting arm64? This might be related to https://lore.kernel.org/linux-acpi/20210510234020.1330087-1-luzmaximilian@gmail.com/T/#u Can you try applying that patch to see if it is related? Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel