Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp102567rwb; Fri, 19 Aug 2022 17:59:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR4YFO1ZAlOpBadmWIR6YavImYEiipIAhA1XrWsvF75qxsjwl5iHXICSDBqEx9D5hI82DXXa X-Received: by 2002:a17:90a:b007:b0:1f1:d31e:4914 with SMTP id x7-20020a17090ab00700b001f1d31e4914mr16960633pjq.36.1660957175386; Fri, 19 Aug 2022 17:59:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660957175; cv=none; d=google.com; s=arc-20160816; b=gVosNPJnBTK4zUCdV472rb1pMZNF81RoDj112HuctIWr3u3r6AEcwEbRYLZOCeWcu0 fUchIk/28QdeoWxhmwCNevmZb+6cONbc2JMH+ymcSQHEPbXeFx02bsP3Y3zaDmdrS9Za 6HbVgL/xM9KZSio5+wox2rgZnY1eZBk0W4whkHyJau+sJRM4FCdBwuz9wAbSVYp8UTdh d5TRfwO18Ug+C28tGeHHcVwKLhFc0UXWWUKwitHMTeAVbHU7IFPB4V6AL7vvT/9UElSO qREdZ4A6yFTllJz7GDAx5Hk6Qec4w0uuFbKWef06SetRn+oBEM6cfpZzxdHpS32ZIXcD oRVQ== 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=2eNlfSc2iFa+EOzhxZ962Ulne6tVckemaHbQ1FYiCFw=; b=C3WuKX8ebSZOZJTNJeigTMFz9NKRKCQvgfHOR/UV6D04Y3eFf6ekTQLopPAUdXq8s8 WPf9zP9aBP6Pjo3egm1APUDdRQTp4OwQpGr5JTsCz/auuqmOTDDXUljAVrWTxvKoRgPE Om091uOF+7BQS8Qz5ta8V0XJHFbteE2nrgXw1NnfMCwrQQ3AuWeRB4HC4A4TzJJngkHe B4J0QN3YQjetIeAqGp49864LOrG8ExjoJeARzTsUDnJLRz34PZadZOY5QV8XFoV67Ijx 8HuC+u5TC2Y76poi+PpmYh7Qu+J8i+vlYsMLLhbSkt5erbYRmtENuuof77PjpjuB1ndy +szA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SWjrl7UR; 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 x24-20020a17090aca1800b001f8b8d48e3csi2833636pjt.103.2022.08.19.17.59.24; Fri, 19 Aug 2022 17:59:35 -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=SWjrl7UR; 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 S244215AbiHTAcB (ORCPT + 99 others); Fri, 19 Aug 2022 20:32:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243223AbiHTAby (ORCPT ); Fri, 19 Aug 2022 20:31:54 -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 C2999DB06D for ; Fri, 19 Aug 2022 17:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660955512; 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=SWjrl7UR08tJnZZe47BmbuFGmigO5O9Tm3pjzliqFhyO3oJGF835EbFwOybU7ZwNSo7xcc 5hzhCggSuLjC/BufXEWD8/YX0nGeM98aWSX2x1xKD3Q41ZvU6k4rzc9v8ViRPy8T5oTTXJ qRSHqQLHDQNnzkQIW9l4jqV9LUQQTQI= 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 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 --- 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 -- 2.34.1