Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp422962rwr; Thu, 27 Apr 2023 03:24:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7BG/c5VM52FK1DDfyhXgQcSsvAKXdfx+AwA8iqxgngTLruVORI4gjkiD9oer+preJ8m/Jw X-Received: by 2002:a17:902:f543:b0:1a6:6edd:d143 with SMTP id h3-20020a170902f54300b001a66eddd143mr1171262plf.6.1682591040228; Thu, 27 Apr 2023 03:24:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682591040; cv=none; d=google.com; s=arc-20160816; b=gyCeVNriiHPuu4Fj2EguG2s17vkHdolLnNKwJGgPpyLWoWVwq8NY/Ofo/5sprCCS5M WQ1819RZmdG5cfyWnzfglz7JhgfHtrEq/+C9VooZjPjF4tyUFquOls52tueNiqdbK9jf V584fPj7TlXWL1RzbJ4S2EUPDKKw1VMJ3FT/yBmtcAuSFjeO4LSVjuR/AUkKEGm225uF ZAmcmoXyiceSp4N7OS4Q7WD0ZiW/YFIii5meUtZqg5Z+RarNQw0lUt/2Qyr21Fb4Do3D zj+i1/owEu88Xb8X7EkrwnNb7r5uZ31qpYcWc5KCyG80E0n+Z+BHIUW4m0gTcAnDEDV3 Ik7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=TkKJeIPKG7f6IRUahtFu2q5U2rkyrgs8/HMPUJWIYm8=; b=Vd5tVgLhnvbsfvC2bj7SNOmmUoWtZyt+WB/VzKXPf4Y0bjLnrd2hUi9hMclpniJZhb WKoamEQmIeJKioYl39cI+44/NvvSz2WTzia6UaQDIWFNLQcSjx5J5cFr26quJeJvXUNP 1d2SbTGNBHlpkX9gxgXPKDN1bK0Zjhsu2cX+rBbVpHTOQwe2jCYqEn+1kdodm9xJD88y 5N/6MqTu6qNNHtqA9wZvGzN2vqCJY6xG0/dwgUrGoLWzNIfMvvuUWGeVNLZhvYJ6Fwti i1DIuj8AFWt7IrPU7GZMLWprzTwrJ7HDp0lQY9i8iWBhXtZ8XQtfWt22vAZICrrc79g5 NX0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=BXZFSJtI; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=A3rKNELY; 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 x13-20020a170902a38d00b0019b354d0268si16789016pla.280.2023.04.27.03.23.45; Thu, 27 Apr 2023 03:24:00 -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; dkim=pass header.i=@arndb.de header.s=fm2 header.b=BXZFSJtI; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=A3rKNELY; 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 S243560AbjD0KUu (ORCPT + 99 others); Thu, 27 Apr 2023 06:20:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243515AbjD0KUe (ORCPT ); Thu, 27 Apr 2023 06:20:34 -0400 Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6CD046B6; Thu, 27 Apr 2023 03:20:32 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id 55E0758242F; Thu, 27 Apr 2023 06:20:30 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Thu, 27 Apr 2023 06:20:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1682590830; x=1682598030; bh=Tk KJeIPKG7f6IRUahtFu2q5U2rkyrgs8/HMPUJWIYm8=; b=BXZFSJtImG4lwyWz1R Y7/lcgNiyVd086FQtgLBcSRGmR932Z0spDDCGarBT0Hd/8nD6P8choanmlSJltEP kPoELRuks97NsVV3Y6h6NpezIDi7hRIHdgiPpLL2ZXBfEme25O3IlABm5EUYrwhh AVy2IukqVHoLDG1ROJcetYfjykOEOzLaQqmNvmOBUOKxkupkytgV1BgX9hrDcVc8 u/q017GOBJXhJMfD0TxokxxA1KPk6TEpqD/jMoVURAO+UI7jWhsfb8b/pTzReh7b OQfwHDEmY7iUYEiibC97/tc4m/+mw9BLZpZW6mI7sW08rtXqlwCLHwpzyP0CwWM2 XOeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1682590830; x=1682598030; bh=TkKJeIPKG7f6I RUahtFu2q5U2rkyrgs8/HMPUJWIYm8=; b=A3rKNELYfcMLHKjUJRChFjA5jzt0T 1toIMbURvcg5t049xzhOMYNofYdB6yeboOlEFCfR1EOa7IaiAj9XVlIi9+gHkyUr YqD3Plzn4WqQjs8OtWvc1wDLL96SLSy9uDfda18B1JThg5FypTFPhyU02rPvKYII wT7HJHrJijZUkheztQQ+CjvRtq9pGnAEBU0BgJ2b9p1tVngJ+yckD93MkqZ/nfPU SpAzo2X/hkUZ932348+SB9kHgQVBu7NfIYCl6zw8DF5DQV4GSOacOGT4pis40Z2q enZAmWIIQ4Q9X3E9sVrABI39o+pMpmvo9OTHOp5lzese3fVWgrB0fF4hw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeduiedgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 2C87BB60086; Thu, 27 Apr 2023 06:20:29 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-374-g72c94f7a42-fm-20230417.001-g72c94f7a Mime-Version: 1.0 Message-Id: <173a9a6c-d47d-487c-b61a-66d021548f5a@app.fastmail.com> In-Reply-To: <3e33ab1d-b478-fdf5-6fbe-6580000182d1@suse.de> References: <20230426130420.19942-1-tzimmermann@suse.de> <20230426192110.GA3791243@ravnborg.org> <3e33ab1d-b478-fdf5-6fbe-6580000182d1@suse.de> Date: Thu, 27 Apr 2023 11:20:32 +0100 From: "Arnd Bergmann" To: "Thomas Zimmermann" , "Sam Ravnborg" Cc: "Helge Deller" , "Geert Uytterhoeven" , "Javier Martinez Canillas" , "Daniel Vetter" , "Vineet Gupta" , "Huacai Chen" , "WANG Xuerui" , "David S . Miller" , "James E . J . Bottomley" , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Linux-Arch , linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, sparclinux@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-parisc@vger.kernel.org Subject: Re: [PATCH 0/5] fbdev: Move framebuffer I/O helpers to Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Thu, Apr 27, 2023, at 08:22, Thomas Zimmermann wrote: > Am 26.04.23 um 21:21 schrieb Sam Ravnborg: >> On Wed, Apr 26, 2023 at 03:04:15PM +0200, Thomas Zimmermann wrote: >>> Fbdev provides helpers for framebuffer I/O, such as fb_readl(), >>> fb_writel() or fb_memcpy_to_fb(). The implementation of each helper >>> depends on the architecture. It's still all located in fbdev's main >>> header file . Move all of it into each archtecture's >>> , with shared code in . >> >> For once I think this cleanup is moving things in the wrong direction. >> >> The fb_* helpers predates the generic io.h support and try to >> add a generic layer for read read / write operations. >> >> The right fix would be to migrate fb_* to use the io helpers >> we have today - so we use the existing way to handle the architecture >> specific details. > > I looked through the existing versions of the fb_() I/O helpers. They > can apparently be implemented with the regular helpers of similar names. > > I'm not sure, but even Sparc looks compatible. At least these sbus_ > functions seem to be equivalent to the __raw_() I/O helpers of similar > names. Do you still have that Sparc emulator? I looked at the current code and came to the same conclusion: all architectures we support today do the same thing in __raw_readl() and fb_readl() etc, so we can completely remove the latter without changing semantics. I think the original list was necessary since not all architectures supported the __raw_ accessors in the past, so they were open-coded here for the rest. I thought there were also architectures on which __raw_readl() does a byteswap to reverse the swap done in a PCI host bridge, but it apears that none of those remain now, if we ever had them. Arnd