From patchwork Mon Aug 1 14:40:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 12933838 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DD3B6C19F2B for ; Mon, 1 Aug 2022 14:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=db2X3vrEAkcuGO7NSpxXsS/VJI6RSP2lY7sEV2eU940=; b=Y/5ww7Nnztwvye 79EDmrCRPt/KpzCgoXXxDjx/U4xe3W2gORA/luaYdeaZgAn9GQefQX5F3ypSniq2vr3OW3gvCp/km U/o/tUWIxbzLU1KcW7devfKdmdDsxVBBq+7T0eUlv/cKBZftiBNR/UGkktSM8J2Nw6JHV5mm9IjgV vKBb2zwKryiImqI+6E7RhDwz1EcyjUAGwFWOZuC0ph11OnkuhBwNffspP88bjSWotjaFkFJAkPBur 1BlRHRl40KNiIbDXbJOe7nXFKk8YON0oHAXGYO2xdFgamcDcTcT7RAwT5QVBuWNf5PfpRVSG+z8rh 5RC/P8dTl8uifeU0efpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oIWc6-0078fL-8p; Mon, 01 Aug 2022 14:41:46 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oIWbW-0078BT-E4 for linux-arm-kernel@lists.infradead.org; Mon, 01 Aug 2022 14:41:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659364867; 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: in-reply-to:in-reply-to:references:references; bh=CKrUoRnDZ3N/f9AupvreAkywYQigdqg4xJd8FTCpS7Q=; b=dzuElEUbn/xc4Ofz7QEV36JfAenKndM2RHzHOUR68a5BfE/NeqXd1E4KXpkhyqV9raXOVW xm+K+09gMiRoanNB2SqhBq+PmjpN/Q39uHnxOwhsqpupXoZBpx+UT+65QpzZl8JbLEY/vU Ko//ZEyhqSYykLliG+gwvZ/+WBaR9p0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-639-L8yZD93EODmWXar_uTWN_A-1; Mon, 01 Aug 2022 10:40:58 -0400 X-MC-Unique: L8yZD93EODmWXar_uTWN_A-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4845882404E; Mon, 1 Aug 2022 14:40:51 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-103.pek2.redhat.com [10.72.12.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id 411F6141510F; Mon, 1 Aug 2022 14:40:46 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, hch@infradead.org, wangkefeng.wang@huawei.com, linux-arm-kernel@lists.infradead.org, Baoquan He Subject: [PATCH 03/11] mm: ioremap: allow ARCH to have its own ioremap definition Date: Mon, 1 Aug 2022 22:40:21 +0800 Message-Id: <20220801144029.57829-4-bhe@redhat.com> In-Reply-To: <20220801144029.57829-1-bhe@redhat.com> References: <20220801144029.57829-1-bhe@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220801_074110_678875_5DDC9876 X-CRM114-Status: GOOD ( 11.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Architectures like xtensa, arc, can be converted to GENERIC_IOREMAP, to take standard ioremap_prot() and ioremap_xxx() way. But they have ARCH specific handling for ioremap() method, then standard ioremap() method. In oder to convert them to take GENERIC_IOREMAP method, allow ARCH to have its own ioremap definition. This is a preparation patch, no functionality change. Signed-off-by: Baoquan He --- include/asm-generic/io.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 0b5cd3cef99d..444761c3a44b 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -995,11 +995,14 @@ void __iomem *ioremap_prot(phys_addr_t paddr, size_t size, unsigned long prot); void iounmap(volatile void __iomem *addr); +#ifndef ioremap +#define ioremap ioremap static inline void __iomem *ioremap(phys_addr_t addr, size_t size) { /* _PAGE_IOREMAP needs to be supplied by the architecture */ return ioremap_prot(addr, size, _PAGE_IOREMAP); } +#endif #endif /* !CONFIG_MMU || CONFIG_GENERIC_IOREMAP */ #ifndef ioremap_wc