Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3481720rwr; Sat, 29 Apr 2023 08:00:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5maOvUlOHvSpeeh9UDkf1VAZEfP3HNlShNDNpP5yRVUYWW3Lvf1fGtZBL37KIWjIxTfMGi X-Received: by 2002:a17:90a:15:b0:247:b1f7:9f67 with SMTP id 21-20020a17090a001500b00247b1f79f67mr7622479pja.4.1682780444490; Sat, 29 Apr 2023 08:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682780444; cv=none; d=google.com; s=arc-20160816; b=BqhDEJI1cEuU+v7L2IGWNcBB836ZvYIC8tRW5jvcVtmDPyuvNGCKXUh120fOTM6fgb V6cz9J3aqt4IgKG8aeSaDcRp95Y20DzwZwYqDAaZn6/ImnrfAP2aljqoQmGyBAdJhbqf Az9USuUyZymswnDvJ+uMIx5+8LrOpMwn2Q+egoQMFK3chXGDv+UanuEvsuXuQhz3kl6v e7QaDB6sUrmW3OAzHAJDtf6i1ub5nOne0QoPpt4ODJ0NaymIkMTO2StRkgewdQO4X+j9 w5zGt42QdQfBeSS/K2u/6pAWaFyAaAf7T6Wt2On/hacWLc92bUnYhf2LaS3aYNgLeul0 y++A== 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=8dkHZ7/OLsjO2XUx8f1h6VDCdqS9HsgrgUgQPoekbMU=; b=P1iCKUqIr1xc7Zk1fHCAqcScOceOOXwDQtFf5nmnR56ZCAXn6NKQ6gsIcV3rVt0HXm P7/lAkDkmA3SaKEmnJlsARomz9+NpzetFkBFNRaypFK4VkOBAVtqXJLVvKHh8dhU2ZTU D5zuEc32o4FRTnWqSMQa9co3gbTZq5z8diJO7TsWt7+bhsysmtziA4dyEHxjm6fojxc4 FVogQ9cSiY9hjEsGMxaj7AuM1c1bo5KhuwsKfSOBpzkFnjfOw8v5MPj2OIv+Bnmc274z zRmzdrS8n+36X2Id2c4fKXNDNYj4ycUKGEHoVQntCRTAd6sTY7lG5+UfpNItz1CCwJgR CyUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=Tt4hmIAK; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=L+nvmAfj; 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 72-20020a63054b000000b00502d81ecf19si24029745pgf.646.2023.04.29.08.00.18; Sat, 29 Apr 2023 08:00:44 -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=Tt4hmIAK; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=L+nvmAfj; 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 S231336AbjD2OLm (ORCPT + 99 others); Sat, 29 Apr 2023 10:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230005AbjD2OLk (ORCPT ); Sat, 29 Apr 2023 10:11:40 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A377198A; Sat, 29 Apr 2023 07:11:38 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 2DD955C00FB; Sat, 29 Apr 2023 10:11:36 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Sat, 29 Apr 2023 10:11:36 -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=1682777496; x=1682863896; bh=8d kHZ7/OLsjO2XUx8f1h6VDCdqS9HsgrgUgQPoekbMU=; b=Tt4hmIAKM+NNZGRbGy USiFmRb7ZQ7VESvUpDkvDC9rS9I/kjpxYoq4IidwwhIKTPcYD5vR6RqvLLGr+CaD 1I9aUqlKLEp8YNzWVAXHUtUi2kVpAha/zdduG5raE+Wi0wvbUISzk2AadoiGxkiZ fZrZqC1pSn3Zxe1+KbPC8fVvKo3sFwMmI+khbEppmvaKW9CmFCgdX2QktEKQKG96 0SC2oHRE3uFMLM/L3dVGCHbScyE7YVtM0HH4gQT9Mh2zq/OoF5XuXAM6yoLd/EIj ZLMzsUC3vaXLLJ6GGE7oLNpIHGXhuLTVOB66jjYD1eINb3WthQd7wDNhLD/+UKGq YWnQ== 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=1682777496; x=1682863896; bh=8dkHZ7/OLsjO2 XUx8f1h6VDCdqS9HsgrgUgQPoekbMU=; b=L+nvmAfj8gymGhB5xVReToYxjM6wj v8YL/JxVhiXT6yjB2/Yx5h/SGJAuFpH+LYE4mRnIgEwvZrwch6NpT/gSOm3PSm30 bwzptyafMGf1520s8iYPvchCZ9FvC7zQx/AofzoW8CnPAm9cpnsX+tvIm8l6CBkt l6Yt2qTVsuFf+UtcSo0isg2MhJafTaqRhqjDh5e0bCdNSt6QOAH4NkSPUTzq6lqg IaNqSJFzzHT4wF8tk6iLVEl76ZIcQvAzUYcqtzZGN7wjqt4YIm/cBFu+jOkocHJJ 6aUIjnMFtOd00CnQB01bWd1lVpHN1OGQkflEeBtWUxIcBUtPa00kswySw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedvtddggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 00DD4B60086; Sat, 29 Apr 2023 10:11:34 -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: <260ee591-a71b-4c83-a775-5591d4222cec@app.fastmail.com> In-Reply-To: References: <20230428092711.406-1-tzimmermann@suse.de> <20230428092711.406-6-tzimmermann@suse.de> <430c73f0-45f4-f81e-6506-bc8cc955d936@arm.com> Date: Sat, 29 Apr 2023 16:11:13 +0200 From: "Arnd Bergmann" To: "Thomas Zimmermann" , "Geert Uytterhoeven" , "Robin Murphy" Cc: "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 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_H2,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 Sat, Apr 29, 2023, at 14:26, Thomas Zimmermann wrote: > Am 28.04.23 um 15:17 schrieb Arnd Bergmann: >> 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 > > After thinking a bit more about the requirements, I'd like to got back > to v1, but with a different spin. We want to avoid ordering guarantees, > so I looked at the _relaxed() helpers, but they seem to swap bytes to > little endian. Right, the _relaxed() oens are clearly wrong, aside from the byteswap they also include barriers on some architectures where the __raw_* version is more relaxed than the required semantics for relaxed. > I guess we can remove the fb_mem*() functions entirely. They are the > same as the non-fb_ counterparts. These might actually be different in some cases, or sub-optimal at the moment. memcpy()/memset() don't take __iomem pointers, so they cause sparse warnings, while the memset_io()/memcpy_fromio()/ memcpy_toio() sometimes fall back to bytewise access that is slower than word-sized copy. I only looked at the readl/writel style functions earlier, no idea what we want here. > For the fb read/write helpers, I'd > like to add them to in a platform-neutral way. They'd > be wrappers around __raw_(), as I wouldn't want invocations of __raw_() > functions in the fbdev drivers. That sounds good to me. Arnd