From mboxrd@z Thu Jan 1 00:00:00 1970 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 8F721C61DA4 for ; Wed, 22 Feb 2023 08:35:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DB0506B0071; Wed, 22 Feb 2023 03:35:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D60D46B0073; Wed, 22 Feb 2023 03:35:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C4EBE6B0074; Wed, 22 Feb 2023 03:35:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id B6BEE6B0071 for ; Wed, 22 Feb 2023 03:35:20 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 746CB1A0A18 for ; Wed, 22 Feb 2023 08:35:20 +0000 (UTC) X-FDA: 80494268400.23.90E359F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf18.hostedemail.com (Postfix) with ESMTP id 0FC751C001F for ; Wed, 22 Feb 2023 08:35:17 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=iTJOcfuT; spf=pass (imf18.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=1677054918; a=rsa-sha256; cv=none; b=HXG98qcsPOWs4ZzkXN0uVNMja+bvh0ywc3fJpSAz87uDdRHmQ51D2M/hiYcTDD9si/GzBG 5qv/fD2VS+Nwm5kM9fTHuoBK6SLoFE436yKhRJd3yB0u/HnbJjdOA7ZQRNNFCdMxodUUFi 3v9yMtgDFIjw1SQlS++to6ZqOMAi2vQ= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=iTJOcfuT; spf=pass (imf18.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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1677054918; 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=rmxOmW2Bi0X9FdGRBJxRliQUyu7bX3a5ch+5lNPbh68=; b=ptw6XbocMx6MNqONU8A9o5EMIaavIjLSBt5cQ97RQa0kZPBmwv1jWDEskqeMa68X9KRAbH nm+ACdpey4I8KRZ/GYUSV+pinyDy2UJtovExwYMhL3xW9kX4PhNgcDcWxjZwT/XKSTiBLh DsNYUtWRWersgJxA7FUc2K1Lgf6Ljfc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677054917; 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=rmxOmW2Bi0X9FdGRBJxRliQUyu7bX3a5ch+5lNPbh68=; b=iTJOcfuTbZN/fgbd++jL285ud0kpaMT25WrBhLYIwA4N1ho8l/aZi8KDlekdFjpEQv8Kiz +fba8jARCCaglKBpyderh8SqmvWhRZODTV8qRtimwc730xQzLeMDaV8a1UFgV+MSzPl2ER OD6vvBNbZU0maQr6IP+9D7xv38zyiMc= 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-3-MmktJbUpMh-UegbYJy6C9Q-1; Wed, 22 Feb 2023 03:35:14 -0500 X-MC-Unique: MmktJbUpMh-UegbYJy6C9Q-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 39BDD858F0E; Wed, 22 Feb 2023 08:35:13 +0000 (UTC) Received: from localhost (ovpn-13-7.pek2.redhat.com [10.72.13.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 223FB440D9; Wed, 22 Feb 2023 08:35:11 +0000 (UTC) Date: Wed, 22 Feb 2023 16:35:08 +0800 From: Baoquan He To: Christophe Leroy , Arnd Bergmann Cc: Matthew Wilcox , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Andrew Morton , Christoph Hellwig , Alexander Gordeev , Kefeng Wang , Niklas Schnelle , David Laight , Stafford Horne , "James E . J . Bottomley" , Helge Deller , "linux-parisc@vger.kernel.org" Subject: Re: [PATCH v4 12/16] parisc: mm: Convert to GENERIC_IOREMAP Message-ID: References: <20230216123419.461016-1-bhe@redhat.com> <20230216123419.461016-13-bhe@redhat.com> <107be2c9-021b-85f6-d32d-ddb9e75ce24f@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <107be2c9-021b-85f6-d32d-ddb9e75ce24f@csgroup.eu> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Rspam-User: X-Rspamd-Queue-Id: 0FC751C001F X-Rspamd-Server: rspam01 X-Stat-Signature: o3nthpbymzzp86e9urhq65p8gngay44g X-HE-Tag: 1677054917-459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H9WULndXX28celarBcRgHEowH5jifZySvPGjLuPqanIf3oZl579Kkaj8sUQeFSFf9OAfgPMu97M8N9kklXBtUXTdOwTc2zMb6wQ3b5QGPjrURNeHn95qDxMDsUxyZ06N9EM8ElmKYuixGHAV3bqTiGru2DmDmVgXXVLDmvcceVTEHpqDoOm5jOvouAiIK+aUiz8wbrpNEPZMehD7jTEcGBNHhI1LzAoBgPQEiXOEY0QglDg== 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: Hi Christophe, Arnd, On 02/17/23 at 01:46pm, Christophe Leroy wrote: > > > Le 17/02/2023 à 14:31, Baoquan He a écrit : > > On 02/16/23 at 04:18pm, Arnd Bergmann wrote: > >> On Thu, Feb 16, 2023, at 16:02, Baoquan He wrote: > >>> On 02/16/23 at 01:50pm, Matthew Wilcox wrote: > >>> It's not if including asm-generic/iomap.h. The ARCH_HAS_IOREMAP_xx is to > >>> avoid redefinition there. > >>> > >>> include/asm-generic/iomap.h: > >>> ---- > >>> #ifndef ARCH_HAS_IOREMAP_WC > >>> #define ioremap_wc ioremap > >>> #endif > >> > >> I'd change that to the usual '#ifndef ioremap_wc' in that case. > > > > Not sure if I got you. Kill all ARCH_HAS_IOREMAP_xxx in kernel? If yes, > > sounds like a good idea. > > > > At least kill that one at the first place in your series, and then the > other ones in a follow-up series maybe. I made a patch to remove all ARCH_HAS_IOREMAP_xx macros in architectures and the ifdeffery of ARCH_HAS_IOREMAP_xx in asm-generic/iomap.h. But the change will cause building error as below. Becuase we usually have '#include ' at the beginning of arch/xx/include/asm/io.h, and have '#include ' at the end of arch/xx/include/asm/io.h. For architecutres which has ARCH_HAS_IOREMAP_xx defining, we need move ''#include dowe to below '#include '. Please help check if it's still worth doing. ***move '#include ' below '#include ' *** diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 8ab68cde1f13..a8d55fc62959 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -209,8 +209,6 @@ void memset_io(volatile void __iomem *, int, size_t); #define memcpy_toio memcpy_toio #define memset_io memset_io -#include - /* * ISA space is 'always mapped' on a typical x86 system, no need to * explicitly ioremap() it. The fact that the ISA IO space is mapped @@ -329,6 +327,8 @@ extern bool is_early_ioremap_ptep(pte_t *ptep); #include #undef PCI_IOBASE +#include + #ifdef CONFIG_MTRR extern int __must_check arch_phys_wc_index(int handle); #define arch_phys_wc_index arch_phys_wc_index ***Building error after removing ARCH_HAS_IOREMAP_xx *** In file included from ./include/linux/io.h:13, from ./include/linux/irq.h:20, from ./include/xen/events.h:6, from arch/x86/entry/common.c:25: ./arch/x86/include/asm/io.h:321: warning: "ioremap_wc" redefined 321 | #define ioremap_wc ioremap_wc | In file included from ./arch/x86/include/asm/io.h:212: ./include/asm-generic/iomap.h:97: note: this is the location of the previous definition 97 | #define ioremap_wc ioremap | ./arch/x86/include/asm/io.h:323: warning: "ioremap_wt" redefined 323 | #define ioremap_wt ioremap_wt | ./include/asm-generic/iomap.h:101: note: this is the location of the previous definition 101 | #define ioremap_wt ioremap