From patchwork Wed Mar 8 13:07:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 13165698 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6551C64EC4 for ; Wed, 8 Mar 2023 13:07:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E3D8A6B0072; Wed, 8 Mar 2023 08:07:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DEDB56B0074; Wed, 8 Mar 2023 08:07:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CB7136B0075; Wed, 8 Mar 2023 08:07:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id B97D26B0072 for ; Wed, 8 Mar 2023 08:07:28 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 4BA1E140D9F for ; Wed, 8 Mar 2023 13:07:28 +0000 (UTC) X-FDA: 80545757376.02.3996DC5 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf30.hostedemail.com (Postfix) with ESMTP id 2082C8000C for ; Wed, 8 Mar 2023 13:07:25 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Gl2MTocn; spf=pass (imf30.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678280846; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=uepvc5of9UN+iAXjqvR8mh3Kz3/cFenM5r6Yjs8S6hE=; b=SX+A2Bj51HpSb4jXEJlW1qg0F8V5mWbKK6xbqpnmLXPZKqxmxDYGFNrKB7BBkqHfu/wcON GvRRBIIs2UQaX9x/vjbPg8a61OzTk7FtFWDoHYLaiS+xsIXTwUVGFHXFrjmQnSy0lib5Sv 9bkbyNbdzpKlqdc9Yuigpy/LtgZjZAY= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Gl2MTocn; spf=pass (imf30.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678280846; a=rsa-sha256; cv=none; b=aX50XOBVoT+9PUMTL5IjTEWC2YJhXVFARJyW4PFNTlvUCrh8OiPYLkYxlWZTZFbzzfGzHp eh8Sy/K51XtHzNOM5d23cLU4VMs01M8tY2U82h8niUJ26KTLeZ+4PcXaYcmN6rzXeaU0On +9Ix6qlGRWisHXWn52mu932MEZxFsrA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678280845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uepvc5of9UN+iAXjqvR8mh3Kz3/cFenM5r6Yjs8S6hE=; b=Gl2MTocnLG0Uza2QxTiJ28GCn1NOxpBWhoiNhwwVS8dN1ezUJPhDuUkp8pXNSIt4HrGgcy skNF10kbTgjFtVF62Bh+8UfTkyddsMTZjbSY5PMI28RJnlpd+B8R3Dn3s1RQlyi4T1erIv Am1dM+LYPVmsXT7rflDf7vbDW5dV4t0= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-554-UZNxw_osN4mkAJNTU4up3g-1; Wed, 08 Mar 2023 08:07:18 -0500 X-MC-Unique: UZNxw_osN4mkAJNTU4up3g-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D503E3806702; Wed, 8 Mar 2023 13:07:17 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-137.pek2.redhat.com [10.72.12.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id A128B2166B26; Wed, 8 Mar 2023 13:07:13 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, linux-mm@kvack.org, arnd@arndb.de, mpe@ellerman.id.au, geert@linux-m68k.org, mcgrof@kernel.org, hch@infradead.org, Baoquan He Subject: [PATCH v4 0/4] arch/*/io.h: remove ioremap_uc in some architectures Date: Wed, 8 Mar 2023 21:07:06 +0800 Message-Id: <20230308130710.368085-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Stat-Signature: s3yhbm4ox1u8wsq4ksygnsaiwqjqfbw4 X-Rspam-User: X-Rspamd-Queue-Id: 2082C8000C X-Rspamd-Server: rspam06 X-HE-Tag: 1678280845-467395 X-HE-Meta: U2FsdGVkX1+bBiWFrYN1B6GSC3XHUX0eQoPq9NlYmtQDT6dGVMDsi0jGQtqw6hZyWHLjwFC1YCd54po+i3uszhO96R23aJNuW2J1dC5ZjeCJQWlpji/eI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ogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This patchset tries to remove ioremap_uc() in the current architectures except of x86 and ia64. They will use the default ioremap_uc version in which returns NULL. Anyone who wants to add new invocation of ioremap_uc(), please consider using ioremap() instead or adding a new ARCH specific ioremap_uc(), or refer to the callsite in drivers/video/fbdev/aty/atyfb_base.c. This change won't cuase breakage to the current kernel because in the only ioremap_uc callsite, an adjustment is made to eliminate impact in patch 1 of this series. To get rid of all of them other than x86 and ia64, add asm-generic/io.h to asm/io.h of mips ARCH. With this adding, we can get rid of the ioremap_uc() in mips too. This is done in patch 2. And a followup patch 4 is added to remove duplicated code according to Arnd's suggestion. v3->v4: - Add patch 1 to adjust code in the only ioremap_uc() callsite so that later removing ioremap_uc() won't cause breakage. - Update log and document writing in patch 3. - Add followup patch 4 to clean up duplicated code in asm/io.h of MIPS. v2->v3: - In patch 1, move those macro definition of functio near its function declaration according to Arnd's suggestion. And remove the unneeded change in asm/mmiowb.h introduced in old version. - In patch 2, clean up and rewrite the messy document related to ioremap_uc() in Documentation/driver-api/device-io.rst. v1->v2: - Update log of patch 2, and document related to ioremap_uc() according to Geert's comment. - Add Geert's Acked-by. Arnd Bergmann (1): video: fbdev: atyfb: only use ioremap_uc() on i386 and ia64 Baoquan He (3): mips: add including arch/*/io.h: remove ioremap_uc in some architectures mips: io: remove duplicated codes Documentation/driver-api/device-io.rst | 9 +- arch/alpha/include/asm/io.h | 1 - arch/hexagon/include/asm/io.h | 3 - arch/m68k/include/asm/kmap.h | 1 - arch/mips/include/asm/io.h | 112 +++++++++++++++---------- arch/parisc/include/asm/io.h | 2 - arch/powerpc/include/asm/io.h | 1 - arch/sh/include/asm/io.h | 2 - arch/sparc/include/asm/io_64.h | 1 - drivers/video/fbdev/aty/atyfb_base.c | 4 + 10 files changed, 78 insertions(+), 58 deletions(-)