Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3405308rwb; Sun, 9 Oct 2022 04:44:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4A8YE2yN5PejFkZWOly3VXZLcLLH0r8JPX8gFSx8EVsPSiYPi0JPvdKe0RfWgapKnztPl5 X-Received: by 2002:a17:907:3f0b:b0:781:e783:2773 with SMTP id hq11-20020a1709073f0b00b00781e7832773mr10565877ejc.610.1665315895761; Sun, 09 Oct 2022 04:44:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665315895; cv=none; d=google.com; s=arc-20160816; b=bb6oYMYb6fivupXGaD59ca8RBoLADKUQ6w1cxv5EQq/eSwiGF2soS9UclD9qHF8fnX 1EQ0xBH10EFwVvhqFvvxYM/3QUfrBXrU0/jPiC4+IC5GI9gVBRhdFuUfYu279nrodPzB RuCOpLBGD9m22DBH5dQ09ZdOwqIZzrUuqtJyAx3iT89KimovVAULkqFqPLHT6FVsFg62 ZPWJXhG9C/ILQAtlobyjz5qdf8s2zbj9p/Zcz/u43E8lmckJ/ZdhwXrm0/fX/pYlY1rV 0Ch4gUvZg6wWAIiNHvIfa/D+FNRKpg6wSt871NP+67wTIayg9NPm4ToaOOGo6cc7jXMw 0hAw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=h0wz1H1leA7CuWV687C4HqKWq96HEonICKC1esEFR0M=; b=BaAkMjX964yTmjmwJmJeEr/78STn+yVJrVw6ZcMha8NH3rMcrDWsyFvkIQAwDDhfpd Uu2TccUflLBba+toVTIw2n/pgO5ihdzXmxycN4R+2BGubmhHHD05f34ykJTOhV1vg36o 70rxFl80ll3rS60aEDkaRxadC5jOJ9UStCCAUOrILECbkEXt6P0qIVsgGcZt7Lx1flUZ /KApz/a4beXJLlfGPdlEUlgDJOXJ8y+z4td9LTuiWs/ITJP3ki4m1l8Bx4JtGGaY/n7r Mz4fqakHx+6S3qZ3E5lhiMEhERD35hvm0pPGB066ac5Gw1oQ9xR4k004KWrdJ9uLx9Sn ZiDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WyAO13s7; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho30-20020a1709070e9e00b00783ca4d1c74si8851034ejc.520.2022.10.09.04.44.28; Sun, 09 Oct 2022 04:44:55 -0700 (PDT) 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=WyAO13s7; 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 S230053AbiJIKcn (ORCPT + 99 others); Sun, 9 Oct 2022 06:32:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230099AbiJIKcR (ORCPT ); Sun, 9 Oct 2022 06:32:17 -0400 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 E2E7C2AC6F for ; Sun, 9 Oct 2022 03:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665311535; 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=h0wz1H1leA7CuWV687C4HqKWq96HEonICKC1esEFR0M=; b=WyAO13s7sOpEOh9G7N+JebWGhk9NqtUIqQRvOYI6INCsN5URwxv8ULDXOjbnTYyGe850hF SZTrwf3v2/6yG3iZ4bxLA2t0dMWDVa1DTYddmqCqI1I+BZh0yXvQ3T9NRXm+KrOnUEAC0E GL59Dmw8G3q3TJIyA9xK+tC0Vzjr/ik= 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-271-HV8un_y7MuqyqxHBgOZLEg-1; Sun, 09 Oct 2022 06:32:12 -0400 X-MC-Unique: HV8un_y7MuqyqxHBgOZLEg-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 5265729AB3FD; Sun, 9 Oct 2022 10:32:11 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-36.pek2.redhat.com [10.72.12.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B8D640D298B; Sun, 9 Oct 2022 10:31:48 +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, christophe.leroy@csgroup.eu, schnelle@linux.ibm.com, David.Laight@ACULAB.COM, shorne@gmail.com, bhe@redhat.com, Arnd Bergmann , linux-arch@vger.kernel.org Subject: [PATCH v3 04/11] mm: ioremap: allow ARCH to have its own ioremap definition Date: Sun, 9 Oct 2022 18:31:07 +0800 Message-Id: <20221009103114.149036-5-bhe@redhat.com> In-Reply-To: <20221009103114.149036-1-bhe@redhat.com> References: <20221009103114.149036-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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, 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 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 Cc: Arnd Bergmann Cc: linux-arch@vger.kernel.org Cc: Kefeng Wang --- 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 2ae16906f3be..8878914579d8 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 -- 2.34.1