Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp958960imi; Fri, 22 Jul 2022 13:35:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uAoDjH5v+E3SkN8NgwqxYV6DEL5Er5En5oVPnCFjz5ZLLUy3k8avkUeGfYLtrWP7Y9uDe+ X-Received: by 2002:a17:902:b694:b0:16c:29d9:7308 with SMTP id c20-20020a170902b69400b0016c29d97308mr1313403pls.110.1658522122144; Fri, 22 Jul 2022 13:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658522122; cv=none; d=google.com; s=arc-20160816; b=iHxKbM8h3w5QfCekDuce+O6i1XeJZpdARNL3dU94ikU9zhvBQEvkSpFJ9+7NSMt9u8 AU0dOtG6O7itqgJ1ked0Ud679Oo/CLvl1dh77GGLw7DV9dMiCsI3VE3ItjhXcKRGHbVQ iV41h9g9F3q7aFeL7jLMKuwFZgOJewgrxmcS7jzlDW8CsObodMyxgDLhaqibYqlMQWKF QFwj197w9I+lPEit6XGgHXgywBByPk/rCroqTfLM92vhVnzbxdPkmUkQWaOIZ/pY0/Gm xwT55uYNYvvOuY8G8hENQBDQy8PKQyG/T97wd544Km9ZdciMJChI+JOzyHNCCSs2KrjB RkBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=zwfU4fBDeaRIdt85ammyJlTijXEs6eXoGHB9oJADuDE=; b=N1ZZmXwaGs+ZnFXdr1kfpn1CIfEVUBLlafo7AZbLvR2JJcm7NIHAjntQNoPm+MH5bz XW7GuEqR7UE4SBxHbEMSd/ICK1niDamGSpwaOkfFlGrypIjFgZzOBtx4rIqgdkNqUcrb WUrMz5hffUJOpJqiFaTK/Mosqe19pJ7wac5p1RobZlm2bIwC5KCfWXu+ZIn3GM3e5klM nN57TL6MuSu3qN/Rq/A/NcHpnAPheL9eRGBZIhNrPLs/8ZnngGJO8JYTr26OcLlgEcqf k0o/S6WQLcm9bf7nZnI5W1j+bF4ZETyQSOfW88xetIr+H/2O74Lvsw1W8S+KZyZv0QjW fb8Q== 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 f15-20020a056a001acf00b0052b8a92ed84si241040pfv.172.2022.07.22.13.35.07; Fri, 22 Jul 2022 13:35: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 S236342AbiGVTz2 (ORCPT + 99 others); Fri, 22 Jul 2022 15:55:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231149AbiGVTz0 (ORCPT ); Fri, 22 Jul 2022 15:55:26 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57EA021252; Fri, 22 Jul 2022 12:55:22 -0700 (PDT) Received: from mail-yw1-f171.google.com ([209.85.128.171]) by mrelayeu.kundenserver.de (mreue009 [213.165.67.97]) with ESMTPSA (Nemesis) id 1Mg6mM-1nZttn0Psc-00hcEN; Fri, 22 Jul 2022 21:55:21 +0200 Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-31e7055a61dso58108187b3.11; Fri, 22 Jul 2022 12:55:20 -0700 (PDT) X-Gm-Message-State: AJIora/cAMhWTVJkIEDv24U5sMiKCvz1AxLinDg9sI5wyE15NzJd0ynp DL+cE5i/1KKgQ/7+nKeMHR9l3129FrR2shCCjcs= X-Received: by 2002:a0d:cec1:0:b0:31e:590c:c6e4 with SMTP id q184-20020a0dcec1000000b0031e590cc6e4mr1302476ywd.42.1658519719648; Fri, 22 Jul 2022 12:55:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Arnd Bergmann Date: Fri, 22 Jul 2022 21:55:03 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 2/2] asm-generic: Add new pci.h and use it To: Rob Herring Cc: Palmer Dabbelt , Bjorn Helgaas , "Maciej W. Rozycki" , Stafford Horne , "linux-kernel@vger.kernel.org" , Arnd Bergmann , Catalin Marinas , Will Deacon , Guo Ren , Paul Walmsley , Albert Ou , Richard Weinberger , Anton Ivanov , Johannes Berg , linux-arm-kernel , linux-csky@vger.kernel.org, linux-riscv , linux-um , PCI , "open list:GENERIC INCLUDE/ASM HEADER FILES" Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:O3tm97ktOQsIdtuCJXuJ3uCcUUlhuoEFWT3e4rEfl0Fg6Zixcm2 7S8otfg3urwov4ASLkqF0fyWwSzET/3VewEfYR0qJTsRdLkJe9KOmhptWAlt4E8VVWsVAKY VMDKLzLTDPZfEavzbXmAeHZaJgFpgxlMmZQWF8qkGaxv5sy31BO0q4p0V6pDgzaIP+8yHxw jtCUd9MEEok91XBkCvc6A== X-UI-Out-Filterresults: notjunk:1;V03:K0:36iDOpIY/Hs=:2vXnQwsiyWLk/bjZ/223V9 SsohMBwjwbwuUNsHbt33nFvPoMV7gNjldqAuP3jrDfIGZPupYhIFn+JVCTGiH2XiYismwygaS TlcO/t2LpWvz4pBoF7KSkWqOdjkBmj5+ee3hDV12DqqUnAalwDv7oLiqOMi7T1BfnK/aVaNDp GhjU/voDray/WpQbAvbe2eQKkp0C1ZBekdVA8NF3mXT3gF0nDNDft+4rsiGQrSi9Hqgfcyic8 jUhzy2ejGQ/yGOGXWPHuQH14z9CbMeWqcoEi85A7v8zCQuPK8pYL1hMyqP4M1E76o5RbqZeRU okavhF4ho+8ACS0Ls+i0eVO9QJfF3OntboEaGeUtc6P3LmfRDsioJxXVEZxliJsQmkSE4pWoc 6UBmHgqwS8wFUiqIslW8LTQixsH2r51+U0rlDeeI2g3DFN8Kv8RdtfysxZlAfdWBTtv7e395t lZA6dir31couJtwrzx8aWP+6qzONW45QIAoVqN3byAyEpln0ADJLeDWF0RxTUvPv7wvQftE4r PA4M07JmuAeE3OSOxyYDF/8PmH9YMqcQslsM0JYROmAHBftj3RmBo4vdZoCOcGZL+vl/2X/T5 nqZyPDJ11MC3mlTp8BS5Q/f7eCy8TPb9JY/MfFLE2RK5PsunWF2F9w2wszn5x8ehTnCN7t5Qe wMSrRKIR16+4lpCCri88tssHwCkS+XkI6qsE5ji+YBrBXav6LqamoCYpUH7IDoeIs/HTRMl1h bwRVw7MKNOWgMLHaMjK+aidULTZI/40GY0UE6A== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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 Fri, Jul 22, 2022 at 6:36 PM Rob Herring wrote: > On Fri, Jul 22, 2022 at 9:27 AM Palmer Dabbelt wrote: > > From fu740: > ranges = <0x81000000 0x0 0x60080000 0x0 > 0x60080000 0x0 0x10000>, /* I/O */ ... > So again, how does one get a 0 address handed out when that's not even > a valid region according to DT? Is there some legacy stuff that > ignores the bridge windows? The PCI-side port number 0x60080000 gets turned into Linux I/O resource 0, which I think is what __pci_assign_resource operates on. The other question is why the platform would want to configure the PCI bus to have a PCI I/O space window of size 0x10000 at the address it's mapped into, rather than putting it at address zero. Is this a hardware bug, a bootloader bug, or just badly set up in the DT? Putting the PCI address of the I/O space window at port 0 is usually better because it works with PCI devices and drivers that assume that port numbers are below 0xfffff, and makes the PCI port number match the Linux port number. Arnd