From patchwork Fri Mar 3 10:28:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 13158623 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 EB862C678D4 for ; Fri, 3 Mar 2023 10:28:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6CE4D6B0074; Fri, 3 Mar 2023 05:28:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 67DB36B0075; Fri, 3 Mar 2023 05:28:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 546646B0078; Fri, 3 Mar 2023 05:28:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 44F246B0074 for ; Fri, 3 Mar 2023 05:28:35 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id ADC1F12073A for ; Fri, 3 Mar 2023 10:28:34 +0000 (UTC) X-FDA: 80527212948.30.BEAED94 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf18.hostedemail.com (Postfix) with ESMTP id E7DC21C0013 for ; Fri, 3 Mar 2023 10:28:32 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=EvPphGIT; spf=pass (imf18.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.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=1677839313; 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=O2k0Ei/F4zU2Rulh7j3IWkXRZQv/tvq6gI1ZLtPy3Gw=; b=6aX1qlR3v2Pk7kz5AKSKr9D3JJXY+o2xywNWlk3qEH+uZR3+eTu/b2WA5ZCE5Os99RH5PT DJMSfWaHA/aiTzPbliUOaXZCxCsfB/78mICyfMvIjoWokNxV/fgNr2CDl9z1DswNstsksO B6O91vBAtWBqck9xw0Pxb38lQ5IixBQ= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=EvPphGIT; spf=pass (imf18.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.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=1677839313; a=rsa-sha256; cv=none; b=gD5R5SMKCedI/DFHAjmSjEVQTLfNiLRN7jUAx9FEAdkJGDtpym3e3/z1Gv028GYxU+2HoZ eVtAl1RXF67V8x9TiCO6SMdHSGjz3RAXyqFfUe+Tyf5blrFmyY7iO6K1mtsbLu8ZAZ+A8W VmWWUN2yu9hUqcYufXMQp6+Mg5Uq3n0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677839312; 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=O2k0Ei/F4zU2Rulh7j3IWkXRZQv/tvq6gI1ZLtPy3Gw=; b=EvPphGIT8F2Fljp/ftwCYgI3iDvLtK+Dd0B9roNVmG2CILtH99/zVNESRailZXFjo4se1B Bf0Dzf0A8Nmi2uRt2poH7HLE6/9Px75Ohid4QIwOalE3XC4WxJt+PAIGfkO8TsXavGN9C1 sOJB+nFXJKcjZHDasomiwGmDVMccygc= 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-479-OfxrwEaEPyGWu_7JaYcaTQ-1; Fri, 03 Mar 2023 05:28:26 -0500 X-MC-Unique: OfxrwEaEPyGWu_7JaYcaTQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2064829AA3AC; Fri, 3 Mar 2023 10:28:26 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-13-150.pek2.redhat.com [10.72.13.150]) by smtp.corp.redhat.com (Postfix) with ESMTP id E041DC16900; Fri, 3 Mar 2023 10:28:21 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, linux-mm@kvack.org, arnd@arndb.de, geert@linux-m68k.org, mcgrof@kernel.org, hch@infradead.org, Baoquan He Subject: [PATCH v3 0/2] arch/*/io.h: remove ioremap_uc in some architectures Date: Fri, 3 Mar 2023 18:28:15 +0800 Message-Id: <20230303102817.212148-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: E7DC21C0013 X-Stat-Signature: wzqm46ojofa54fw87xbogtc68yp7f5uh X-Rspam-User: X-HE-Tag: 1677839312-115965 X-HE-Meta: U2FsdGVkX18PCcu4NSWrRxisJwhj7UY/Twn7W/GC/GG3Nqk8FWgtXE17TgtzmjyCTbIw9fV869RDYOvY9sgG7fcAX4qG2mcKobFK5Si97Kz88xN5lpeDytrwoqx2hkb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8Yzw== X-Bogosity: 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 definition in which returns NULL. If any arch sees a breakage caused by the default ioremap_uc(), it can provide a sepcific one for its own usage. This is done in patch 2. 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. Adding asm-generic/io.h is done in patch 1. 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. Baoquan He (2): mips: add including arch/*/io.h: remove ioremap_uc in some architectures Documentation/driver-api/device-io.rst | 14 +++-- 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 | 79 +++++++++++++++++++++++--- 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 - 9 files changed, 79 insertions(+), 25 deletions(-)