From patchwork Sat Aug 20 00:31:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 12949403 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 89CD7C32789 for ; Sat, 20 Aug 2022 00:31:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 234528D0005; Fri, 19 Aug 2022 20:31:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1E46B8D0002; Fri, 19 Aug 2022 20:31:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0ACCF8D0005; Fri, 19 Aug 2022 20:31:51 -0400 (EDT) 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 F05ED8D0002 for ; Fri, 19 Aug 2022 20:31:50 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id CEBA28010C for ; Sat, 20 Aug 2022 00:31:50 +0000 (UTC) X-FDA: 79818093180.19.AA9FC86 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf28.hostedemail.com (Postfix) with ESMTP id 5D493C0038 for ; Sat, 20 Aug 2022 00:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660955510; 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=2eNlfSc2iFa+EOzhxZ962Ulne6tVckemaHbQ1FYiCFw=; b=CP+GSklVgU0g8/F4K6FC+QEh6YsGM3P9uLiziJavMlRf69dlFAHdLCnQRjI/1DBM4Dg/gt lTLlcVU/Bizaut4B9P6WLyNXOxqxBFsSAyHYMEwsXQNSU2c2hlavhHP8S9kJ4GzlVrmrq3 Cgh20Esot7tHuPbgp1F2DtirXkTJQ4g= 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-279-jw71ufJUMG6kmwDKg5AwGw-1; Fri, 19 Aug 2022 20:31:46 -0400 X-MC-Unique: jw71ufJUMG6kmwDKg5AwGw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4566F3804502; Sat, 20 Aug 2022 00:31:46 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-17.pek2.redhat.com [10.72.12.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9428B4010D2A; Sat, 20 Aug 2022 00:31:42 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, hch@infradead.org, agordeev@linux.ibm.com, wangkefeng.wang@huawei.com, linux-arm-kernel@lists.infradead.org, Baoquan He Subject: [PATCH v2 03/11] mm: ioremap: allow ARCH to have its own ioremap definition Date: Sat, 20 Aug 2022 08:31:17 +0800 Message-Id: <20220820003125.353570-4-bhe@redhat.com> In-Reply-To: <20220820003125.353570-1-bhe@redhat.com> References: <20220820003125.353570-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=CP+GSklV; spf=pass (imf28.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=1660955510; a=rsa-sha256; cv=none; b=5E65fO34a2vIYC0GnHY/tDrNNDTj+b3JmbJfJSooOtaCzvBp17EX/MRlPOhBeIgpRB5xNT u5buFMKy52wTchZI2ksN4DWtc6zyNL/+N4HYPEdAukFQs7sguFulHCVdbCArbcnI1XkS8X qsLX8H3LTzHSoUaaNBtFBMfKEmUZ4hs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660955510; 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:in-reply-to:references:references:dkim-signature; bh=2eNlfSc2iFa+EOzhxZ962Ulne6tVckemaHbQ1FYiCFw=; b=5PDNVfbT60569ByPWb+PAc+fhNzUAcxNR6vdulwWlvtweXiUdKwNtfejOsjLZj2kJs7W+m AaK2yYl9+6OlBPygE79ETpD5OZRPQkuSASmwd11nu4bM8J1fpPJEqds5AlKdQ+wyroqMX+ b+qDSInZHPXRSwLcNU1TpvK5CRqMJuI= X-Rspam-User: Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=CP+GSklV; spf=pass (imf28.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 X-Rspamd-Server: rspam02 X-Stat-Signature: zoh6yhas1t65oa1dqurna878qy797r6d X-Rspamd-Queue-Id: 5D493C0038 X-HE-Tag: 1660955510-253253 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: 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, than standard ioremap() method. In oder to convert them to take GENERIC_IOREMAP method, allow these architecutres to have their 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 fb9bda2be8ed..68a8117b30fa 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -1078,11 +1078,14 @@ void __iomem *ioremap_prot(phys_addr_t phys_addr, 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