Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp3275014rdb; Thu, 7 Sep 2023 09:37:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH09HLbxsrjX72hW+o3VYqZy4EmecSKBAXl1M7yqlcVAbVLhof0XSNDsc+nN4Jm5fQ7ov6x X-Received: by 2002:a05:6a00:b43:b0:68a:553a:c0da with SMTP id p3-20020a056a000b4300b0068a553ac0damr20595521pfo.24.1694104647361; Thu, 07 Sep 2023 09:37:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694104647; cv=none; d=google.com; s=arc-20160816; b=DuEmhY75HIBVT7jUwMyyWfn2hHIP22Zulxq+ByISjMsWVbwEca9YbJTpYBtDdkvrDa 5g7a0JC/LlYFLe+jh+KT4EU7g9LPBqXyy2TzNBZgqjHy4AYbGdUbgk20aD7cBkJ2nuPs Xpakbc97LrZp2REc3jlDJCw3F2PamF4LeFG3OWh9quOTM7dH7amUh3qxbNfa/N7mYQYa pK35dhQaqskIR9kjUHyoqxGvmZKnnA2DkMNRkCDCkGUw3KPLlKKIsqY3J3G7PSOOvq5q PkboRPb34FCC3yFroeC0Kra/ULLWMpLgMIHjnq02Tf+lAtUNzQicx2GBLVc3JkaQjaX5 4CJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=NzsOIoQ/LuuCQ8bPG8DKYh0cfs1pb8f5tLTrzy71ufU=; fh=f9ro5dK4VBHMf0sxibMAo+V2+MLZBWdgUEsKTrBEkgg=; b=VRxOZpGPn9Ml0RFA+4CYbKgRrRRyZnEkd9KXUS1WsM28OEkcLb2hTIoD4FT4ExV9Fl z6aaNUvq8OLf7052MsdYga3nktCwDj+thPhTeB6YM0/0qrA2NOrA92NAk/dG3pRe7/Aj Crapsl7D5vqwKn7UNfrfqwQWr0jOyMK0Io8O8Bi1bcGkuK8/yptvyFXRHR29iOoVHoyv G75Weh2i0tOwTRjHUuTCkZcm2FnWrxHX0vciY8VdtS5ma6nPbmyP/LGmj/v5I822wN3/ C6X+BHNwXhCVOjIqQlktZoadDy7MQszdYjCYi2WAo4jlKC2RGK/KdCkKUMOkEIzXttv3 yYvg== ARC-Authentication-Results: i=1; mx.google.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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q5-20020a056a00150500b0068a5651b526si503671pfu.122.2023.09.07.09.37.13; Thu, 07 Sep 2023 09:37:27 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236545AbjIGPXW (ORCPT + 99 others); Thu, 7 Sep 2023 11:23:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232800AbjIGPWY (ORCPT ); Thu, 7 Sep 2023 11:22:24 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B68561BF6 for ; Thu, 7 Sep 2023 08:21:53 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B0349D75; Thu, 7 Sep 2023 05:22:52 -0700 (PDT) Received: from [10.1.196.40] (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7F2AD3F7B4; Thu, 7 Sep 2023 05:22:13 -0700 (PDT) Message-ID: <15d1dd8f-a002-8b98-55ba-632427e621cf@arm.com> Date: Thu, 7 Sep 2023 13:22:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: snd-cmipci oops during probe on arm64 (current mainline, pre-6.6-rc1) Content-Language: en-GB To: Antonio Terceiro Cc: Takashi Iwai , Jaroslav Kysela , Takashi Iwai , Catalin Marinas , Will Deacon , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <877cp3esse.wl-tiwai@suse.de> <4f335dd2-8043-c60e-cf84-c2b01c4fee12@arm.com> <43632d9d-722c-b14f-336a-eac402ef9362@arm.com> From: Robin Murphy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 07/09/2023 1:41 am, Antonio Terceiro wrote: > On Wed, Sep 06, 2023 at 08:52:40PM +0100, Robin Murphy wrote: >> On 2023-09-06 19:36, Antonio Terceiro wrote: >>> I'm pretty sure I saw reports of people using PCI GPUs on this machine, >>> but I would need to confirm. >> >> GPUs and any other PCIe devices will be fine, since they will use memory >> BARs - I/O space is pretty much deprecated in PCIe, and as mentioned some >> systems don't even support it at all. I found a datasheet for CMI8738, and >> they seem to be right at the other end of the scale as legacy PCI chips with >> *only* an I/O BAR (and so I guess your card includes a PCIe-PCI bridge as >> well), so are definitely going to be hitting paths that are less >> well-exercised on arm64 in general. > > OK, that makes sense. So If I'm able to find a card that is genuinely > PCIe¹, then it should work? > > ¹ this one has a connector that looks like a PCIe x1, but it's not > really PCIe as the chipset was designed for legacy PCI? Probably - native PCIe endpoints are still allowed to have I/O resources, but they are required to be accessible as equivalent memory resources as well, so most PCIe drivers are unlikely to care about I/O BARs at all. >>> What info would I need to gather from the machine in order to figure >>> this out? >> >> The first thing I'd try is rebuilding the kernel with CONFIG_INDIRECT_PIO >> disabled and see what difference that makes. I'm not too familiar with that >> area of the code, so the finer details of how to debug broken I/O space >> beyond that would be more of a linux-pci question. > > Tried that, didn't help. OK, I managed to have a poke around on a full-fat Altra Mt.Jade system, and indeed, at least on this one, the firmware is not describing any I/O space windows at all: [ 8.657752] pci_bus 0001:00: root bus resource [bus 00-ff] [ 8.663235] pci_bus 0001:00: root bus resource [mem 0x30000000-0x37ffffff window] [ 8.670715] pci_bus 0001:00: root bus resource [mem 0x380000000000-0x3bffdfffffff window] [ 8.678926] pci 0001:00:00.0: [1def:e100] type 00 class 0x060000 [and so on for all 11(!) PCI segments...] ...which then leads to a lot of failing to configure I/O at the bridges: [ 9.005653] pci 0000:00:01.0: BAR 13: no space for [io size 0x1000] [ 9.012006] pci 0000:00:01.0: BAR 13: failed to assign [io size 0x1000] ...but unfortunately what I don't then have is any endpoint with an I/O BAR in that machine to see how that plays out. Either way, though, if your machine looks the same as this (i.e. does not report any "root bus resource [io ... window]" entries and fails to assign any I/O space), then there's no way that card can work, and it would seem to indicate a bug somewhere between the PCI layer and the driver that it's able to get as far as making an access to something it has no means of accessing. If on the other hand your firmware is different and *does* claim to have I/O windows as well, then something else is going screwy and I don't know, sorry. Cheers, Robin.