Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4673070iob; Sun, 8 May 2022 21:28:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfEqWFUwgEruuz96NIEtnyF4p3+TAxaTd9DH6OduaYqA7peBEJsCmhCHhdS3AE9ABoHt9f X-Received: by 2002:a17:90b:33c6:b0:1dc:ba92:41bb with SMTP id lk6-20020a17090b33c600b001dcba9241bbmr15986635pjb.26.1652070502611; Sun, 08 May 2022 21:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652070502; cv=none; d=google.com; s=arc-20160816; b=tYW8ERkRYZipOxd1zzGpvJaClioUoz8Gu4GMZTIjeahSD1L9BvlHUi5uNWgXTM1TWO AVVvW0jFFttTqeVAofEtPDnx0aQ+n4xXVIOBu3yhz2ZHgo+5qXoOB/X3Sstwa0v0+Ez6 oLMHupYQK25Ny/fXQij/bw8Btp9xPseN0DKEKGsAwY3aY5dlo0F3S5rmghXCUFeNRebE o31L/XXV12pStLrhOBdQbRkCehiiu9bGRCwRfIPLowsc394dNudxHoO0oy7HglBh+x35 GdUCgSX+ieGoMQrpNmsM75/+qrZfwOaUu9KsEx2Zichos4pa0rBRV9ns9OPZw3JzJelE zc8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=4B5dukWbNfwlakQVAS8uZiG0A9IEKrcjAq2pXYt7YJo=; b=WnUbMUKR3vxntd/PL6KV0wZk6fQAExJj7/4QaMMiG2ZVBqOlC3jMBMh3h8f4Dash/z ReKPY0vz6CquhHoiCoLTB4g4wEqZbL8ecCo55/4BcYpLb/Prpz2ldHiyEsU+LPUrxJ1u GiKThv2mBOWLYLOEfKd6fsHHCxBepyOkgv+bSixFfGt0z/aKNJDSqSKp+GY4wIihx+gt 55iFyuLF99umZBXsWTEUgQ9EgiwsQqK2jKQ/j+YJm8MVFvk+UabizSDSsVxL4oDAcrSb 8iQEngNGziXZGXSr8nDPh3hqmNognRyZm5Hi1uNzIYEOCcf7U6fx103HPzrAxQFy7dQY heEQ== 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 z135-20020a63338d000000b003ab87166cc7si13373369pgz.749.2022.05.08.21.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 21:28: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 B1D45121213; Sun, 8 May 2022 21:27:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232260AbiEFNoE (ORCPT + 99 others); Fri, 6 May 2022 09:44:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1392635AbiEFNny (ORCPT ); Fri, 6 May 2022 09:43:54 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B84B9689B6; Fri, 6 May 2022 06:40:10 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 418EA9200BC; Fri, 6 May 2022 15:40:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 3D20D92009E; Fri, 6 May 2022 14:40:09 +0100 (BST) Date: Fri, 6 May 2022 14:40:09 +0100 (BST) From: "Maciej W. Rozycki" To: Geert Uytterhoeven 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" Subject: Re: [RFC v2 01/39] Kconfig: introduce HAS_IOPORT option and select it as necessary In-Reply-To: Message-ID: References: <20220505161028.GA492600@bhelgaas> <5239892986c94239a122ab2f7a18a7a5@AcuMS.aculab.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 On Fri, 6 May 2022, Geert Uytterhoeven wrote: > A loooong time ago, it was suggested to add register accessor > functions to struct device, so e.g. readl(dev, offset) would call > into these accessors, which would implement the bus-specific behavior. > No more worries about readl(), __raw_readl(), ioread32b(), or whatever > quirk is needed, at the (small on nowadays' machines) expense of > some indirection... I guess you'd need an additional parameter for the endianness policy required (to match either bit or byte lanes, according to ultimate data interpretation) where crossing between buses of a different endianness each. Otherwise you'd end up with the mess elsewhere. Maciej