Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4714132iob; Sun, 8 May 2022 23:00:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykmL0h4GFwtw4Himno7oN3sn3/xX7rJmt5mdVj0iXwLLKsa5q68O8HXGzC50/O1vLFelzr X-Received: by 2002:aa7:848a:0:b0:510:44da:223d with SMTP id u10-20020aa7848a000000b0051044da223dmr14620806pfn.66.1652076022540; Sun, 08 May 2022 23:00:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652076022; cv=none; d=google.com; s=arc-20160816; b=k6TCBBqMja6A01V1bfiB+Yyp5U9rhzWQiOkXHqaZqrJALvSMXGUsgv41Tc3xIdE19O 20vgxnydhJ+M0IVGLiLL08A4pcN8eY3fsrnIjgoyzTFnbqUItQ8boFE6pj57d1GaRqOP ce+bjP/RuCcPDMTHKf5o7Q3RRt8yPBQ7OLb/qlTMY+HAGgxb16949jd1NpMT7vxVXMoY zqd7zne3hkqlQn2jD4b4EqEdD9PfnqP/vb3n4ypzqPLkJlxma+RphuwNxdxl2v1llJCg bej2Ms3dmDdyb68mXXhNPF0zWUKiq7EPiEXQoeqHqtyzVN5HELmpSAFxjUqCfsh6zarL f8pA== 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=TFKDqxAl8kAhgchSspFlV1jC/a94gKje1e9uHi6vXps=; b=1AhtoGuZyjmIGdoeQ3yHPWjCaOnli88g9q/H6pVinHivjW/KD8HR+xlP0CHfkKAzNr vYBKQQIo7C4Mbo7Y2Oc/larG/Y8MuPEPbo9q1xWxar2X/RUr4ajuYXG38axISvTW/bP0 kEPJrT8b3PJK52T1f3nsB5etxn7pAbQ1D31WKZQmpbxDJGddhfouqb2GFY1nGBE3iApC M8mAXkV9y4vUazvNcgUQIhwjD6VPv6W4aVw2RjGFNeZTnIYPsE6Ao5WaZgn+lVWqzy45 sIYkGFMMjoZQMW4MC0baB5E/NmDaXRZ52bqHuLcAN1ACaMBiIjAlfMt3VARAyFd81J2m kRcw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e5-20020a631e05000000b003c5ea44e994si13789247pge.748.2022.05.08.23.00.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 23:00:22 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 885E315EA78; Sun, 8 May 2022 23:00:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442532AbiEFPA5 (ORCPT + 99 others); Fri, 6 May 2022 11:00:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347797AbiEFPAy (ORCPT ); Fri, 6 May 2022 11:00:54 -0400 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E6855D66D; Fri, 6 May 2022 07:57:11 -0700 (PDT) Received: by mail-qt1-f180.google.com with SMTP id o18so6148249qtk.7; Fri, 06 May 2022 07:57:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TFKDqxAl8kAhgchSspFlV1jC/a94gKje1e9uHi6vXps=; b=Sxg80agDa7tTqUp3W7rKa3hzSGeUm0htCDCMpdxBfSW0Sl6vkmAldg8nkZeY+t+3Qw Td/DgDcz6zLCnOJd0yh8vgClck/yq5IggwtZvuTvHDZ47dC27m5GSKZichMdjR7TxiGd 1ukA5wVzWnyDoJ+4gput1p1ZUfzV92SaHyMhBQf0TiFt73clt/7q3vj0Olv4dPaoAHej r80vHBT02YVWB6Wie5tECcwOp7jfuHkvszD4FdwE9KPSd+VEVZTgLob5zt5NWUktU3O9 GpHRbAy9ot+bdATuL/Cgb378IejVLTVfZNkDjRgB2IvwQdY3Pfb2EoR9FWtH2SSLRYGp TMKA== X-Gm-Message-State: AOAM530FkhTo3eQXUQwXcQTBWzoZecZ2RoLv3DUj68jTR7w5GJPhkh4m k/Y+jnv1uvtXHxZWFxHacveZfP6ig/XtWQ== X-Received: by 2002:a05:622a:3c8:b0:2f3:7231:913e with SMTP id k8-20020a05622a03c800b002f37231913emr3168671qtx.212.1651849030333; Fri, 06 May 2022 07:57:10 -0700 (PDT) Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com. [209.85.219.170]) by smtp.gmail.com with ESMTPSA id h4-20020ac87764000000b002f39b99f6a2sm2504428qtu.60.2022.05.06.07.57.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 May 2022 07:57:09 -0700 (PDT) Received: by mail-yb1-f170.google.com with SMTP id w17so13293397ybh.9; Fri, 06 May 2022 07:57:08 -0700 (PDT) X-Received: by 2002:a05:6902:352:b0:63e:94c:883c with SMTP id e18-20020a056902035200b0063e094c883cmr2500583ybs.365.1651849027963; Fri, 06 May 2022 07:57:07 -0700 (PDT) MIME-Version: 1.0 References: <20220505161028.GA492600@bhelgaas> <5239892986c94239a122ab2f7a18a7a5@AcuMS.aculab.com> <3669a28a055344a792b51439c953fd30@AcuMS.aculab.com> In-Reply-To: From: Geert Uytterhoeven Date: Fri, 6 May 2022 16:56:56 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC v2 01/39] Kconfig: introduce HAS_IOPORT option and select it as necessary To: "Maciej W. Rozycki" Cc: David Laight , Arnd Bergmann , Rich Felker , "open list:IA64 (Itanium) PLATFORM" , "open list:SUPERH" , Catalin Marinas , Dave Hansen , "open list:MIPS" , "James E.J. Bottomley" , "open list:SPARC + UltraSPARC (sparc/sparc64)" , "open list:RISC-V ARCHITECTURE" , Will Deacon , linux-arch , Yoshinori Sato , Helge Deller , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Russell King , Ingo Molnar , linux-pci , Bjorn Helgaas , Matt Turner , Albert Ou , Arnd Bergmann , Niklas Schnelle , "open list:M68K ARCHITECTURE" , Ivan Kokshaysky , Paul Walmsley , Thomas Gleixner , "moderated list:ARM PORT" , Richard Henderson , Michal Simek , Thomas Bogendoerfer , "open list:PARISC ARCHITECTURE" , Greg Kroah-Hartman , Linux Kernel Mailing List , Palmer Dabbelt , "open list:ALPHA PORT" , Borislav Petkov , "open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)" , "David S. Miller" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Maciej, On Fri, May 6, 2022 at 4:44 PM Maciej W. Rozycki wrote: > On Fri, 6 May 2022, David Laight wrote: > > > It was retrofitted in that x86 systems already existed for ~15 years when > > > PCI came into picture. Therefore the makers of the CPU ISA couldn't have > > > envisaged the need for config access instructions like they did for memory > > > and port access. > > > > Rev 2.0 of the PCI spec (1993) defines two mechanisms for config cycles. > > #2 is probably the first one and maps all of PCI config space into > > 4k of IO space (PCI bridges aren't supported). > > This one is even more horrid than #1 in that it requires two separate > preparatory I/O writes rather than just one, one to the Forward Register > (at 0xcfa) to set the bus number, and another to the Configuration Space > Enable Register (at 0xcf8) to set the function number, before you can > issue a configuration read or write to a device. So you need MP locking > too. > > NB only peer bridges aren't supported with this mechanism, normal PCI-PCI > bridges are, via the Forward Register. > > > #1 requires a pair of accesses (and SMP locking). > > > > Neither is really horrid. > > Both are. First neither is MP-safe and second both are indirect in that > you need to poke at some chipset registers before you can issue the actual > read or write. > > Sane access would require a single CPU instruction to read or write from > the configuration space. To access the conventional PCI configuration > space in a direct linear manner you need 256 * 21 * 8 * 256 = 10.5MiB of > address space. Such amount of address space seems affordable even with > 32-bit systems. Won't have fit in the legacy 1 MiB space ("640 KiB..."). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds