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: 6075 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp336389wrd; Fri, 3 Mar 2023 02:31:01 -0800 (PST) X-Google-Smtp-Source: AK7set/v4YbP6qXYj5J77eVYGeQxDsyZ+ytTn5uUQUWHZn2ihM+RsMcy9nz5AskVjcteFUEudpzX X-Received: by 2002:a17:906:30d3:b0:878:7291:d558 with SMTP id b19-20020a17090630d300b008787291d558mr1229499ejb.34.1677839461318; Fri, 03 Mar 2023 02:31:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677839461; cv=none; d=google.com; s=arc-20160816; b=hUF8RDQJZ1B3JhpTatRE9BnrQQzOC6VCeIfojaE8018Ubq3D4Xpi7AT2whV7CKUfGX LPzNuHn/WlePXFidf3KBqvDZkCebebRmsb+fr1yI+m3ebSfICXPiEZZkFrib/YcXeUMM aRNF3hhalkVdBIFKaZYYOj2OKX3B9yazMJvrSqOT4OZ8+DBVbbSVf0EBIDompYy+zpih wJyLZIw+DemruXXuqhkEv4ctp/YfFxq28r0oEpesYpMqMJQCEYU7XtgvwO3bHKh3XLL/ cGTnyA7lFI0YpgQSRFYY1gohB/CJ6zqxBX5RJjbhdIVQL5GrYP+vDsGihFes6cMKA2rF bhKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=O2k0Ei/F4zU2Rulh7j3IWkXRZQv/tvq6gI1ZLtPy3Gw=; b=X8lAGVomoVNX+oEfTsg9wdq+8mLeW78Tpfd+h5hW1AGfsDSHOFfRCl6Lm2Ar7uZ1VP Fk/7F/t/Jy/HS/mnkEbWkWKSL34mhc6BK9xIrJxtZFdMPpSfcgAINjY8oi9wDj5CNrn9 EQCGV/IxFBOolphNsTVGWU00Gtn1/CFAAZijnB6mJfwGphPIlCyx2y3la5sSsVqAURZI ui/4JFDs2XFJdAowdpcTR48DGsSbID4sLlvlM85ZWHzBG9a8miu93530BJrDf9uZsl/T vLlhHzqc/DtoeT8zI5a0k9psgLtZ5yGjml2myvkyJy6syu0ctSZSR/yinyjl3uklIR2W Sxmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QOGQJYEh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a170906714200b008c35025ce33si1896105ejj.838.2023.03.03.02.30.38; Fri, 03 Mar 2023 02:31:01 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=QOGQJYEh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230083AbjCCK3O (ORCPT + 99 others); Fri, 3 Mar 2023 05:29:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbjCCK3N (ORCPT ); Fri, 3 Mar 2023 05:29:13 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69B2312BDB for ; Fri, 3 Mar 2023 02:28:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677839310; 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=QOGQJYEh97YpI5yq3sj0oPZtZZGkl/8+E/7sbIdKEmP/wMiUtj62E3j0ARXaEbeqy/LlOt JML1TqRNDEVdXLZyvp3BHXx51cRfhsWegXx6hxHomN4QzDIpVNGUobLU3WNsf0LCj9fu+E HvFuCNXzheOMO7qXi15xuVgCnTBsgpM= 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759160655145347145?= X-GMAIL-MSGID: =?utf-8?q?1759342190533792338?= 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(-)