Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1966923rwd; Thu, 15 Jun 2023 19:22:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5MDb2ymG2gISxkcD3ebPoXWFt7ebhwWT9vP99ZsMOlYyQast07O8mYXAfiMFH07eoeP1sW X-Received: by 2002:a05:6a00:1951:b0:652:dd02:f70e with SMTP id s17-20020a056a00195100b00652dd02f70emr841383pfk.6.1686882142093; Thu, 15 Jun 2023 19:22:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686882142; cv=none; d=google.com; s=arc-20160816; b=s2YaVf/DrgXoKmJ9LurFePuw8x5aXboJa1qCGXnxaiqVIc8reJh/pUs93EL/B52OKX N+qbkhzCGv++A8vnFZFiwXSLEueohZ1V8JQ2OU5w/SnUDakUrE1iFiD2zC83omjw2XvP d8My3JRVWoqPZoHH6NxtjMqHN2zzzZJk9LThAc9BKo+qprzPsNg70QMLPWaakvabfV8B xZHlbD2+5Pi0cSlboiTVA0e8jSheuRyFRhrg0PDctrZkglioqtxMNurtpE8KbIE4l3/p XRunQ0xNL7/P17P2ijJFbhUa3KBY3nMJfdylXBE0qZx0+JxpZuEAShjo35zqvI2Gqri0 VTQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=9Bbj9JgNMmLvDSZHDeFFWiojmiu+vV+JDevPVNxCbDU=; b=l5o+S1ut/uwwhK/OdIEE2HKHTv3AXBMWBrgI1IyH0aYmW81QgDlitKeNq7IZyLyjmo 6cQAS81YmbnvO8O6aqn9DgxhBNtE/rVMIV1Y2lw8+ipSjwswVoXCnyEvltm7wjZGn9SF R88C0U9PTg+rvs0VFoKd8gxdRmiYfRIiIae6QOCGoNbvt8chGI1GrIOShzROZmpIMYx/ X9CF/BBOa6S7/sKiDxN8rb6s8+yWOTaxY6tEZwtm1amNa9ClA2udPO2gbbI0l+ZiZQAD EmRxWvVC+oU0AyslfSJ08btmSoSgYyFqwlrW8wqC4uUrFW16KfQfSNH0tybG5F3briOd zejA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j191-20020a638bc8000000b0054ff2eeea20si3036900pge.589.2023.06.15.19.22.08; Thu, 15 Jun 2023 19:22:22 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240062AbjFPCMf (ORCPT + 99 others); Thu, 15 Jun 2023 22:12:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240076AbjFPCMe (ORCPT ); Thu, 15 Jun 2023 22:12:34 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 923B62967; Thu, 15 Jun 2023 19:12:32 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.116]) by gateway (Coremail) with SMTP id _____8Cxd+kPxYtkhMsFAA--.10389S3; Fri, 16 Jun 2023 10:12:31 +0800 (CST) Received: from [10.20.42.116] (unknown [10.20.42.116]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxauUNxYtkj8AcAA--.16275S3; Fri, 16 Jun 2023 10:12:30 +0800 (CST) Subject: Re: [PATCH pci] PCI: don't skip probing entire device if first fn OF node has status = "disabled" To: Vladimir Oltean Cc: Liu Peibao , Bjorn Helgaas , linux-pci@vger.kernel.org, netdev@vger.kernel.org, Bjorn Helgaas , Rob Herring , Claudiu Manoil , Michael Walle , linux-kernel@vger.kernel.org, Binbin Zhou , Huacai Chen References: <20230601163335.6zw4ojbqxz2ws6vx@skbuf> <20230601221532.2rfcda4sg5nl7pzp@skbuf> <7a7f78ae-7fd8-b68d-691c-609a38ab3161@loongson.cn> <20230602101628.jkgq3cmwccgsfb4c@skbuf> <87f2b231-2e16-e7b8-963b-fc86c407bc96@loongson.cn> <20230604085500.ioaos3ydehvqq24i@skbuf> <20230605093459.gpwtsr5h73eonxt5@skbuf> From: Jianmin Lv Message-ID: Date: Fri, 16 Jun 2023 10:12:29 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20230605093459.gpwtsr5h73eonxt5@skbuf> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8AxauUNxYtkj8AcAA--.16275S3 X-CM-SenderInfo: 5oymxthqpl0qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBj93XoW7Ar1UWF43CF4DKw4kXFW3CFX_yoW8Ww15pF 43AF4SkFn8Gr4Sy34DZw4ruFyfua93Xw45Jr48J34v93y5WFySvrWYqa1Iqay7Gr18AF1a vFWjqw1vk3WDWagCm3ZEXasCq-sJn29KB7ZKAUJUUUU5529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUvYb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4j6r4UJwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI0UMc 02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUXVWUAwAv7VC2z280aVAF wI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMxk0xIA0c2IEe2xFo4 CEbIxvr21l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG 67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MI IYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E 14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJV W8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07j1WlkU UUUU= X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 2023/6/5 下午5:34, Vladimir Oltean wrote: > On Mon, Jun 05, 2023 at 08:59:23AM +0800, Jianmin Lv wrote: >> For a multi-function device, if func 0 is not allowed to be scanned, as I >> said in way of 2, the other funcs of the device will be described as >> platform devices instead of pci and be not scanned either, which is >> acceptable for Loongson. The main goal by any way for us is to resolve the >> problem that shared pins can not be used simultaneously by devices sharing >> them. IMO, configure them in DT one by one may be reasonable, but adapting >> each driver will be bothered. > > Could you give an example of PCIe functions being described as platform > devices, and how does that work for Loongson? Are you saying that there > will be 2 drivers for the same hardware, one pci_driver and one platform_driver? > In the case of the platform_driver, who will do the PCI-specific stuff > required by the IP, like function level reset and enabling the memory space? > E.g. there are two functions , func0 is HDA controller and func1 is I2S controller and they have shared pins. When HDA or I2S is used, both are disabled for PCI enumeration in BIOS (e.g. by filling PCI header with 0xffffffff), and mem space has been reserved from host bridge window for them in BIOS, of cause, reserved space will not be seen by kernel because it has been removed in host bridge mem range when passed to kernel in DT. Then the reserved mem base is passed into kernel by DT, CPU will use remapped address of the mem base, and these devices will not be enumerated in PCI bus. The way is only used for PCI devices (share common pins and exist on bus 0) integrated in Loongson CPU or chipset.