Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2112675rwr; Fri, 28 Apr 2023 06:24:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7yOkwl1b/xs2iNBGhq0c5RqZF20QcbXro50inYgcVRKc4ZGrHXTs9nE0SH1ygL7+cFwid+ X-Received: by 2002:a17:90b:4acf:b0:246:fc58:d77b with SMTP id mh15-20020a17090b4acf00b00246fc58d77bmr5512374pjb.44.1682688282614; Fri, 28 Apr 2023 06:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682688282; cv=none; d=google.com; s=arc-20160816; b=uXmoB5JaNo960N0ibJZk3KkC9LLhzfQKTv2Djbv+yN+A9DOYr6zzivpL5dU+1BVim6 TtFpN09IynOGGNA+GsugryLQT0ESxLCYYMVTXAyljOwafO+kncmSn4IU8Ut0OXa92lXY YaHz5jnWfuMa1/tt4zi8rqjQJySs9XMhEBLuL0qTgYmoLXcX5ZLsGJ8RKWAMXtgC3kDx 3pB3R4PaRXovUFWnSkqWO9G14FONgLTvBWn9/hC7k9ymFQQrY4HKVjHT2iFheWE2cC6U MxgnOJgd6oq9yLsLRK11ABgYy/irA7cO0Bl+9zmaGY2zbXyx+bizFP9L2AZOvCMx8QGY dAhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=PcHVTECY0DTSklc3ILW7xV/aJ7/Nau9fSJXoavdaK3A=; b=icazAPLwiT92jJyETpKl/87SAz068pMUW8yJnUeoZBl5jJHfVfXSFMajCl5nrxXsba angTkOzwx1tn3TJYFOL7n38Co0g0AgdWuk/p6Sm8jBdxiIkAYEcaX1X00dTVHTDZLlWQ MqaJ+3d7cd5tZTDli9QZWd+BnhVzPzuf2RAZOXhG98oXAXOHApHj+KbpA/CyCSS059pB rs2PAcoloG4bZwwecFtrSGhYwm//xcuhJDIr10Pm3IRhN4pA9gQoDHnHHHzgD7bdkwMy gwR4D6E6b0eZqvF3P4luq6d0FOnlcCy/HU926fK9qJ/8KNUxWYt8WOhce3Wikj3M8DKi q/dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=eUdK2nJG; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="UHAR/6bg"; 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 f16-20020a17090aa79000b00233773a522esi2168790pjq.49.2023.04.28.06.24.23; Fri, 28 Apr 2023 06:24:42 -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=eUdK2nJG; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="UHAR/6bg"; 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 S240073AbjD1NRb (ORCPT + 99 others); Fri, 28 Apr 2023 09:17:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229811AbjD1NRX (ORCPT ); Fri, 28 Apr 2023 09:17:23 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D32541BC5; Fri, 28 Apr 2023 06:17:20 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id AB7305C00BE; Fri, 28 Apr 2023 09:17:17 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Fri, 28 Apr 2023 09:17:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding: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= 1682687837; x=1682774237; bh=PcHVTECY0DTSklc3ILW7xV/aJ7/Nau9fSJX oavdaK3A=; b=eUdK2nJGUj2ojcq/iN8+k9NH/YFehW26tD8EuLHi59mfHw77XBh fsxNlrmYAQkqxYxfq6y27vgAktDmUq34FmXwMFdqTfPO9loKN1XNr+UVkGw680qV BX4/DYfgCMWrAxE4Wow3ZwgWlN0ZNzHHEAtYzaMI7xLQjVEHla6fM+TZ1yvnzX8P E9OEYJ2zcL1QVyo974JDoFI3uCjuLc0KDC60ytqogt91Vrtguy8dOzwcDADe8Q8K wwGN7a6AzKt12/FKaJ6yE4xZxx1mfSbCRrBkh1w9kOWf+J/cSrAHTesLpKGIXn3y r/ezr2uqH7xDgE1v6IYlgXMzGM/v2wMUp7w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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= 1682687837; x=1682774237; bh=PcHVTECY0DTSklc3ILW7xV/aJ7/Nau9fSJX oavdaK3A=; b=UHAR/6bgsNPLLEMAvooCE2Mz7rvShUkiKAolMysUv1eAD0G8pRJ Axt2cEsFq+HL0Sk84JLCYXyIoo4UY6iWfrU5QyWSoznl6Dl9up0oJPS8fmgZCkKN EmUFVujWaEm9kpXEdbpvXC1srFotbipILlqEP+BJC/wZA/MRDDmTDOObpyzAXcfr P5fPwPdeW2skiNrFbXI8pS1Fet/chSbd2eiKQ8NJCdOODy4lMW1yCHqd7i+2kw0m kkAAHSUBJawkS7oRrDqwSvWgWl0YC4FGX0wEe7mqbkV7MbyF4ZFqT2f9EaWXdta5 UEG6fShDzo25wuyIzYe0uuavmo6nS5Qe20w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedukedgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeegfeejhedvledvffeijeeijeeivddvhfeliedvleevheejleetgedukedt gfejveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id A158DB60086; Fri, 28 Apr 2023 09:17:15 -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: In-Reply-To: References: <20230428092711.406-1-tzimmermann@suse.de> <20230428092711.406-6-tzimmermann@suse.de> <430c73f0-45f4-f81e-6506-bc8cc955d936@arm.com> Date: Fri, 28 Apr 2023 14:17:24 +0100 From: "Arnd Bergmann" To: "Geert Uytterhoeven" , "Robin Murphy" Cc: "Thomas Zimmermann" , "Helge Deller" , "Javier Martinez Canillas" , "Daniel Vetter" , "Vineet Gupta" , "Huacai Chen" , "WANG Xuerui" , "David S . Miller" , "James E . J . Bottomley" , "Sam Ravnborg" , 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 v2 5/5] fbdev: Define framebuffer I/O from Linux' I/O functions Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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, Apr 28, 2023, at 13:27, Geert Uytterhoeven wrote: > On Fri, Apr 28, 2023 at 2:18=E2=80=AFPM Robin Murphy wrote: >> On 2023-04-28 10:27, Thomas Zimmermann wrote: >> > - >> > -#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64_= _) || \ >> > - defined(__hppa__) || defined(__sh__) || defined(__powerpc__) = || \ >> > - defined(__arm__) || defined(__aarch64__) || defined(__mips__) >> > - >> > -#define fb_readb __raw_readb >> > -#define fb_readw __raw_readw >> > -#define fb_readl __raw_readl >> > -#define fb_readq __raw_readq >> > -#define fb_writeb __raw_writeb >> > -#define fb_writew __raw_writew >> > -#define fb_writel __raw_writel >> > -#define fb_writeq __raw_writeq >> >> Note that on at least some architectures, the __raw variants are >> native-endian, whereas the regular accessors are explicitly >> little-endian, so there is a slight risk of inadvertently changing >> behaviour on big-endian systems (MIPS most likely, but a few old ARM >> platforms run BE as well). > > Also on m68k, when ISA or PCI are enabled. > > In addition, the non-raw variants may do some extras to guarantee > ordering, which you do not need on a frame buffer. > > So I'd go for the __raw_*() variants everywhere. The only implementations in fbdev are 1) sparc sbus 2) __raw_writel 3) direct pointer dereference But none use the byte-swapping writel() implementations, and the only ones that use the direct pointer dereference or sbus are the ones on which these are defined the same as __raw_writel Arnd